Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backups
youtube-dl
Commits
a846173d
Unverified
Commit
a846173d
authored
May 28, 2017
by
Sergey M․
Browse files
[xhamster] Simplify (closes #13216)
parent
78e210de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
youtube_dl/extractor/xhamster.py
youtube_dl/extractor/xhamster.py
+2
-2
No files found.
youtube_dl/extractor/xhamster.py
View file @
a846173d
...
...
@@ -108,7 +108,7 @@ class XHamsterIE(InfoExtractor):
webpage
,
'upload date'
,
fatal
=
False
))
uploader
=
self
.
_html_search_regex
(
r
'<span[^>]+
?
itemprop=["\']author[^>]+
?
><a[^>]+
?href=["\'][^>]+?><span[^>]+?itemprop=["\']name
[^
>
]+
?>(.+?)</span
'
,
r
'<span[^>]+itemprop=["\']author[^>]+><a[^>]+
><span[^>]+>(
[^
<
]+
)
'
,
webpage
,
'uploader'
,
default
=
'anonymous'
)
thumbnail
=
self
.
_search_regex
(
...
...
@@ -124,7 +124,7 @@ class XHamsterIE(InfoExtractor):
r
'content=["\']User(?:View|Play)s:(\d+)'
,
webpage
,
'view count'
,
fatal
=
False
))
mobj
=
re
.
search
(
r
'hint=[\'"](?P<likecount>\d+) Likes / (?P<dislikecount>\d+) Dislikes
[\'"]
'
,
webpage
)
mobj
=
re
.
search
(
r
'hint=[\'"](?P<likecount>\d+) Likes / (?P<dislikecount>\d+) Dislikes'
,
webpage
)
(
like_count
,
dislike_count
)
=
(
mobj
.
group
(
'likecount'
),
mobj
.
group
(
'dislikecount'
))
if
mobj
else
(
None
,
None
)
mobj
=
re
.
search
(
r
'</label>Comments \((?P<commentcount>\d+)\)</div>'
,
webpage
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment