Skip to content

Commit

Permalink
[crunchyroll:playlist] Restrict _VALID_URL (closes #17069)
Browse files Browse the repository at this point in the history
  • Loading branch information
bato3 authored and dstftw committed Jul 28, 2018
1 parent 4938c8d commit b2286f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion youtube_dl/extractor/crunchyroll.py
Expand Up @@ -262,6 +262,9 @@ class CrunchyrollIE(CrunchyrollBaseIE):
# Just test metadata extraction
'skip_download': True,
},
}, {
'url': 'http://www.crunchyroll.com/media-723735',
'only_matching': True,
}]

_FORMAT_IDS = {
Expand Down Expand Up @@ -580,7 +583,7 @@ def _real_extract(self, url):

class CrunchyrollShowPlaylistIE(CrunchyrollBaseIE):
IE_NAME = 'crunchyroll:playlist'
_VALID_URL = r'https?://(?:(?P<prefix>www|m)\.)?(?P<url>crunchyroll\.com/(?!(?:news|anime-news|library|forum|launchcalendar|lineup|store|comics|freetrial|login))(?P<id>[\w\-]+))/?(?:\?|$)'
_VALID_URL = r'https?://(?:(?P<prefix>www|m)\.)?(?P<url>crunchyroll\.com/(?!(?:news|anime-news|library|forum|launchcalendar|lineup|store|comics|freetrial|login|media-\d+))(?P<id>[\w\-]+))/?(?:\?|$)'

_TESTS = [{
'url': 'http://www.crunchyroll.com/a-bridge-to-the-starry-skies-hoshizora-e-kakaru-hashi',
Expand Down

0 comments on commit b2286f8

Please sign in to comment.