mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[nationalgeographics] Fix extraction (Closes #6262)
This commit is contained in:
parent
0696667734
commit
f29ac588dd
1 changed files with 5 additions and 2 deletions
|
@ -25,8 +25,11 @@ def _real_extract(self, url):
|
||||||
name = url_basename(url)
|
name = url_basename(url)
|
||||||
|
|
||||||
webpage = self._download_webpage(url, name)
|
webpage = self._download_webpage(url, name)
|
||||||
feed_url = self._search_regex(r'data-feed-url="([^"]+)"', webpage, 'feed url')
|
feed_url = self._search_regex(
|
||||||
guid = self._search_regex(r'data-video-guid="([^"]+)"', webpage, 'guid')
|
r'data-feed-url="([^"]+)"', webpage, 'feed url')
|
||||||
|
guid = self._search_regex(
|
||||||
|
r'id="(?:videoPlayer|player-container)"[^>]+data-guid="([^"]+)"',
|
||||||
|
webpage, 'guid')
|
||||||
|
|
||||||
feed = self._download_xml('%s?byGuid=%s' % (feed_url, guid), name)
|
feed = self._download_xml('%s?byGuid=%s' % (feed_url, guid), name)
|
||||||
content = feed.find('.//{http://search.yahoo.com/mrss/}content')
|
content = feed.find('.//{http://search.yahoo.com/mrss/}content')
|
||||||
|
|
Loading…
Reference in a new issue