diff options
-rw-r--r-- | settings.py | 18 | ||||
-rw-r--r-- | youtube/watch.py | 6 |
2 files changed, 10 insertions, 14 deletions
diff --git a/settings.py b/settings.py index eb210c5..2de5efa 100644 --- a/settings.py +++ b/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, } diff --git a/youtube/watch.py b/youtube/watch.py index 269e9e3..e2762cb 100644 --- a/youtube/watch.py +++ b/youtube/watch.py @@ -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']): |