1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-04 01:13:02 +08:00

[DagbladetArticle] Simplify extraction

This commit is contained in:
Déstin Reed 2016-06-26 01:49:05 +02:00
parent dcfe3eedf5
commit 3435358c9b

View File

@ -95,13 +95,8 @@ class DagbladetArticleIE(InfoExtractor):
def _real_extract(self, url):
article_id = self._match_id(url)
webpage = self._download_webpage(url, article_id)
iframe_urls = re.findall(r'<iframe src="([^"]+(?:lazy)?player[^"]+)"', webpage)
if len(iframe_urls) == 1:
return self.url_result(self._proto_relative_url(iframe_urls), DBTVIE)
entries = [self.url_result(self._proto_relative_url(iframe_url))
for iframe_url in iframe_urls]
return self.playlist_result(entries, article_id, self._og_search_title(webpage))