diff options
author | James Taylor <user234683@users.noreply.github.com> | 2018-11-10 00:27:43 -0800 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2018-11-10 00:27:43 -0800 |
commit | 717bf210937c757595624348db9389969be9654f (patch) | |
tree | 7814a81f5c0de1084ab46f3a88b6186798932dfa /youtube/watch.py | |
parent | 9dd8308cf23de69c741f0304ace102718b844e16 (diff) | |
download | yt-local-717bf210937c757595624348db9389969be9654f.tar.lz yt-local-717bf210937c757595624348db9389969be9654f.tar.xz yt-local-717bf210937c757595624348db9389969be9654f.zip |
Can now store settings&data in ~/.youtube-local, keeping program files separate
Diffstat (limited to 'youtube/watch.py')
-rw-r--r-- | youtube/watch.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube/watch.py b/youtube/watch.py index 6ed0878..0f70635 100644 --- a/youtube/watch.py +++ b/youtube/watch.py @@ -9,6 +9,7 @@ from youtube.common import default_multi_get, get_thumbnail_url, video_id, URL_O import youtube.comments as comments import gevent import settings +import os video_height_priority = (360, 480, 240, 720, 1080) @@ -305,7 +306,7 @@ def get_watch_page(query_string): music_list_html += '''</tr>\n''' music_list_html += '''</table>\n''' if settings.gather_googlevideo_domains: - with open('data/googlevideo-domains.txt', 'a+', encoding='utf-8') as f: + 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") |