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

Google drive multi-user regex fix #4285

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

malkstar
Copy link
Contributor

@malkstar malkstar commented Apr 24, 2023

Describe the changes

Google drive links can sometimes contain a user indicator if you are logged into multiple accounts in the browser where the link is generated.

Is this related to a problem?

#4282

Additional references

I'm not sure if this an issue which needs fixing, as it can be worked around by the user. However, supporting the URLs is not a massive change to the regex.

Tested in regex101.com against the test links in the code.

@malkstar malkstar changed the base branch from main to develop April 27, 2023 17:49
@@ -18,7 +20,7 @@
class GoogledriveCom(BaseDownloader):
__name__ = "GoogledriveCom"
__type__ = "downloader"
__version__ = "0.34"
__version__ = "0.35"
__status__ = "testing"

__pattern__ = r"https?://(?:www\.)?(?:drive|docs)\.google\.com/(?:file/d/|uc\?.*id=)(?P<ID>[-\w]+)"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
__pattern__ = r"https?://(?:www\.)?(?:drive|docs)\.google\.com/(?:file/d/|uc\?.*id=)(?P<ID>[-\w]+)"
__pattern__ = r"https?://(?:www\.)?(?:drive|docs)\.google\.com/(?:u/[0-9]/)?(?:file/)?(?:u/[0-9]/)?(?:d/|uc\?.*id=)(?P<ID>[-\w]+)"

not sure how this was lost from the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant