JMTNTBANG / Bitey-Frank

The official mascot of the unofficial Discord server of the Garbage Stream.
MIT License
1 stars 3 forks source link

Stop subscripting None #44

Closed BobVonBob closed 5 months ago

BobVonBob commented 5 months ago

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:

        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.