You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.4 KiB

  1. # coding: utf-8
  2. from __future__ import unicode_literals
  3. from .common import InfoExtractor
  4. class BIQLEIE(InfoExtractor):
  5. _VALID_URL = r'https?://(?:www\.)?biqle\.(?:com|org|ru)/watch/(?P<id>-?\d+_\d+)'
  6. _TESTS = [{
  7. 'url': 'http://www.biqle.ru/watch/847655_160197695',
  8. 'md5': 'ad5f746a874ccded7b8f211aeea96637',
  9. 'info_dict': {
  10. 'id': '160197695',
  11. 'ext': 'mp4',
  12. 'title': 'Foo Fighters - The Pretender (Live at Wembley Stadium)',
  13. 'uploader': 'Andrey Rogozin',
  14. 'upload_date': '20110605',
  15. }
  16. }, {
  17. 'url': 'https://biqle.org/watch/-44781847_168547604',
  18. 'md5': '7f24e72af1db0edf7c1aaba513174f97',
  19. 'info_dict': {
  20. 'id': '168547604',
  21. 'ext': 'mp4',
  22. 'title': 'Ребенок в шоке от автоматической мойки',
  23. 'uploader': 'Dmitry Kotov',
  24. },
  25. 'skip': ' This video was marked as adult. Embedding adult videos on external sites is prohibited.',
  26. }]
  27. def _real_extract(self, url):
  28. video_id = self._match_id(url)
  29. webpage = self._download_webpage(url, video_id)
  30. embed_url = self._proto_relative_url(self._search_regex(
  31. r'<iframe.+?src="((?:http:)?//daxab\.com/[^"]+)".*?></iframe>', webpage, 'embed url'))
  32. return {
  33. '_type': 'url_transparent',
  34. 'url': embed_url,
  35. }