funk.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. from .common import InfoExtractor
  2. from .nexx import NexxIE
  3. class FunkIE(InfoExtractor):
  4. _VALID_URL = r'https?://(?:www\.|origin\.)?funk\.net/(?:channel|playlist)/[^/]+/(?P<display_id>[0-9a-z-]+)-(?P<id>\d+)'
  5. _TESTS = [{
  6. 'url': 'https://www.funk.net/channel/ba-793/die-lustigsten-instrumente-aus-dem-internet-teil-2-1155821',
  7. 'md5': '8610449476156f338761a75391b0017d',
  8. 'info_dict': {
  9. 'id': '1155821',
  10. 'ext': 'mp4',
  11. 'title': 'Die LUSTIGSTEN INSTRUMENTE aus dem Internet - Teil 2',
  12. 'description': 'md5:2a03b67596eda0d1b5125c299f45e953',
  13. 'timestamp': 1514507395,
  14. 'upload_date': '20171229',
  15. 'duration': 426.0,
  16. 'cast': ['United Creators PMB GmbH'],
  17. 'thumbnail': 'https://assets.nexx.cloud/media/75/56/79/3YKUSJN1LACN0CRxL.jpg',
  18. 'display_id': 'die-lustigsten-instrumente-aus-dem-internet-teil-2',
  19. 'alt_title': 'Die LUSTIGSTEN INSTRUMENTE aus dem Internet Teil 2',
  20. 'season_number': 0,
  21. 'season': 'Season 0',
  22. 'episode_number': 0,
  23. 'episode': 'Episode 0',
  24. },
  25. }, {
  26. 'url': 'https://www.funk.net/playlist/neuesteVideos/kameras-auf-dem-fusion-festival-1618699',
  27. 'only_matching': True,
  28. }]
  29. def _real_extract(self, url):
  30. display_id, nexx_id = self._match_valid_url(url).groups()
  31. return {
  32. '_type': 'url_transparent',
  33. 'url': f'nexx:741:{nexx_id}',
  34. 'ie_key': NexxIE.ie_key(),
  35. 'id': nexx_id,
  36. 'display_id': display_id,
  37. }