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.
[Youtube] flat-playlist extractor correction for playlist results and partial added duration #25848
Comments
|
I also want to fetch the videos counter of each youtube playlist result, but I did not get the regex working for that.
|
|
File a PR. |
|
@dstftw I tried, I never have done a pull request here. If I click the "New pull request" button, I can only compare branches. |
|
Read developer instructions. |
Checklist
Description
WRITE DESCRIPTION HERE
In the uploaded youtube.py.txt file I have made some changes for the youtube.py extractor to add the new feature to get correct results when searching youtube playlists.
The changed code checks if the /wach?v= url also contains list=, if so, also the playlist id gets extracted.
The printed result will also be checked for the video id length (11 = video id, larger than 11 = playlist id)
RESULTS searching for playlists:
RESULTS searching for single videos:
I have also changed the video regex to fetch the video durations, which already works, but at line 327
the self.url_result(...) function errors if I change it to:
That it expects 4 arguments and not 5. I looked at the code where the self.url_result(...) function is defined but I could not find it. Maybe someone can help out here for this last step.
Other topic relations:
#25720
#16627
#25652
youtube.py.txt