]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/fox9.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
7 class FOX9IE(InfoExtractor
):
8 _VALID_URL
= r
'https?://(?:www\.)?fox9\.com/video/(?P<id>\d+)'
10 def _real_extract(self
, url
):
11 video_id
= self
._match
_id
(url
)
12 return self
.url_result(
13 'anvato:anvato_epfox_app_web_prod_b3373168e12f423f41504f207000188daf88251b:' + video_id
,
17 class FOX9NewsIE(InfoExtractor
):
18 _VALID_URL
= r
'https?://(?:www\.)?fox9\.com/news/(?P<id>[^/?&#]+)'
20 'url': 'https://www.fox9.com/news/black-bear-in-tree-draws-crowd-in-downtown-duluth-minnesota',
21 'md5': 'd6e1b2572c3bab8a849c9103615dd243',
25 'title': 'Bear climbs tree in downtown Duluth',
26 'description': 'md5:6a36bfb5073a411758a752455408ac90',
28 'timestamp': 1478123580,
29 'upload_date': '20161102',
31 'categories': ['News', 'Sports'],
32 'tags': ['news', 'video'],
36 def _real_extract(self
, url
):
37 display_id
= self
._match
_id
(url
)
38 webpage
= self
._download
_webpage
(url
, display_id
)
39 anvato_id
= self
._search
_regex
(
40 r
'anvatoId\s*:\s*[\'"](\d+)', webpage, 'anvato id')
41 return self.url_result('https://www.fox9.com/video/' + anvato_id, 'FOX9')