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

ebaumsworld.py (1043B)


  1. from .common import InfoExtractor
  2. class EbaumsWorldIE(InfoExtractor):
  3. _VALID_URL = r'https?://(?:www\.)?ebaumsworld\.com/videos/[^/]+/(?P<id>\d+)'
  4. _TEST = {
  5. 'url': 'http://www.ebaumsworld.com/videos/a-giant-python-opens-the-door/83367677/',
  6. 'info_dict': {
  7. 'id': '83367677',
  8. 'ext': 'mp4',
  9. 'title': 'A Giant Python Opens The Door',
  10. 'description': 'This is how nightmares start...',
  11. 'uploader': 'jihadpizza',
  12. },
  13. }
  14. def _real_extract(self, url):
  15. video_id = self._match_id(url)
  16. config = self._download_xml(
  17. f'http://www.ebaumsworld.com/video/player/{video_id}', video_id)
  18. video_url = config.find('file').text
  19. return {
  20. 'id': video_id,
  21. 'title': config.find('title').text,
  22. 'url': video_url,
  23. 'description': config.find('description').text,
  24. 'thumbnail': config.find('image').text,
  25. 'uploader': config.find('username').text,
  26. }