mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-22 18:22:21 +00:00
[pornoxo] Fix test (view count)
This commit is contained in:
parent
3d9fae1ed2
commit
f4a3490cbc
1 changed files with 2 additions and 3 deletions
|
@ -4,10 +4,10 @@ import re
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
parse_duration,
|
|
||||||
str_to_int,
|
str_to_int,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class PornoXOIE(InfoExtractor):
|
class PornoXOIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:www\.)?pornoxo\.com/videos/(?P<id>\d+)/(?P<display_id>[^/]+)\.html'
|
_VALID_URL = r'https?://(?:www\.)?pornoxo\.com/videos/(?P<id>\d+)/(?P<display_id>[^/]+)\.html'
|
||||||
_TEST = {
|
_TEST = {
|
||||||
|
@ -44,7 +44,7 @@ class PornoXOIE(InfoExtractor):
|
||||||
r'\'image\'\s*:\s*"([^"]+)"', webpage, 'thumbnail', fatal=False)
|
r'\'image\'\s*:\s*"([^"]+)"', webpage, 'thumbnail', fatal=False)
|
||||||
|
|
||||||
view_count = str_to_int(self._html_search_regex(
|
view_count = str_to_int(self._html_search_regex(
|
||||||
r'Views:\s*(\d+)', webpage, 'view count', fatal=False))
|
r'[vV]iews:\s*([0-9,]+)', webpage, 'view count', fatal=False))
|
||||||
|
|
||||||
categories_str = self._html_search_regex(
|
categories_str = self._html_search_regex(
|
||||||
r'<meta name="description" content=".*featuring\s*([^"]+)"',
|
r'<meta name="description" content=".*featuring\s*([^"]+)"',
|
||||||
|
@ -53,7 +53,6 @@ class PornoXOIE(InfoExtractor):
|
||||||
None if categories_str is None
|
None if categories_str is None
|
||||||
else categories_str.split(','))
|
else categories_str.split(','))
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
|
|
Loading…
Reference in a new issue