]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/abc.py
dc0fb85d6048962505d1d207ae590940d69f52e6
1 from __future__
import unicode_literals
6 from .common
import InfoExtractor
9 class ABCIE(InfoExtractor
):
10 IE_NAME
= 'abc.net.au'
11 _VALID_URL
= r
'http://www\.abc\.net\.au/news/[^/]+/[^/]+/(?P<id>\d+)'
14 'url': 'http://www.abc.net.au/news/2014-11-05/australia-to-staff-ebola-treatment-centre-in-sierra-leone/5868334',
15 'md5': 'cb3dd03b18455a661071ee1e28344d9f',
19 'title': 'Australia to help staff Ebola treatment centre in Sierra Leone',
20 'description': 'md5:809ad29c67a05f54eb41f2a105693a67',
24 def _real_extract(self
, url
):
25 video_id
= self
._match
_id
(url
)
26 webpage
= self
._download
_webpage
(url
, video_id
)
28 urls_info_json
= self
._search
_regex
(
29 r
'inlineVideoData\.push\((.*?)\);', webpage
, 'video urls',
31 urls_info
= json
.loads(urls_info_json
.replace('\'', '"'))
33 'url': url_info
['url'],
34 'width': int(url_info
['width']),
35 'height': int(url_info
['height']),
36 'tbr': int(url_info
['bitrate']),
37 'filesize': int(url_info
['filesize']),
38 } for url_info
in urls_info
]
39 self
._sort
_formats
(formats
)
43 'title': self
._og
_search
_title
(webpage
),
45 'description': self
._og
_search
_description
(webpage
),
46 'thumbnail': self
._og
_search
_thumbnail
(webpage
),