jonathanjordan21 commited on
Commit
43bcca3
·
verified ·
1 Parent(s): 87e4b85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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