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

Fix Issue #1064 and #1283: User and Channel searches to return all videos including optional filtering of search terms #1282

Conversation

UpHillSolutions-roberth
Copy link
Contributor

@UpHillSolutions-roberth UpHillSolutions-roberth commented Aug 21, 2024

Updated pafy.py to fix Issue #1064

  • Modified the all_videos_from_channel function to return all videos from a channel or user by looping through each page of the url playlist and then returning all videos.

The previous method only returned the first page of results which meant that search queries for channels/users with more than 100 videos were only displaying the most recent 100 videos. This fix ensures that all videos are returned by using the same logic as get_playlist.

This fixes the following search queries to ensure all videos for the user/channel are returned (using videogamedunkey as an example but this applies to all users/channels):

  • user videogamedunkey
  • channels videogamedunkey 1

…m a channel, not just the first page of playlist results (previous method only returned up to 100 videos max).
…earch term in the title or description. This restores the ability to search a user's videos.
@UpHillSolutions-roberth UpHillSolutions-roberth changed the title Fix Issue #1064: User and Channel searches to return all videos Fix Issue #1064 and #1283: User and Channel searches to return all videos including optional filtering of search terms Aug 21, 2024
@UpHillSolutions-roberth
Copy link
Contributor Author

UpHillSolutions-roberth commented Aug 21, 2024

Updated search.py to fix Issue #1283.

The search query for user userName/searchTerm now filters the output of all_videos_from_channel by the optional search term if provided otherwise all videos by the user are returned.

Example:

  • user soulsearchanddestroy/voyage

@iamtalhaasghar iamtalhaasghar merged commit fe8165c into mps-youtube:develop Sep 11, 2024
iamtalhaasghar added a commit that referenced this pull request Sep 11, 2024
…deos including optional filtering of search terms (#1282) (#1288)

* Updated the all_videos_from_channel function to return all videos from a channel, not just the first page of playlist results (previous method only returned up to 100 videos max).

* Updated the usersearch_id function to filter the returned videos by search term in the title or description. This restores the ability to search a user's videos.

Co-authored-by: Robert Hill <[email protected]>
iamtalhaasghar added a commit that referenced this pull request Jan 5, 2025
* 2.10.3

Automatically generated by python-semantic-release

* chore: use pipenv

* fix: #806 - pressing q doesn't stops playback when in repeat mode

* 2.10.4

Automatically generated by python-semantic-release

* fix: #1243 bumped yt-dlp version

Thanks to @galgot

* 2.10.5

Automatically generated by python-semantic-release

* docs: extend upgrade instructions (#1249)

This adds the pip / pipx commands to upgrade all the dependencies. This makes directed actions like #1225 (comment) unnecessary.

* added a notice

* fix syntax warnings on 3.12 (#1263)

* Update project URL and version maintenance (#1262)

* Update project URL

* Update __version__ in setup.py

This suppresses the update notifications

* help new: more accurate helptext

`help new` doesn't actually check whether there's a new version,
it shows the changelog for the latest release no matter what.
Update helptext to reflect this.

* Update COLLABORATORS.md

* Fix Issue #1064 and #1283: User and Channel searches to return all videos including optional filtering of search terms (#1282) (#1288)

* Updated the all_videos_from_channel function to return all videos from a channel, not just the first page of playlist results (previous method only returned up to 100 videos max).

* Updated the usersearch_id function to filter the returned videos by search term in the title or description. This restores the ability to search a user's videos.

Co-authored-by: Robert Hill <[email protected]>

* 2.11.0

Automatically generated by python-semantic-release

* 2.11.1

Automatically generated by python-semantic-release

* 2.11.2

Automatically generated by python-semantic-release

* 2.11.3

Automatically generated by python-semantic-release

* 2.11.4

Automatically generated by python-semantic-release

* 2.11.5

Automatically generated by python-semantic-release

* chore: update author email

* fix: wheel_recipe.sh

* 2.11.6

Automatically generated by python-semantic-release

* fix: semantic_release version for pypi setup.py was stuck

* 2.11.7

Automatically generated by python-semantic-release

* chore: clean up setup.cfg

* 2.12.0

Automatically generated by python-semantic-release

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: fslori <[email protected]>
Co-authored-by: Branch Vincent <[email protected]>
Co-authored-by: lawrence <[email protected]>
Co-authored-by: Robert Hill <[email protected]>
Co-authored-by: semantic-release <semantic-release>
iamtalhaasghar added a commit that referenced this pull request Jan 5, 2025
* 2.10.3

Automatically generated by python-semantic-release

* chore: use pipenv

* fix: #806 - pressing q doesn't stops playback when in repeat mode

* 2.10.4

Automatically generated by python-semantic-release

* fix: #1243 bumped yt-dlp version

Thanks to @galgot

* 2.10.5

Automatically generated by python-semantic-release

* docs: extend upgrade instructions (#1249)

This adds the pip / pipx commands to upgrade all the dependencies. This makes directed actions like #1225 (comment) unnecessary.

* added a notice

* fix syntax warnings on 3.12 (#1263)

* Update project URL and version maintenance (#1262)

* Update project URL

* Update __version__ in setup.py

This suppresses the update notifications

* help new: more accurate helptext

`help new` doesn't actually check whether there's a new version,
it shows the changelog for the latest release no matter what.
Update helptext to reflect this.

* Update COLLABORATORS.md

* Fix Issue #1064 and #1283: User and Channel searches to return all videos including optional filtering of search terms (#1282) (#1288)

* Updated the all_videos_from_channel function to return all videos from a channel, not just the first page of playlist results (previous method only returned up to 100 videos max).

* Updated the usersearch_id function to filter the returned videos by search term in the title or description. This restores the ability to search a user's videos.

Co-authored-by: Robert Hill <[email protected]>

* 2.11.0

Automatically generated by python-semantic-release

* 2.11.1

Automatically generated by python-semantic-release

* 2.11.2

Automatically generated by python-semantic-release

* 2.11.3

Automatically generated by python-semantic-release

* 2.11.4

Automatically generated by python-semantic-release

* 2.11.5

Automatically generated by python-semantic-release

* chore: update author email

* fix: wheel_recipe.sh

* 2.11.6

Automatically generated by python-semantic-release

* fix: semantic_release version for pypi setup.py was stuck

* 2.11.7

Automatically generated by python-semantic-release

* chore: clean up setup.cfg

* 2.12.0

Automatically generated by python-semantic-release

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: fslori <[email protected]>
Co-authored-by: Branch Vincent <[email protected]>
Co-authored-by: lawrence <[email protected]>
Co-authored-by: Robert Hill <[email protected]>
Co-authored-by: semantic-release <semantic-release>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants