diff options
author | James Taylor <user234683@users.noreply.github.com> | 2020-11-29 15:54:04 -0800 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2020-11-29 15:54:04 -0800 |
commit | 2ac806f9eb4b95fe5038a8057a45e16aa7e597a3 (patch) | |
tree | 0d112989ee651764ecbc0263d8223c60b1e0633d /youtube/comments.py | |
parent | ac54362f084e8a847b7a437ae6391383a317770b (diff) | |
download | yt-local-2ac806f9eb4b95fe5038a8057a45e16aa7e597a3.tar.lz yt-local-2ac806f9eb4b95fe5038a8057a45e16aa7e597a3.tar.xz yt-local-2ac806f9eb4b95fe5038a8057a45e16aa7e597a3.zip |
video comments: add link to open the comments page separately
for situations where the comments failed to load
Diffstat (limited to 'youtube/comments.py')
-rw-r--r-- | youtube/comments.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/youtube/comments.py b/youtube/comments.py index feaa912..8dc9d86 100644 --- a/youtube/comments.py +++ b/youtube/comments.py @@ -143,7 +143,13 @@ def video_comments(video_id, sort=0, offset=0, lc='', secret_key=''): other_sort_url = util.URL_ORIGIN + '/comments?ctoken=' + make_comment_ctoken(video_id, sort=1 - sort, lc=lc) other_sort_text = 'Sort by ' + ('newest' if sort == 0 else 'top') - comments_info['comment_links'] = [(other_sort_text, other_sort_url)] + + this_sort_url = (util.URL_ORIGIN + + '/comments?ctoken=' + + make_comment_ctoken(video_id, sort=sort, lc=lc)) + + comments_info['comment_links'] = [(other_sort_text, other_sort_url), + ('Direct link', this_sort_url)] return comments_info |