mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-13 14:37:43 +01:00
[eagleplatform] Improve detection of embedded videos (Closes #10409)
This commit is contained in:
parent
7367bdef23
commit
3083e4dc07
@ -52,11 +52,24 @@ class EaglePlatformIE(InfoExtractor):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _extract_url(webpage):
|
def _extract_url(webpage):
|
||||||
|
# Regular iframe embedding
|
||||||
mobj = re.search(
|
mobj = re.search(
|
||||||
r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//.+?\.media\.eagleplatform\.com/index/player\?.+?)\1',
|
r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//.+?\.media\.eagleplatform\.com/index/player\?.+?)\1',
|
||||||
webpage)
|
webpage)
|
||||||
if mobj is not None:
|
if mobj is not None:
|
||||||
return mobj.group('url')
|
return mobj.group('url')
|
||||||
|
# Basic usage embedding (see http://dultonmedia.github.io/eplayer/)
|
||||||
|
mobj = re.search(
|
||||||
|
r'''(?xs)
|
||||||
|
<script[^>]+
|
||||||
|
src=(?P<q1>["\'])(?:https?:)?//(?P<host>.+?\.media\.eagleplatform\.com)/player/player\.js(?P=q1)
|
||||||
|
.+?
|
||||||
|
<div[^>]+
|
||||||
|
class=(?P<q2>["\'])eagleplayer(?P=q2)[^>]+
|
||||||
|
data-id=["\'](?P<id>\d+)
|
||||||
|
''', webpage)
|
||||||
|
if mobj is not None:
|
||||||
|
return 'eagleplatform:%(host)s:%(id)s' % mobj.groupdict()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _handle_error(response):
|
def _handle_error(response):
|
||||||
|
Loading…
Reference in New Issue
Block a user