You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Can not get batch of video info with concurrent calls, since there is a http request in video.info() which is a blocking call. For example:
api = TikTokApi()
async def video_by_url(url) -> Video:
video = await api.video(url=url).init()
await video.info()
return video
urls = ["https://www.tiktok.com/@dannygrubs/video/7412294496928599342", "https://www.tiktok.com/@dannygrubs/video/7407427078250925354"]
tasks = [video_by_url(video_url) for video_url in urls]
videos = await asyncio.gather(*tasks)
Describe the solution you'd like
It would be great to use a async http library, such as httpx or aiohttp, to make the http call unblocking.
The text was updated successfully, but these errors were encountered:
eysenshi
changed the title
[FEATURE_REQUEST] - Async http request in video.info
[FEATURE_REQUEST] - use async http request to make video.info() unblocking
Oct 2, 2024
Is your feature request related to a problem? Please describe.
Can not get batch of video info with concurrent calls, since there is a http request in
video.info()
which is a blocking call. For example:Describe the solution you'd like
It would be great to use a async http library, such as httpx or aiohttp, to make the http call unblocking.
The text was updated successfully, but these errors were encountered: