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

fails parsing all videos on pornhub playlists - fix idea included #7695

Closed
sheepdestroyer opened this issue Nov 29, 2015 · 0 comments
Closed

fails parsing all videos on pornhub playlists - fix idea included #7695

sheepdestroyer opened this issue Nov 29, 2015 · 0 comments

Comments

@sheepdestroyer
Copy link

@sheepdestroyer sheepdestroyer commented Nov 29, 2015

On pornhub, youtubl-dl only finds videos with numerical viewkeys while parsing playlists. But alphanumerical viewkeys also exist (supported in individual videos).

For instance youtube-dl http://www.pornhub.com/playlist/11320721 only returns 12 vids instead of 49 total.

In pornhub.py, the generic url parser is not the same as the playlist's url parser :
generic parser : _VALID_URL = r'https?://(?:[a-z]+\.)?pornhub\.com/(?:view_video\.php\?viewkey=|embed/)(?P<id>[0-9a-z]+)'
playlist parser : for video_url in set(re.findall('href="/?(view_video\.php\?viewkey=\d+[^"]*)"', webpage))

Changing the playlist parser to copy the generic one fixes the issue for me : for video_url in set(re.findall('href="/?(view_video\.php\?viewkey=[0-9a-z]+[^"]*)"', webpage))

I am not a coder, can not write a proper fix where the playlist function would just call the normal parser. Having just one parser would prevent one getting out of sync like it happened here.

@sheepdestroyer sheepdestroyer changed the title fails finfing all videos on pornhub playlists - fix idea included fails parsing all videos on pornhub playlists - fix idea included Nov 29, 2015
@dstftw dstftw closed this in d53a4af Nov 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.