1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-27 12:42:55 +08:00

[crunchyroll] fixes subtitles

Partially reverts 80f48920c8
forcing skip_wall on videos broke subtitles. @dstftw sorry my testing wasn't thorough enough.
skip_wall works fine with crunchyroll:playlist bypassing  18+ playlists but login is required again to download the videos.
This commit is contained in:
almostalive 2015-10-21 20:18:15 -05:00
parent 8c3533ba97
commit b0032e8412

View File

@ -70,11 +70,6 @@ class CrunchyrollBaseIE(InfoExtractor):
def _add_skip_wall(url):
parsed_url = compat_urlparse.urlparse(url)
qs = compat_urlparse.parse_qs(parsed_url.query)
# Always force skip_wall to bypass maturity wall, namely 18+ confirmation message:
# > This content may be inappropriate for some people.
# > Are you sure you want to continue?
# since it's not disabled by default in crunchyroll account's settings.
# See https://github.com/rg3/youtube-dl/issues/7202.
qs['skip_wall'] = ['1']
return compat_urlparse.urlunparse(
parsed_url._replace(query=compat_urllib_parse.urlencode(qs, True)))
@ -271,7 +266,7 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
else:
webpage_url = 'http://www.' + mobj.group('url')
webpage = self._download_webpage(self._add_skip_wall(webpage_url), video_id, 'Downloading webpage')
webpage = self._download_webpage(webpage_url, video_id, 'Downloading webpage')
note_m = self._html_search_regex(
r'<div class="showmedia-trailer-notice">(.+?)</div>',
webpage, 'trailer-notice', default='')