Loading lostmediafinder/finder.py +7 −6 Original line number Diff line number Diff line Loading @@ -745,7 +745,7 @@ class LetsPlayIndex(YouTubeService): archived = False try: async with session.head(url, timeout=15) as resp: async with session.head(url, timeout=10) as resp: lastupdated = time.time() status = resp.status if status == 301: Loading @@ -753,12 +753,13 @@ class LetsPlayIndex(YouTubeService): available = str(resp.request_info.url) yield Link( url = available, contains = LinkContains(video = True, metadata = True, thumbnail = True), contains = LinkContains(metadata = True, thumbnail = True), title = "Video" ) elif status == 404: archived = False except (aiohttp.ClientError, asyncio.TimeoutError): else: raise AssertionError(f"Unexpected status code {status}") except asyncio.TimeoutError: # ...why? archived = False lastupdated = time.time() Loading lostmediafinder/types.py +1 −1 Original line number Diff line number Diff line Loading @@ -414,7 +414,7 @@ class YouTubeResponse(JSONDataclass): queue_task.cancel() done_task.cancel() done, pending = await asyncio.wait(coroutines, timeout = 0) done_tasks, pending = await asyncio.wait(coroutines, timeout = 0) assert not pending yield None any_comments_archived = any(map(lambda e : e.comments, keys)) Loading Loading
lostmediafinder/finder.py +7 −6 Original line number Diff line number Diff line Loading @@ -745,7 +745,7 @@ class LetsPlayIndex(YouTubeService): archived = False try: async with session.head(url, timeout=15) as resp: async with session.head(url, timeout=10) as resp: lastupdated = time.time() status = resp.status if status == 301: Loading @@ -753,12 +753,13 @@ class LetsPlayIndex(YouTubeService): available = str(resp.request_info.url) yield Link( url = available, contains = LinkContains(video = True, metadata = True, thumbnail = True), contains = LinkContains(metadata = True, thumbnail = True), title = "Video" ) elif status == 404: archived = False except (aiohttp.ClientError, asyncio.TimeoutError): else: raise AssertionError(f"Unexpected status code {status}") except asyncio.TimeoutError: # ...why? archived = False lastupdated = time.time() Loading
lostmediafinder/types.py +1 −1 Original line number Diff line number Diff line Loading @@ -414,7 +414,7 @@ class YouTubeResponse(JSONDataclass): queue_task.cancel() done_task.cancel() done, pending = await asyncio.wait(coroutines, timeout = 0) done_tasks, pending = await asyncio.wait(coroutines, timeout = 0) assert not pending yield None any_comments_archived = any(map(lambda e : e.comments, keys)) Loading