Sergey M․
8 years ago
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D
1 changed files with
13 additions and
0 deletions
-
youtube_dl/extractor/eagleplatform.py
|
|
@ -52,11 +52,24 @@ class EaglePlatformIE(InfoExtractor): |
|
|
|
|
|
|
|
@staticmethod |
|
|
|
def _extract_url(webpage): |
|
|
|
# Regular iframe embedding |
|
|
|
mobj = re.search( |
|
|
|
r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//.+?\.media\.eagleplatform\.com/index/player\?.+?)\1', |
|
|
|
webpage) |
|
|
|
if mobj is not None: |
|
|
|
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 |
|
|
|
def _handle_error(response): |
|
|
|