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

Dropbox URL formats as shorthands/favorites passed as --link-* argument #13

Open
porg opened this issue Aug 15, 2023 · 2 comments
Open

Comments

@porg
Copy link

porg commented Aug 15, 2023

Goal

Dropbox /s/ link formats

--link-preview

https://www.dropbox.com/s/<identifier>/filename.png

--link-download-argument

https://www.dropbox.com/s/<identifier>/filename.png?&dl=1

--link-download-subdomain

https://dl.dropbox.com/s/<identifier>/filename.png

--link-raw-redirect

https://www.dropbox.com/s/<identifier>/filename.png?&raw=1

  • HTTP 302

--link-raw-direct

https://dl.dropboxusercontent.com/s/<identifier>/filename.png>

  • HTTP 200

Dropbox /scl/ link formats

--link-scl-preview

https://www.dropbox.com/scl/fi/<identifier>/filename.png?rlkey=<content-key>&dl=0

--link-scl-download

https://www.dropbox.com/scl/fi/<identifier>/filename.png?rlkey=<content-key>&dl=1

  • Safari: Fails sometimes, cause yet unknown: Either too many redirects or browser caching issue.
  • wget <url> → Creates ugly filename (the last URL part as is).
  • wget -content-dispositon <url> → Creates intended filename (passed via HTTP Content-Disposition header)

--link-scl-raw-redirect

https://www.dropbox.com/scl/fi/<identifier>/filename.png?rlkey=<content-key>&raw=1

  • HTTP 302

--link-scl-raw-direct

https://dl.dropboxusercontent.com/scl/fi/<identifier>/filename.png?rlkey=<content-key>

  • HTTP 200
@nk9
Copy link
Owner

nk9 commented Aug 15, 2023

Thank you for the suggestion. However, the named link styles would involve parsing the returned link to pull out the item code and then constructing a link. That would add a lot of complexity to the code, and is frankly just more work than I am prepared to put into this project, for very limited benefit. If I understand correctly, all of the various behaviors (not link styles, but behaviors) can be achieved using different combinations of link arguments. So this is purely about link aesthetics.

If you need the links fetched by this tool to be formatted differently, you can use sed or your own script to modify them to suit your purposes.

As for the new scl link style, it seems premature to put work into supporting it when it may be modified, or even abandoned.

@porg
Copy link
Author

porg commented Aug 15, 2023

  1. Totally agree it is premature to care about /scl/ links - Let's consider that only should they "re-surface again".
  2. The proposal is not only about link aesthetics, but in one case also a real functional difference:
  • The HTTP 200 type links are not achievable via www.dropbox.com + arguments.
  • But only via dl.dropboxusercontent.com
  • And some forums restrict links and or embedding if that link redirects.
  • So maybe do you re-consider those formats?

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

No branches or pull requests

2 participants