fixed flake8 warnings
This commit is contained in:
parent
03f0f7c437
commit
1eab6d337c
@ -297,6 +297,7 @@ class DRTVIE(InfoExtractor):
|
|||||||
'release_year': int_or_none(data.get('ProductionYear')),
|
'release_year': int_or_none(data.get('ProductionYear')),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class DRTVPlaylistIE(InfoExtractor):
|
class DRTVPlaylistIE(InfoExtractor):
|
||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
https?://
|
https?://
|
||||||
@ -308,10 +309,10 @@ class DRTVPlaylistIE(InfoExtractor):
|
|||||||
_TEST = {
|
_TEST = {
|
||||||
'url': 'https://www.dr.dk/drtv/serie/spise-med-price_43537',
|
'url': 'https://www.dr.dk/drtv/serie/spise-med-price_43537',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'spise-med-price',
|
'id': 'spise-med-price_43537',
|
||||||
'title': 'Spise med Price'
|
'title': 'Spise med Price'
|
||||||
},
|
},
|
||||||
'playlist_mincount': 6,
|
'playlist_mincount': 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -329,7 +330,7 @@ class DRTVPlaylistIE(InfoExtractor):
|
|||||||
episodes = episodes + self._extract_episode_from_season(season_url)
|
episodes = episodes + self._extract_episode_from_season(season_url)
|
||||||
|
|
||||||
return episodes
|
return episodes
|
||||||
|
|
||||||
def _extract_episode_from_season(self, url):
|
def _extract_episode_from_season(self, url):
|
||||||
display_id = self._match_id(url)
|
display_id = self._match_id(url)
|
||||||
webpage = self._download_webpage(url, display_id)
|
webpage = self._download_webpage(url, display_id)
|
||||||
@ -342,15 +343,13 @@ class DRTVPlaylistIE(InfoExtractor):
|
|||||||
|
|
||||||
return episodes
|
return episodes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
playlist_id = self._match_id(url)
|
playlist_id = self._match_id(url)
|
||||||
webpage = self._download_webpage(url, playlist_id)
|
webpage = self._download_webpage(url, playlist_id)
|
||||||
|
|
||||||
title = self._html_search_regex(
|
title = self._html_search_regex(
|
||||||
r'<h1 class=".*?hero__title".*?>(.+?)</h1>', webpage,
|
r'<h1 class=".*?hero__title".*?>(.+?)</h1>', webpage,
|
||||||
'title', default=None)
|
'title', default=None)
|
||||||
|
|
||||||
if title:
|
if title:
|
||||||
title = re.sub(r'\s*\|\s*.+?$', '', title)
|
title = re.sub(r'\s*\|\s*.+?$', '', title)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user