projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
07fbfef
)
[pornhd] Extract like count
author
JChris246
<43832407+JChris246@users.noreply.github.com>
Mon, 4 Feb 2019 17:06:04 +0000
(13:06 -0400)
committer
Sergey M
<dstftw@gmail.com>
Mon, 4 Feb 2019 17:06:04 +0000
(
00:06
+0700)
youtube_dl/extractor/pornhd.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/pornhd.py
b/youtube_dl/extractor/pornhd.py
index b52879c7a444fef98b2354660025958a7c5ce180..a079cd32a2b474af9589a4b3763b36df18206b8b 100644
(file)
--- a/
youtube_dl/extractor/pornhd.py
+++ b/
youtube_dl/extractor/pornhd.py
@@
-23,6
+23,7
@@
class PornHdIE(InfoExtractor):
'description': 'md5:3748420395e03e31ac96857a8f125b2b',
'thumbnail': r're:^https?://.*\.jpg',
'view_count': int,
'description': 'md5:3748420395e03e31ac96857a8f125b2b',
'thumbnail': r're:^https?://.*\.jpg',
'view_count': int,
+ 'like_count': int,
'age_limit': 18,
}
}, {
'age_limit': 18,
}
}, {
@@
-37,6
+38,7
@@
class PornHdIE(InfoExtractor):
'description': 'md5:8ff0523848ac2b8f9b065ba781ccf294',
'thumbnail': r're:^https?://.*\.jpg',
'view_count': int,
'description': 'md5:8ff0523848ac2b8f9b065ba781ccf294',
'thumbnail': r're:^https?://.*\.jpg',
'view_count': int,
+ 'like_count': int,
'age_limit': 18,
},
'skip': 'Not available anymore',
'age_limit': 18,
},
'skip': 'Not available anymore',
@@
-85,6
+87,11
@@
class PornHdIE(InfoExtractor):
r"poster'?\s*:\s*([\"'])(?P<url>(?:(?!\1).)+)\1", webpage,
'thumbnail', fatal=False, group='url')
r"poster'?\s*:\s*([\"'])(?P<url>(?:(?!\1).)+)\1", webpage,
'thumbnail', fatal=False, group='url')
+ like_count = int_or_none(self._search_regex(
+ (r'(\d+)\s*</11[^>]+>(?: |\s)*\blikes',
+ r'class=["\']save-count["\'][^>]*>\s*(\d+)'),
+ webpage, 'like count', fatal=False))
+
return {
'id': video_id,
'display_id': display_id,
return {
'id': video_id,
'display_id': display_id,
@@
-92,6
+99,7
@@
class PornHdIE(InfoExtractor):
'description': description,
'thumbnail': thumbnail,
'view_count': view_count,
'description': description,
'thumbnail': thumbnail,
'view_count': view_count,
+ 'like_count': like_count,
'formats': formats,
'age_limit': 18,
}
'formats': formats,
'age_limit': 18,
}