1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2025-01-25 05:57:55 +01:00

[AnimeLab] Extract display_id from url

This commit is contained in:
Mariusz Skoneczko 2017-07-10 10:25:05 +10:00
parent d9ebb79d32
commit b958cb91ee

View File

@ -14,7 +14,7 @@ from ..compat import compat_HTTPError
class AnimeLabIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?animelab\.com/player/.+'
_VALID_URL = r'https?://(?:www\.)?animelab\.com/player/(?P<id>[^/]+)'
# the following tests require authentication, but a free account will suffice
# just set 'netrc' to true in test/local_parameters.json if you use a .netrc file
@ -111,6 +111,8 @@ class AnimeLabIE(InfoExtractor):
self._login()
def _real_extract(self, url):
display_id = self._match_id(url)
webpage = self._download_webpage(url, None, 'Downloading requested URL')
video_collection_str = self._search_regex(r'new\s+?VideoCollection\s*?\((.*?)\);', webpage, 'AnimeLab VideoCollection')
@ -193,6 +195,7 @@ class AnimeLabIE(InfoExtractor):
return {
'id': video_id,
'display_id': display_id,
'title': title,
'description': description,
'series': series,