Skip to content

Commit

Permalink
add sleep for 30 for slower connections
Browse files Browse the repository at this point in the history
  • Loading branch information
unixfox committed Jul 20, 2024
1 parent 174651a commit 8e3cd89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ async def main():
await button_play.click()
print("[INFO] click on first youtube video.")
await iframe_tab.wait(cdp.network.RequestWillBeSent)
time.sleep(5)
print("[INFO] waiting additional 30 seconds for slower connections.")
await tab.sleep(30)

async def send_handler(event: cdp.network.RequestWillBeSent):
if "/youtubei/v1/player" in event.request.url:
Expand Down

0 comments on commit 8e3cd89

Please sign in to comment.