class YappyIE(InfoExtractor):
+ _WORKING = False
_VALID_URL = r'https?://yappy\.media/video/(?P<id>\w+)'
_TESTS = [{
'url': 'https://yappy.media/video/47fea6d8586f48d1a0cf96a7342aabd2',
'categories': ['Образование и наука', 'Лайфхак', 'Технологии', 'Арт/искусство'],
'repost_count': int,
'uploader': 'YAPPY',
- }
+ },
}, {
'url': 'https://yappy.media/video/3862451954ad4bd58ae2ccefddb0bd33',
'info_dict': {
'uploader': 'LENA SHTURMAN',
'upload_date': '20230126',
'thumbnail': 'https://cdn-st.ritm.media/static/pic/user_thumbnails/6e76bb4bbad640b6/9ec84c115b2b1967/1674716171.jpg',
- }
+ },
}]
def _real_extract(self, url):
'url': media_url,
'ext': 'mp4',
'format_note': 'Watermarked' if has_watermark else None,
- 'preference': -10 if has_watermark else None
+ 'preference': -10 if has_watermark else None,
}] if media_url else []
if has_watermark:
formats.append({
'url': media_url.replace('-wm.mp4', '.mp4'),
- 'ext': 'mp4'
+ 'ext': 'mp4',
})
audio_link = traverse_obj(media_data, ('audio', 'link'))
'url': audio_link,
'ext': 'mp3',
'acodec': 'mp3',
- 'vcodec': 'none'
+ 'vcodec': 'none',
})
return {
'uploader': traverse_obj(media_data, ('creator', 'firstName')),
'uploader_id': traverse_obj(media_data, ('creator', ('uuid', 'nickname')), get_all=False),
'categories': traverse_obj(media_data, ('categories', ..., 'name')) or None,
- 'repost_count': int_or_none(media_data.get('sharingCount'))
+ 'repost_count': int_or_none(media_data.get('sharingCount')),
}