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

[RedGifsSearch] Add RedGifs search (and user) extractor #1808

Merged
merged 23 commits into from
Nov 28, 2021

Conversation

Deer-Spangle
Copy link
Contributor

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

I'm adding a playlist extract for RedGifs searches.
There's another PR Ive noted above, #1631 which does redgifs pages. I'm happy to resolve merge conflicts if that goes in first, and neaten things up. Or to move this to a different file to avoid conflicts. I'm open to your suggestion there.

I wasn't sure whether to implement paging in this also?
As in, should this scrape through all pages, or just the specified page?

@Deer-Spangle Deer-Spangle mentioned this pull request Nov 27, 2021
9 tasks
Copy link
Contributor

@MinePlayersPE MinePlayersPE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p.s. please change all the strings to be single-quoted (except for the one nested inside of the fstring)

yt_dlp/extractor/redgifs.py Outdated Show resolved Hide resolved
yt_dlp/extractor/redgifs.py Outdated Show resolved Hide resolved
yt_dlp/extractor/redgifs.py Outdated Show resolved Hide resolved
@pukkandan pukkandan added the pending-fixes PR has had changes requested label Nov 27, 2021
@pukkandan
Copy link
Member

#1631 has been merged. Please fix the merge conflicts

@pukkandan pukkandan added the site-enhancement Feature request for some website label Nov 27, 2021
@Deer-Spangle
Copy link
Contributor Author

Rebased onto master, reworked my extractor to extend RedGifsIE, and pulled out common gif parsing.
I had to narrow the regex of RedGifsIE, to ensure it doesn't match browse pages.
And adding the paging, using the PagedList as you suggested (Thanks!)

@Deer-Spangle
Copy link
Contributor Author

Also added a RedGifsUser extractor, while I'm here

@Deer-Spangle Deer-Spangle changed the title [RedGifsSearch] Add RedGifs search extractor [RedGifsSearch] Add RedGifs search (and user) extractor Nov 27, 2021
yt_dlp/extractor/redgifs.py Outdated Show resolved Hide resolved
yt_dlp/extractor/redgifs.py Outdated Show resolved Hide resolved
yt_dlp/extractor/redgifs.py Outdated Show resolved Hide resolved
yt_dlp/extractor/redgifs.py Outdated Show resolved Hide resolved
yt_dlp/extractor/redgifs.py Outdated Show resolved Hide resolved
yt_dlp/extractor/redgifs.py Outdated Show resolved Hide resolved
yt_dlp/extractor/redgifs.py Outdated Show resolved Hide resolved
yt_dlp/extractor/redgifs.py Outdated Show resolved Hide resolved
yt_dlp/extractor/redgifs.py Outdated Show resolved Hide resolved
@pukkandan pukkandan removed the pending-fixes PR has had changes requested label Nov 27, 2021
@Deer-Spangle
Copy link
Contributor Author

Thanks for the cleanup there!

yt_dlp/extractor/redgifs.py Outdated Show resolved Hide resolved
@pukkandan pukkandan merged commit bf57cfa into yt-dlp:master Nov 28, 2021
gaming-hacker added a commit to gaming-hacker/yt-dlp that referenced this pull request Nov 29, 2021
* commit 'ee8dd27a7351841e1de8cebf8311b69fbef09eab': (39 commits)
  [cleanup] Add deprecation warnings
  [cleanup] Misc cleanup Closes yt-dlp#1805, closes yt-dlp#1800
  [cleanup] Refactor `JSInterpreter._seperate`
  [build] Use `workflow_dispatch` for release
  [build] Fix MacOS Build Closes yt-dlp#1624
  [build] Save Git HEAD at release alongside version info
  Option `--wait-for-video` to wait for scheduled streams
  Option `--break-per-input` to apply --break-on... to each input URL
  Fix --break-on-archive when pre-checking
  [downloader] Add colors to download progress
  [youtube] Decrypt n-sig for URLs with `ratebypass` Closes yt-dlp#1796
  [vimeo] Sort http formats higher Closes yt-dlp#1821
  [Instagram] Display more login errors (yt-dlp#1822)
  [RedGifs] Add Search and User extractors (yt-dlp#1808)
  [NovaEmbed] Fix extractor (yt-dlp#1814)
  Fix logic error in report_unplayable_conflict
  [tiktok:user] Set `webpage_url` correctly Closes yt-dlp#1802
  [twitch:vod] Extract live status (yt-dlp#1722) Authored by: DEvmIb
  Ensure directory exists when checking formats
  [EmbedSubtitles] Slightly relax duration check and related cleanup Closes yt-dlp#1385
  ...

# Conflicts:
#	Makefile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-enhancement Feature request for some website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants