]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/funk.py
ce5c67fbbb7100a35174836aee4e51e20b96be11
   2 from __future__ 
import unicode_literals
 
   4 from .common 
import InfoExtractor
 
   5 from .nexx 
import NexxIE
 
   6 from ..utils 
import extract_attributes
 
   9 class FunkIE(InfoExtractor
): 
  10     _VALID_URL 
= r
'https?://(?:www\.)?funk\.net/(?:mix|channel)/(?:[^/]+/)*(?P<id>[^?/#]+)' 
  12         'url': 'https://www.funk.net/mix/59d65d935f8b160001828b5b/0/59d517e741dca10001252574/', 
  13         'md5': '4d40974481fa3475f8bccfd20c5361f8', 
  17             'title': 'Neue Rechte Welle', 
  18             'description': 'md5:a30a53f740ffb6bfd535314c2cc5fb69', 
  19             'timestamp': 1501337639, 
  20             'upload_date': '20170729', 
  23             'format': 'bestvideo', 
  24             'skip_download': True, 
  27         'url': 'https://www.funk.net/channel/59d5149841dca100012511e3/0/59d52049999264000182e79d/', 
  28         'only_matching': True, 
  31     def _real_extract(self
, url
): 
  32         video_id 
= self
._match
_id
(url
) 
  34         webpage 
= self
._download
_webpage
(url
, video_id
) 
  36         domain_id 
= NexxIE
._extract
_domain
_id
(webpage
) or '741' 
  37         nexx_id 
= extract_attributes(self
._search
_regex
( 
  38             r
'(<div[^>]id=["\']mediaplayer
-funk
[^
>]+>)', 
  39             webpage, 'media player
'))['data
-id'] 
  41         return self.url_result( 
  42             'nexx
:%s:%s' % (domain_id, nexx_id), ie=NexxIE.ie_key(),