mirror of
https://github.com/ThioJoe/YT-Spammer-Purge.git
synced 2026-01-08 22:07:55 -05:00
Fix Community Comment Scanning
- YouTube updated the web page layout source code at some point, so this fixes the references to the location of the posts Addresses #1082
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -135,3 +135,4 @@ SpamPurgeConfig.ini
|
||||
# Ignore Resources Folders
|
||||
spam_lists/
|
||||
SpamPurge_Resources/
|
||||
.DS_Store
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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...")
|
||||
|
||||
Reference in New Issue
Block a user