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

[cookies] Fix --cookies-from-browser for snap Firefox #9016

Merged
merged 2 commits into from Jan 31, 2024

Conversation

Grub4K
Copy link
Member

@Grub4K Grub4K commented Jan 17, 2024

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

Implement support for --cookies-from-browser for snap Firefox and do more specific searching for theProfiles dirs. It also allows os.altsep as a path separator for _is_path, so that / is correctly categorized on Windows.

This PR has the side effect of including glob, as well as no longer searching infinitely deep, therefore speeding up the cookie extraction by an immense amount.

Fixes #7520, Closes #9011

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:

  • 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?

@Grub4K Grub4K added the enhancement New feature or request label Jan 17, 2024
@Grub4K Grub4K changed the title Changes [cookies] Fix --cookies-from-browser for snap Firefox Jan 17, 2024
yt_dlp/cookies.py Show resolved Hide resolved
yt_dlp/cookies.py Outdated Show resolved Hide resolved
@mmafic
Copy link

mmafic commented Jan 30, 2024

Is it possible to add support for custom profile directories? Firefox allows you to choose a location when creating a profile, the list of all profiles is stored in profile.ini, which is in AppData/Roaming on Windows.

@bashonly
Copy link
Member

Is it possible to add support for custom profile directories?

you can already pass any profile directory path, e.g.
--cookies-from-browser "firefox:/path/to/profile"

@Grub4K
Copy link
Member Author

Grub4K commented Jan 31, 2024

...the list of all profiles is stored in profile.ini, which is in AppData/Roaming on Windows.

This is not a bad idea. I will create a POC that does this to see if it makes sense to implement.

@Grub4K Grub4K merged commit cbed249 into yt-dlp:master Jan 31, 2024
15 checks passed
FletcherD pushed a commit to FletcherD/yt-dlp that referenced this pull request Feb 14, 2024
@Grub4K Grub4K deleted the feat/ff-cookies-1 branch February 17, 2024 15:35
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this pull request Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants