Closed rameshm76 closed 8 months ago
These links appear to be using HTTP 301 for redirection…
Would a command to update existing record(s) based on permanent HTTP redirects suffice for you? It's been requested as part of #702.
That should be fine.
Two issue I can think of:
Not sure how to handle 2.
The 2nd case doesn't sound like an HTTP redirect, and isn't really detectable as such; if the user wants to replace such a URL he'd have to do it manually.
As for the 1st one… well, it'd have to either result in an error or an (optional?) user prompt to confirm merging/updating the existing records.
The final URL should be https://www.oreilly.com/content/data-engineering-a-quick-and-simple-definition/
Turns out the actual result of HTTP redirects looks a bit different:
It appears that there's a bunch of utm_*
query parameters that gets removed within the browser (likely by javascript).
…Completed with #702:
$ buku -a https://oreil.ly/2A6hjLd --url-redirect
2. Data engineering: A quick and simple definition – O’Reilly
> https://www.oreilly.com/content/data-engineering-a-quick-and-simple-definition/?utm_source=telegram.me&utm_medium=social&utm_campaign=mdtrue-silenttruep-hacking-and-false&utm_content=21259580
+ Get a basic overview of data engineering and then go deeper with recommended resources.
(The final URL isn't exactly the same as requested; I've explained the reason in my previous comment.)
Query
Opening this ticket, as I'm not sure if there a feature for the following:
I noticed that there are a lot of shortened URL's from google, oreilly, bit.ly, tiny url etc. For example https://goo.gl/Rn2FFN and https://oreil.ly/2A6hjLd etc. Is there a way to add the expanded link or redirect link?
buku -a https://oreil.ly/2A6hjLd buku -u https://oreil.ly/2A6hjLd
The final URL should be https://www.oreilly.com/content/data-engineering-a-quick-and-simple-definition/