Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pornhub's UI changed, uploader and view count became inextractable #26614

Closed
mo-han opened this issue Sep 18, 2020 · 2 comments
Closed

pornhub's UI changed, uploader and view count became inextractable #26614

mo-han opened this issue Sep 18, 2020 · 2 comments
Labels

Comments

@mo-han
Copy link

@mo-han mo-han commented Sep 18, 2020

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.09.14
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

WARNING: unable to extract uploader; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract view count; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Description

pornhub changed their UI of playing page, youtube-dl fails to extract uploader and view count.
i made my own patch to get the uploader, but unfortunately my code cannot be merged into ytdl directly:

class PornHubIE(youtube_dl.extractor.pornhub.PornHubIE, metaclass=ABCMeta):
    def _real_extract(self, url):
        data = super()._real_extract(url)
        try:
            html = get_html_element_tree(url)
            uploader = html.xpath('//div[@class="userInfo"]//a')[0].text
            data['uploader'] = uploader
            # print('#', 'uploader:', uploader)
        except IndexError:
            pass
        return data

a simple xpath('//div[@class="userInfo"]//a')[0] can get the uploader.
as for view count, i don't need it so i didn't dig for it.

@dstftw dstftw closed this Sep 18, 2020
@dstftw dstftw added the incomplete label Sep 18, 2020
@xantror
Copy link

@xantror xantror commented Sep 18, 2020

I can confirm that I too am experiencing this issue with broken username and view count extraction with youtube-dl version 2020.09.14.

I believe that op is correct in saying that the new layout of the page broke the extractor but I cannot comment on his solution since that is outside my area of expertise.

In this case, the url being downloaded is: https://www.pornhub.com/view_video.php?viewkey=ph5f42caa7048b4

Please refer to the verbose output of as requested, hope that that completes this issue submission.

$ /usr/local/bin/youtube-dl -v https://www.pornhub.com/view_video.php?viewkey=ph5f42caa7048b4
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.pornhub.com/view_video.php?viewkey=ph5f42caa7048b4']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.09.14
[debug] Python version 3.6.9 (CPython) - Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 4.3.1, ffprobe 4.3.1, rtmpdump 2.4
[debug] Proxy map: {}
[PornHub] ph5f42caa7048b4: Downloading pc webpage
[PornHub] ph5f42caa7048b4: Downloading m3u8 information
[PornHub] ph5f42caa7048b4: Downloading m3u8 information
[PornHub] ph5f42caa7048b4: Downloading m3u8 information
[PornHub] ph5f42caa7048b4: Downloading m3u8 information
[PornHub] ph5f42caa7048b4: Downloading m3u8 information
WARNING: unable to extract uploader; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract view count; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://dv.phncdn.com/videos/202008/23/345235671/1080P_8000K_345235671.mp4?ttl=1600469228&ri=1433600&rs=4000&hash=74d8400ecdd2e09a6d2ce2aa572378eb'
[download] Destination: Beautiful Blonde Gets Used By BF Twice-ph5f42caa7048b4.mp4
[download] 100% of 308.93MiB in 08:46
dstftw pushed a commit that referenced this issue Sep 18, 2020
dstftw added a commit that referenced this issue Sep 18, 2020
@scriptzteam
Copy link

@scriptzteam scriptzteam commented Sep 19, 2020

Updated, but still getting

WARNING: unable to extract uploader; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract view count; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

@ytdl-org ytdl-org locked and limited conversation to collaborators Sep 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.