Fixed requests
Removed test sorted util imports edited duration regex
This commit is contained in:
parent
547471ead5
commit
f0bc4aa39c
@ -1,12 +1,15 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..utils import (urljoin, parse_duration)
|
||||
from ..utils import (
|
||||
parse_duration,
|
||||
urljoin
|
||||
)
|
||||
|
||||
|
||||
class YourPornIE(InfoExtractor):
|
||||
_VALID_URL = r'https?://(?:www\.)?yourporn\.sexy/post/(?P<id>[^/?#&.]+)'
|
||||
_TESTS = [{
|
||||
_TEST = {
|
||||
'url': 'https://yourporn.sexy/post/57ffcb2e1179b.html',
|
||||
'md5': '6f8682b6464033d87acaa7a8ff0c092e',
|
||||
'info_dict': {
|
||||
@ -16,19 +19,7 @@ class YourPornIE(InfoExtractor):
|
||||
'thumbnail': r're:^https?://.*\.jpg$',
|
||||
'age_limit': 18
|
||||
},
|
||||
}, {
|
||||
'url': 'https://yourporn.sexy/post/5c2d2fde03bc5.html',
|
||||
'md5': '3b2323fb429d3f559a11b3f22f4754af',
|
||||
'info_dict': {
|
||||
'id': '5c2d2fde03bc5',
|
||||
'ext': 'mp4',
|
||||
'title': 'Busty 7 - Nubile Films (2018) - Chanel Preston, '
|
||||
'Crystal Swift, Jennifer Amton, Shay Evan',
|
||||
'thumbnail': r're:^https?://.*\.jpg$',
|
||||
'age_limit': 18,
|
||||
'duration': 5403
|
||||
}
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
video_id = self._match_id(url)
|
||||
@ -47,7 +38,7 @@ class YourPornIE(InfoExtractor):
|
||||
|
||||
thumbnail = self._og_search_thumbnail(webpage)
|
||||
|
||||
duration = parse_duration(self._search_regex(r'Video Info -> duration:<b>([0-9:]+)</b>',
|
||||
duration = parse_duration(self._search_regex(r'duration:[^0-9]*([0-9:]+)',
|
||||
webpage, 'duration', default=None))
|
||||
return {
|
||||
'id': video_id,
|
||||
|
Loading…
x
Reference in New Issue
Block a user