dropin

alternative frontend for dropout.tv
git clone https://git.ce9e.org/dropin.git

commit
8b8a379f2c2e18e8b1064b6a2e978e77d60d0331
parent
26791f4cc6f71bdef3f1039313d48b6559d49ea2
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2026-09-25 17:42
lint: avoid nested context managers

Diffstat

M dropin.py 10 ++++++----

1 files changed, 6 insertions, 4 deletions


diff --git a/dropin.py b/dropin.py

@@ -164,10 +164,12 @@ class Auth:
  164   164     async def unauth(self):
  165   165         if VERBOSE:
  166   166             print('fetch non-subscription token')
  167    -1         async with aiohttp.ClientSession() as session:
  168    -1             async with session.get('https://watch.dropout.tv/browse') as response:
  169    -1                 html = await response.text()
  170    -1                 return re.search(r'token: "([^"]+)', html).group(1)
   -1   167         async with (
   -1   168             aiohttp.ClientSession() as session,
   -1   169             session.get('https://watch.dropout.tv/browse') as response,
   -1   170         ):
   -1   171             html = await response.text()
   -1   172             return re.search(r'token: "([^"]+)', html).group(1)
  171   173 
  172   174     async def get_token(self, timeout=300):
  173   175         if not self.future or (self.future.done() and self.exp < time.time() + timeout):