[pornhub] Fix like and dislike count extraction (closes #27227) (#27234)
authorJChris246 <43832407+JChris246@users.noreply.github.com>
Sat, 28 Nov 2020 19:32:13 +0000 (15:32 -0400)
committerGitHub <noreply@github.com>
Sat, 28 Nov 2020 19:32:13 +0000 (02:32 +0700)
youtube_dl/extractor/pornhub.py

index 529f3f7119fd4e93a8c82168d910ab4fc3d1720e..a50b6260cbb25c3ad7d88dbb9cda374c8f5c84f8 100644 (file)
@@ -346,9 +346,9 @@ class PornHubIE(PornHubBaseIE):
         view_count = self._extract_count(
             r'<span class="count">([\d,\.]+)</span> [Vv]iews', webpage, 'view')
         like_count = self._extract_count(
-            r'<span class="votesUp">([\d,\.]+)</span>', webpage, 'like')
+            r'<span[^>]+class="votesUp"[^>]*>([\d,\.]+)</span>', webpage, 'like')
         dislike_count = self._extract_count(
-            r'<span class="votesDown">([\d,\.]+)</span>', webpage, 'dislike')
+            r'<span[^>]+class="votesDown"[^>]*>([\d,\.]+)</span>', webpage, 'dislike')
         comment_count = self._extract_count(
             r'All Comments\s*<span>\(([\d,.]+)\)', webpage, 'comment')