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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ie/Dropbox] Fix extractor #7926

Merged
merged 10 commits into from Aug 28, 2023
Merged

[ie/Dropbox] Fix extractor #7926

merged 10 commits into from Aug 28, 2023

Conversation

nathantouze
Copy link
Contributor

@nathantouze nathantouze commented Aug 21, 2023

Since dropbox updated their share links around July this year, I had to make an update it to keep using this extractor.

This new regex handles old and new link formats.

Dropbox changed their link format earlier this year. The exctractor weren't working anymore with new links. A change was mandatory to keep using the software.
Old formats:

  • https://www.dropbox.com/s/<id>/*
  • https://www.dropbox.com/sh/<id>/*

Added formats:

  • https://www.dropbox.com/e/scl/fi/<id>/*
  • https://www.dropbox.com/scl/fi/<id>/*

(EDIT: Also fixed extraction --@bashonly)

Closes #7005, Closes #7696

Template

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 all of the following options that apply:

What is the purpose of your pull request?

Copilot Summary

馃 Generated by Copilot at e43c809

Summary

馃搧馃敆馃帴

Improve Dropbox extractor to support more link formats. Update _VALID_URL in yt_dlp/extractor/dropbox.py to match them.

Dropbox links vary
_VALID_URL adapts
Winter of patterns

Walkthrough

  • Expand the _VALID_URL regex pattern to support more Dropbox link formats (link)

Since dropbox updated their share links around July this year, I had to make an update it to keep using this extractor. 

This new regex handles old and new link formats.
@bashonly
Copy link
Member

Add a test for each of the new URL formats

@bashonly bashonly added site-bug Issue with a specific website pending-fixes PR has had changes requested labels Aug 21, 2023
yt_dlp/extractor/dropbox.py Outdated Show resolved Hide resolved
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
@bashonly bashonly linked an issue Aug 21, 2023 that may be closed by this pull request
11 tasks
@DoubiTe
Copy link

DoubiTe commented Aug 21, 2023

@bashonly & @nathantouze this PR is partially fix the extractor because it still generate an error "mountComponent" #7005
Is it possible to fix-it @pukkandan ? Thanks a lot

@bashonly bashonly changed the title [extractor/Dropbox]: fix regex [ie/Dropbox] Fix extractor Aug 21, 2023
@bashonly
Copy link
Member

Extraction should be working now, you should be able to add/update tests

yt_dlp/extractor/dropbox.py Outdated Show resolved Hide resolved
@bashonly bashonly added pending-review PR needs a review and removed pending-fixes PR has had changes requested labels Aug 22, 2023
yt_dlp/extractor/dropbox.py Outdated Show resolved Hide resolved
@bashonly bashonly removed the pending-review PR needs a review label Aug 27, 2023
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
@bashonly bashonly merged commit b9f2bc2 into yt-dlp:master Aug 28, 2023
13 checks passed
@nathantouze nathantouze deleted the master-2 branch August 29, 2023 07:34
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this pull request Apr 21, 2024
Closes yt-dlp#7005, Closes yt-dlp#7696
Authored by: nathantouze, bashonly, denhotte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-bug Issue with a specific website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dropbox] download unsupported url [Dropbox] Unable to extract mountComponent
4 participants