mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-29 19:47:54 +01:00
[allmovie] Add .pro domain support.
This commit is contained in:
parent
a099a54522
commit
b0a9114e59
@ -1,17 +1,23 @@
|
|||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
try:
|
||||||
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
|
except ImportError: # py2
|
||||||
|
from urlparse import urlparse
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
|
||||||
|
|
||||||
class AllmovieIE(InfoExtractor):
|
class AllmovieIE(InfoExtractor):
|
||||||
"""Information extractor for allmovie.tv
|
"""Information extractor for allmovie.
|
||||||
|
|
||||||
Test with:
|
Test with:
|
||||||
python test/test_download.py TestDownload.test_Allmovie
|
python test/test_download.py TestDownload.test_Allmovie
|
||||||
|
|
||||||
"""
|
"""
|
||||||
_VALID_URL = r'http://allmovie\.tv/video/.+-(?P<id>\d+)\.html'
|
_VALID_URL = r'http://allmovie\.(tv|pro)/video/.+-(?P<id>\d+)\.html'
|
||||||
|
|
||||||
_TEST = {
|
_TEST = {
|
||||||
'url': 'http://allmovie.tv/video/vesti-v-subbotu-28-10-2017-17255.html',
|
'url': 'http://allmovie.tv/video/vesti-v-subbotu-28-10-2017-17255.html',
|
||||||
@ -30,8 +36,10 @@ class AllmovieIE(InfoExtractor):
|
|||||||
|
|
||||||
page_info = self._download_webpage(url, video_id, note='Downloading info page ...')
|
page_info = self._download_webpage(url, video_id, note='Downloading info page ...')
|
||||||
|
|
||||||
|
host = urlparse(url).hostname
|
||||||
|
|
||||||
page_player = self._download_webpage(
|
page_player = self._download_webpage(
|
||||||
'http://allmovie.tv/video/show_player/%s' % video_id, video_id,
|
'http://%s/video/show_player/%s' % (host, video_id), video_id,
|
||||||
headers={'X-Requested-With': 'XMLHttpRequest'},
|
headers={'X-Requested-With': 'XMLHttpRequest'},
|
||||||
note='Downloading player page ...')
|
note='Downloading player page ...')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user