[ie/soundcloud] Various fixes (#11820)
[yt-dlp.git] / yt_dlp / extractor / videofyme.py
blob6cdda75b2f3b4f8810791167e00b255025d6adea
1 from .common import InfoExtractor
2 from ..utils import (
3 int_or_none,
4 parse_iso8601,
8 class VideofyMeIE(InfoExtractor):
9 _WORKING = False
10 _VALID_URL = r'https?://(?:www\.videofy\.me/.+?|p\.videofy\.me/v)/(?P<id>\d+)(&|#|$)'
11 IE_NAME = 'videofy.me'
13 _TEST = {
14 'url': 'http://www.videofy.me/thisisvideofyme/1100701',
15 'md5': 'c77d700bdc16ae2e9f3c26019bd96143',
16 'info_dict': {
17 'id': '1100701',
18 'ext': 'mp4',
19 'title': 'This is VideofyMe',
20 'description': '',
21 'upload_date': '20130326',
22 'timestamp': 1364288959,
23 'uploader': 'VideofyMe',
24 'uploader_id': 'thisisvideofyme',
25 'view_count': int,
26 'like_count': int,
27 'comment_count': int,
31 def _real_extract(self, url):
32 video_id = self._match_id(url)
34 config = self._download_json(f'http://vf-player-info-loader.herokuapp.com/{video_id}.json', video_id)['videoinfo']
36 video = config.get('video')
37 blog = config.get('blog', {})
39 return {
40 'id': video_id,
41 'title': video['title'],
42 'url': video['sources']['source']['url'],
43 'thumbnail': video.get('thumb'),
44 'description': video.get('description'),
45 'timestamp': parse_iso8601(video.get('date')),
46 'uploader': blog.get('name'),
47 'uploader_id': blog.get('identifier'),
48 'view_count': int_or_none(self._search_regex(r'([0-9]+)', video.get('views'), 'view count', fatal=False)),
49 'like_count': int_or_none(video.get('likes')),
50 'comment_count': int_or_none(video.get('nrOfComments')),