]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/firstpost.py
7e3d1afd215bfc8ef39c6751e116def05bf858ed
1 from __future__
import unicode_literals
5 from . common
import InfoExtractor
8 class FirstpostIE ( InfoExtractor
):
9 IE_NAME
= 'Firstpost.com'
10 _VALID_URL
= r
'http://(?:www\.)?firstpost\.com/[^/]+/.*-(?P<id>[0-9]+)\.html'
13 'url' : 'http://www.firstpost.com/india/india-to-launch-indigenous-aircraft-carrier-monday-1025403.html' ,
14 'md5' : 'ee9114957692f01fb1263ed87039112a' ,
18 'title' : 'India to launch indigenous aircraft carrier INS Vikrant today' ,
19 'description' : 'Its flight deck is over twice the size of a football field, its power unit can light up the entire Kochi city and the cabling is enough to cover the distance between here to Delhi.' ,
23 def _real_extract ( self
, url
):
24 mobj
= re
. match ( self
._ VALID
_U RL
, url
)
25 video_id
= mobj
. group ( 'id' )
27 webpage
= self
._ download
_ webpage
( url
, video_id
)
28 video_url
= self
._ html
_ search
_ regex
(
29 r
'<div.*?name="div_video".*?flashvars="([^"]+)">' ,
35 'title' : self
._ og
_ search
_ title
( webpage
),
36 'description' : self
._ og
_ search
_ description
( webpage
),
37 'thumbnail' : self
._ og
_ search
_ thumbnail
( webpage
),