projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3d9fae1
)
[pornoxo] Fix test (view count)
author
Philipp Hagemeister
<phihag@phihag.de>
Sat, 13 Sep 2014 05:09:39 +0000
(07:09 +0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Sat, 13 Sep 2014 05:09:39 +0000
(07:09 +0200)
youtube_dl/extractor/pornoxo.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/pornoxo.py
b/youtube_dl/extractor/pornoxo.py
index 0d9656d396e9008106e3cc7f43faff202edea3b6..202f58673ae4f1dd77caee159f37dc24be9aad64 100644
(file)
--- a/
youtube_dl/extractor/pornoxo.py
+++ b/
youtube_dl/extractor/pornoxo.py
@@
-4,10
+4,10
@@
import re
from .common import InfoExtractor
from ..utils import (
from .common import InfoExtractor
from ..utils import (
- parse_duration,
str_to_int,
)
str_to_int,
)
+
class PornoXOIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?pornoxo\.com/videos/(?P<id>\d+)/(?P<display_id>[^/]+)\.html'
_TEST = {
class PornoXOIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?pornoxo\.com/videos/(?P<id>\d+)/(?P<display_id>[^/]+)\.html'
_TEST = {
@@
-44,7
+44,7
@@
class PornoXOIE(InfoExtractor):
r'\'image\'\s*:\s*"([^"]+)"', webpage, 'thumbnail', fatal=False)
view_count = str_to_int(self._html_search_regex(
r'\'image\'\s*:\s*"([^"]+)"', webpage, 'thumbnail', fatal=False)
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(
r'<meta name="description" content=".*featuring\s*([^"]+)"',
categories_str = self._html_search_regex(
r'<meta name="description" content=".*featuring\s*([^"]+)"',
@@
-53,7
+53,6
@@
class PornoXOIE(InfoExtractor):
None if categories_str is None
else categories_str.split(','))
None if categories_str is None
else categories_str.split(','))
-
return {
'id': video_id,
'url': video_url,
return {
'id': video_id,
'url': video_url,