]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/abc.py
7d89f44ee4e6c5a1607c0567aafa3e2172cebbb1
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-07-25/bringing-asylum-seekers-to-australia-would-give/5624716',
15 'md5': 'dad6f8ad011a70d9ddf887ce6d5d0742',
19 'title': 'Bringing asylum seekers to Australia would give them right to asylum claims: professor',
20 'description': 'md5:ba36fa5e27e5c9251fd929d339aea4af',
24 def _real_extract(self
, url
):
25 mobj
= re
.match(self
._VALID
_URL
, url
)
26 video_id
= mobj
.group('id')
27 webpage
= self
._download
_webpage
(url
, video_id
)
29 urls_info_json
= self
._search
_regex
(
30 r
'inlineVideoData\.push\((.*?)\);', webpage
, 'video urls',
32 urls_info
= json
.loads(urls_info_json
.replace('\'', '"'))
34 'url': url_info
['url'],
35 'width': int(url_info
['width']),
36 'height': int(url_info
['height']),
37 'tbr': int(url_info
['bitrate']),
38 'filesize': int(url_info
['filesize']),
39 } for url_info
in urls_info
]
40 self
._sort
_formats
(formats
)
44 'title': self
._og
_search
_title
(webpage
),
46 'description': self
._og
_search
_description
(webpage
),
47 'thumbnail': self
._og
_search
_thumbnail
(webpage
),