]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/sztvhu.py
1 from . common
import InfoExtractor
4 class SztvHuIE ( InfoExtractor
):
5 _VALID_URL
= r
'https?://(?:(?:www\.)?sztv\.hu|www\.tvszombathely\.hu)/(?:[^/]+)/.+-(?P<id>[0-9]+)'
7 'url' : 'http://sztv.hu/hirek/cserkeszek-nepszerusitettek-a-kornyezettudatos-eletmodot-a-savaria-teren-20130909' ,
8 'md5' : 'a6df607b11fb07d0e9f2ad94613375cb' ,
12 'title' : 'Cserkészek népszerűsítették a környezettudatos életmódot a Savaria téren' ,
13 'description' : 'A zöld nap játékos ismeretterjesztő programjait a Magyar Cserkész Szövetség szervezte, akik az ország nyolc városában adják át tudásukat az érdeklődőknek. A PET...' ,
17 def _real_extract ( self
, url
):
18 video_id
= self
._ match
_ id
( url
)
19 webpage
= self
._ download
_ webpage
( url
, video_id
)
20 video_file
= self
._ search
_ regex
(
21 r
'file: "...:(.*?)",' , webpage
, 'video file' )
22 title
= self
._ html
_ search
_ regex
(
23 r
'<meta name="title" content="([^"]*?) - [^-]*? - [^-]*?"' ,
24 webpage
, 'video title' )
25 description
= self
._ html
_ search
_ regex
(
26 r
'<meta name="description" content="([^"]*)"/>' ,
27 webpage
, 'video description' , fatal
= False )
28 thumbnail
= self
._ og
_ search
_ thumbnail
( webpage
)
30 video_url
= 'http://media.sztv.hu/vod/' + video_file
36 'description' : description
,
37 'thumbnail' : thumbnail
,