tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

settled_youtube.py (703B)


      1 # This Source Code Form is subject to the terms of the Mozilla Public
      2 # License, v. 2.0. If a copy of the MPL was not distributed with this
      3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
      4 
      5 import asyncio
      6 
      7 
      8 async def settled_youtube(session, options):
      9    # nothing is done, we just settle here for 30 seconds
     10    await asyncio.sleep(options.get("sleep", 5))
     11    await asyncio.wait_for(
     12        session.get(
     13            "https://yttest.prod.mozaws.net/2020/main.html?"
     14            "test_type=playbackperf-widevine-sfr-h264-test&"
     15            "raptor=true&exclude=1,2&muted=true&command=run"
     16        ),
     17        timeout=120,
     18    )
     19    await asyncio.sleep(options.get("sleep", 30))
     20    return {}