diff --git a/.gitignore b/.gitignore index fd595ef1..ebc0ceed 100644 --- a/.gitignore +++ b/.gitignore @@ -135,3 +135,4 @@ SpamPurgeConfig.ini # Ignore Resources Folders spam_lists/ SpamPurge_Resources/ +.DS_Store diff --git a/Scripts/community_downloader.py b/Scripts/community_downloader.py index e4cd26e9..ffdad1b2 100644 --- a/Scripts/community_downloader.py +++ b/Scripts/community_downloader.py @@ -74,8 +74,9 @@ def fetch_recent_community_posts(channel_id): html = response.text data = json.loads(regex_search(html, YT_INITIAL_DATA_RE, default='')) - section = next(search_dict(data, 'itemSectionRenderer'), None) - rawPosts = list(search_dict(section, 'backstagePostRenderer')) + rendererSubsection = next(search_dict(data, 'twoColumnBrowseResultsRenderer'), None) + itemSection = next(search_dict(rendererSubsection, 'itemSectionRenderer'), None) + rawPosts = list(search_dict(itemSection, 'backstagePostRenderer')) recentPostsListofDicts = [] # Use list to keep in order - Puts post ID and sample of text into dictionary keypair, strips newlines # Gets the Post IDs and sample of post text diff --git a/YTSpammerPurge.py b/YTSpammerPurge.py index 9bb77745..12726202 100644 --- a/YTSpammerPurge.py +++ b/YTSpammerPurge.py @@ -36,7 +36,7 @@ ### IMPORTANT: I OFFER NO WARRANTY OR GUARANTEE FOR THIS SCRIPT. USE AT YOUR OWN RISK. ### I tested it on my own and implemented some failsafes as best as I could, ### but there could always be some kind of bug. You should inspect the code yourself. -version = "2.17.0" +version = "2.17.1" configVersion = 32 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# print("Importing Script Modules...")