logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

bundesliga.py (1348B)


  1. from .common import InfoExtractor
  2. from .jwplatform import JWPlatformIE
  3. class BundesligaIE(InfoExtractor):
  4. _VALID_URL = r'https?://(?:www\.)?bundesliga\.com/[a-z]{2}/bundesliga/videos(?:/[^?]+)?\?vid=(?P<id>[a-zA-Z0-9]{8})'
  5. _TESTS = [
  6. {
  7. 'url': 'https://www.bundesliga.com/en/bundesliga/videos?vid=bhhHkKyN',
  8. 'md5': '8fc3b25cd12440e3a8cdc51f1493849c',
  9. 'info_dict': {
  10. 'id': 'bhhHkKyN',
  11. 'ext': 'mp4',
  12. 'title': 'Watch: Alphonso Davies and Jeremie Frimpong head-to-head',
  13. 'thumbnail': 'https://cdn.jwplayer.com/v2/media/bhhHkKyN/poster.jpg?width=720',
  14. 'upload_date': '20220928',
  15. 'duration': 146,
  16. 'timestamp': 1664366511,
  17. 'description': 'md5:803d4411bd134140c774021dd4b7598b',
  18. },
  19. },
  20. {
  21. 'url': 'https://www.bundesliga.com/en/bundesliga/videos/latest-features/T8IKc8TX?vid=ROHjs06G',
  22. 'only_matching': True,
  23. },
  24. {
  25. 'url': 'https://www.bundesliga.com/en/bundesliga/videos/goals?vid=mOG56vWA',
  26. 'only_matching': True,
  27. },
  28. ]
  29. def _real_extract(self, url):
  30. video_id = self._match_id(url)
  31. return self.url_result(f'jwplatform:{video_id}', JWPlatformIE, video_id)