Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
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/11320721only 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.