jonathanjordan21 commited on
Commit
ceb1554
·
verified ·
1 Parent(s): 385e9be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -86,7 +86,8 @@ async def google_search(q: str, delimiter: str = "\n---\n", sites: Annotated[lis
86
  @app.get("/tiktok_video_details")
87
  async def tiktok_video_details(username: str, video_id:str):
88
  url = f"https://www.tiktok.com/{username}/video/{video_id}"
89
- user_agent = "LinkedInBot/1.0 (compatible; Mozilla/5.0; Jakarta Commons-HttpClient/3.1 +http://www.linkedin.com)/1.0 (LinkedInBot; https://www.linkedin.com/; [email protected])"
 
90
  res = requests.get(url, headers={"user-agent": user_agent})
91
 
92
  soup = BeautifulSoup(res.content, "html.parser")
 
86
  @app.get("/tiktok_video_details")
87
  async def tiktok_video_details(username: str, video_id:str):
88
  url = f"https://www.tiktok.com/{username}/video/{video_id}"
89
+ # user_agent = "LinkedInBot"
90
+ user_agent = "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)"
91
  res = requests.get(url, headers={"user-agent": user_agent})
92
 
93
  soup = BeautifulSoup(res.content, "html.parser")