Remove gather_googlevideo_domains setting
This was an old experiment to collect googlevideo domains to see if there was a pattern that could correlate to IP address to look for workarounds for 403 errors Can bug out if enabled and if failed to get any vidoe urls, so remove since it is obsolete and some people are enabling it See #218
This commit is contained in:
parent
7157df13cd
commit
639aadd2c1
18
settings.py
18
settings.py
@ -322,13 +322,6 @@ Archive: https://archive.ph/OZQbN''',
|
||||
'comment': '',
|
||||
}),
|
||||
|
||||
('gather_googlevideo_domains', {
|
||||
'type': bool,
|
||||
'default': False,
|
||||
'comment': '''Developer use to debug 403s''',
|
||||
'hidden': True,
|
||||
}),
|
||||
|
||||
('debugging_save_responses', {
|
||||
'type': bool,
|
||||
'default': False,
|
||||
@ -338,7 +331,7 @@ Archive: https://archive.ph/OZQbN''',
|
||||
|
||||
('settings_version', {
|
||||
'type': int,
|
||||
'default': 5,
|
||||
'default': 6,
|
||||
'comment': '''Do not change, remove, or comment out this value, or else your settings may be lost or corrupted''',
|
||||
'hidden': True,
|
||||
}),
|
||||
@ -419,11 +412,20 @@ def upgrade_to_5(settings_dict):
|
||||
return new_settings
|
||||
|
||||
|
||||
def upgrade_to_6(settings_dict):
|
||||
new_settings = settings_dict.copy()
|
||||
if 'gather_googlevideo_domains' in new_settings:
|
||||
del new_settings['gather_googlevideo_domains']
|
||||
new_settings['settings_version'] = 6
|
||||
return new_settings
|
||||
|
||||
|
||||
upgrade_functions = {
|
||||
1: upgrade_to_2,
|
||||
2: upgrade_to_3,
|
||||
3: upgrade_to_4,
|
||||
4: upgrade_to_5,
|
||||
5: upgrade_to_6,
|
||||
}
|
||||
|
||||
|
||||
|
@ -649,12 +649,6 @@ def get_watch_page(video_id=None):
|
||||
'/videoplayback',
|
||||
'/videoplayback/name/' + filename)
|
||||
|
||||
if settings.gather_googlevideo_domains:
|
||||
with open(os.path.join(settings.data_dir, 'googlevideo-domains.txt'), 'a+', encoding='utf-8') as f:
|
||||
url = info['formats'][0]['url']
|
||||
subdomain = url[0:url.find(".googlevideo.com")]
|
||||
f.write(subdomain + "\n")
|
||||
|
||||
download_formats = []
|
||||
|
||||
for format in (info['formats'] + info['hls_formats']):
|
||||
|
Loading…
x
Reference in New Issue
Block a user