1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-13 01:07:21 +08:00

[NxLoad] Fixes

This commit is contained in:
kr4ssi 2019-02-19 22:35:42 +01:00
parent d5ec9d76cd
commit 536a1f81e8

View File

@ -7,24 +7,22 @@ from ..utils import (js_to_json)
class NxLoadIE(InfoExtractor): class NxLoadIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?nxload\.com/(?:embed-)?(?P<id>\w+)\.html' _VALID_URL = r'https?://(?:www\.)?nxload\.com/(?:embed-)?(?P<id>\w+)'
_TESTS = [ _TESTS = [
{ {
'url': 'https://nxload.com/embed-w9uwujpk2na7.html', 'url': 'https://nxload.com/embed-w9uwujpk2na7.html',
'file': 'pso-kkk-1080p-w9uwujpk2na7.mp4',
'md5': '955afd4f8f2c019bc4f116897346e3f9', 'md5': '955afd4f8f2c019bc4f116897346e3f9',
'info_dict': { 'info_dict': {
'id': 'w9uwujpk2na7', 'id': 'w9uwujpk2na7',
'ext': 'mp4', 'ext': 'mp4',
'title': 'pso-firstman web 1080p', 'title': 'pso firstman web 1080p mkv',
'thumbnail': 're:^https://\w+.nxload.com/i/\d{2}/\d{5}/\w+.jpg$', 'thumbnail': 're:^https://\w+.nxload.com/i/\d{2}/\d{5}/\w+.jpg$',
'url': 're:^https://\w+.nxload.com/[,\w]+/v.mp4$' 'url': 're:^https://\w+.nxload.com/[,\w]+/v.mp4$'
} }
}, },
{ {
'url': 'https://nxload.com/qhwxcxj5ah56.html', 'url': 'https://nxload.com/qhwxcxj5ah56.html',
'file': 'pso kkk 1080p mkv-qhwxcxj5ah56.mp4',
'md5': '983814ba610cd26ddd0819cd6d26ab68', 'md5': '983814ba610cd26ddd0819cd6d26ab68',
'info_dict': { 'info_dict': {
'id': 'qhwxcxj5ah56', 'id': 'qhwxcxj5ah56',
@ -36,19 +34,6 @@ class NxLoadIE(InfoExtractor):
}, },
{ {
'url': 'https://nxload.com/embed-ig0ud2p3h57l.html', 'url': 'https://nxload.com/embed-ig0ud2p3h57l.html',
'file': 'ig0ud2p3h57l-ig0ud2p3h57l.mp4',
'md5': 'ab3a79c831fccfd8a34c77775082c694',
'info_dict': {
'id': 'ig0ud2p3h57l',
'ext': 'mp4',
'title': 'ig0ud2p3h57l',
'thumbnail': 're:^https://\w+.nxload.com/i/\d{2}/\d{5}/\w+.jpg',
'url': 're:^https://\w+.nxload.com/[,\w]+/v.mp4$'
}
},
{
'url': 'https://nxload.com/ig0ud2p3h57l.html',
'file': 'streams org Noragami S1E01 German DTS 1080p Blu Ray x264 mkv-ig0ud2p3h57l.mp4',
'md5': 'ab3a79c831fccfd8a34c77775082c694', 'md5': 'ab3a79c831fccfd8a34c77775082c694',
'info_dict': { 'info_dict': {
'id': 'ig0ud2p3h57l', 'id': 'ig0ud2p3h57l',
@ -62,7 +47,7 @@ class NxLoadIE(InfoExtractor):
def _real_extract(self, url): def _real_extract(self, url):
video_id = self._match_id(url) video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id) webpage = self._download_webpage('https://nxload.com/' + video_id, video_id)
title = self._html_search_regex(r'<title>Watch ([^<]+)</title>', webpage, 'title', '') title = self._html_search_regex(r'<title>Watch ([^<]+)</title>', webpage, 'title', '')
alt_title = self._html_search_regex(r'<div class="filename">([^<]+)', webpage, 'title', video_id) alt_title = self._html_search_regex(r'<div class="filename">([^<]+)', webpage, 'title', video_id)