Stop subscripting None #44

Merged
BobVonBob merged 1 commit from no-crashing-bad-frank into main 2024-06-04 21:56:40 -05:00
BobVonBob commented 2024-06-04 21:48:03 -05:00 (Migrated from github.com)

Adds a check to stop executing if latest_video is None because scrapetube did not retrieve videos. I don't know why that happens, but maybe adding a limit will help. Almost certainly not because scrapetube is a generator, but maybe?

If that doesn't do anything for the missing videos a potential fix might be more evenly spreading out the requests. So instead of this:
JMTNTBANG/Bitey-Frank@aa992c14ca/src/python-loops.py (L129-L131)
we could try this:

        for channel in channels:
            await (yt_checker(channel))
            await asyncio.sleep(calc_wait_time(60))

so all of the channels aren't being grabbed at the same time.

Adds a check to stop executing if latest_video is None because scrapetube did not retrieve videos. I don't know why that happens, but maybe adding a limit will help. Almost certainly not because scrapetube is a generator, but maybe? If that doesn't do anything for the missing videos a potential fix might be more evenly spreading out the requests. So instead of this: https://github.com/JMTNTBANG/Bitey-Frank/blob/aa992c14caf66bbea217a218e06a50b701b71945/src/python-loops.py#L129-L131 we could try this: ```py for channel in channels: await (yt_checker(channel)) await asyncio.sleep(calc_wait_time(60)) ``` so all of the channels aren't being grabbed at the same time.
JMTNTBANG (Migrated from github.com) approved these changes 2024-06-04 21:55:42 -05:00
Sign in to join this conversation.
No description provided.