Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ app.add_middleware(
|
|
26 |
@app.get("/linkedin_post_details")
|
27 |
async def linkedin_post_details(post_id: str):
|
28 |
url = "https://www.linkedin.com/posts/"+post_id
|
29 |
-
res = requests.get(url)
|
30 |
|
31 |
text_maker = html2text.HTML2Text()
|
32 |
text_maker.ignore_links = True
|
|
|
26 |
@app.get("/linkedin_post_details")
|
27 |
async def linkedin_post_details(post_id: str):
|
28 |
url = "https://www.linkedin.com/posts/"+post_id
|
29 |
+
res = requests.get(url, headers={"user-agent":"Googlebot", "accept-language": "en-US"})
|
30 |
|
31 |
text_maker = html2text.HTML2Text()
|
32 |
text_maker.ignore_links = True
|