aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/watch.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube/watch.py')
-rw-r--r--youtube/watch.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube/watch.py b/youtube/watch.py
index ad3c448..ff7d6df 100644
--- a/youtube/watch.py
+++ b/youtube/watch.py
@@ -385,6 +385,10 @@ def get_watch_page(query_string):
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")
download_options = ''
for format in info['formats']: