Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tver] Add support for TVer #26662

Closed
wants to merge 14 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[tver] fix to more verbose code
tsukumijima committed Sep 21, 2020
commit a109b5fe110ca7817d92e587ef1262fbce57a295
7 changes: 3 additions & 4 deletions youtube_dl/extractor/tver.py
Original file line number Diff line number Diff line change
@@ -111,9 +111,8 @@ def _real_extract(self, url):

# get video description
description = \
self._og_search_description(webpage) or \
self._html_search_meta('twitter:description', webpage) or \
self._html_search_regex(r'<div class="description">(?P<description>.*?)</div>', webpage, 'description', default=None, flags=re.DOTALL)
self._html_search_meta(['description', 'og:description', 'twitter:description'], webpage, 'description', default=None) or \
self._html_search_regex(r'<div[^>]+class="description"[^>]*>(?P<description>.*?)</div>', webpage, 'description', default=None, flags=re.DOTALL)

# undo _VALID_URL
self._VALID_URL = _VALID_URL
@@ -123,7 +122,7 @@ def _real_extract(self, url):
# Brightcove ID
info_dict['display_id'] = brightcove_video_id
# select large thumbnail
info_dict['thumbnail'] = info_dict['thumbnail'].replace('160x90', '1920x1080')
info_dict['thumbnail'] = info_dict.get('thumbnail').replace('160x90', '1920x1080')
# desctiption
info_dict['description'] = description