Sorry for the interruption. We have been receiving a large volume of requests from your network.
+ +To continue with your YouTube experience, please fill out the form below.
""" in shelfintp.text and not shelfintp.status_code == 200: + break + else: + print("Non-200 status code, waiting 30 seconds before retrying...") + sleep(30) + + shelfiteminitdata = getinitialdata(shelfintp.text) playlistsint = fullyexpand(shelfiteminitdata["contents"]["twoColumnBrowseResultsRenderer"]["tabs"][PLAYLISTS_ID]["tabRenderer"]["content"]["sectionListRenderer"]["contents"][0]["itemSectionRenderer"]["contents"][0]["gridRenderer"], mysession, continuationheaders)["items"] for playlist in playlistsint: @@ -85,7 +95,7 @@ def process_channel(channelid: str): else: print("Non-200 API status code, waiting 30 seconds before retrying...") sleep(30) - + shelflist = initdata["contents"]["twoColumnBrowseResultsRenderer"]["tabs"][CHANNELS_ID]["tabRenderer"]["content"]["sectionListRenderer"]["contents"] for item in shelflist: @@ -99,7 +109,17 @@ def process_channel(channelid: str): channellist.add(channel["gridChannelRenderer"]["channelId"]) for item in cshelfres: - shelfiteminitdata = getinitialdata(mysession.get("https://www.youtube.com/"+str(item)).text) + while True: + shelfintc = mysession.get("https://www.youtube.com/"+str(item)) + if not """