diff options
author | James Taylor <user234683@users.noreply.github.com> | 2018-08-31 16:36:58 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2018-08-31 16:36:58 -0700 |
commit | a9ea97ad395cd37a97762550d5f4f2573b4759c6 (patch) | |
tree | 24dd0b9b1150664eaad73b40d3c6890accdcf853 /youtube | |
parent | 7cfb66b4b80302a2f03e99f6b6a4990a6dc27ab5 (diff) | |
download | yt-local-a9ea97ad395cd37a97762550d5f4f2573b4759c6.tar.lz yt-local-a9ea97ad395cd37a97762550d5f4f2573b4759c6.tar.xz yt-local-a9ea97ad395cd37a97762550d5f4f2573b4759c6.zip |
default disable googlevideo domain debugging
Diffstat (limited to 'youtube')
-rw-r--r-- | youtube/watch.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/youtube/watch.py b/youtube/watch.py index ff7d6df..42f2150 100644 --- a/youtube/watch.py +++ b/youtube/watch.py @@ -304,7 +304,7 @@ def get_watch_page(query_string): id = urllib.parse.parse_qs(query_string)['v'][0] downloader = YoutubeDL(params={'youtube_include_dash_manifest':False}) tasks = ( - gevent.spawn(comments.video_comments, id ), + gevent.spawn(comments.video_comments, id, int(settings.default_comment_sorting) ), gevent.spawn(extract_info, downloader, "https://www.youtube.com/watch?v=" + id, download=False) ) gevent.joinall(tasks) @@ -384,11 +384,11 @@ def get_watch_page(query_string): music_list_html += '''<td>''' + html.escape(value) + '''</td>''' music_list_html += '''</tr>\n''' music_list_html += '''</table>\n''' - - with open('data/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") + if settings.gather_googlevideo_domains: + with open('data/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_options = '' for format in info['formats']: |