<div dir="ltr">I added some functionality to my <a href="https://github.com/bassmadrigal/scripts/blob/master/sbgen.sh">slackbuild generator script</a> last year to make sure source links to github always link to the proper location so it works with or without content disposition. I also added support for pythonhosted and pypi links to get the non-hashed download link so I can more easily use my <a href="https://github.com/bassmadrigal/scripts/blob/master/version-bump.sh">version-bump script</a> to update my packages (since the hash in the URL would change for every new version of that program).<div><br></div><div>After thinking about doing this for some time and seeing a few recent emails about github download problems, I finally decided to excise it from my script and tweak it so it can be used standalone for people to check their github and python links. It's built as a function, so you can add it to your own script, add it to your environment, or just pass a URL to the script.</div><div><br></div><div>Feel free to test it and let me know if you find any issues. I've been using it for well over a year and it seems to be working fine.</div><div><br></div><div>I present, <a href="https://github.com/bassmadrigal/scripts/blob/master/check-source-download.sh">check-source-download.sh</a>:</div><div><br></div><div><font face="monospace">$ check-source-download.sh <a href="https://github.com/nucleic/kiwi/releases/download/1.4.5/kiwisolver-1.4.5.tar.gz">https://github.com/nucleic/kiwi/releases/download/1.4.5/kiwisolver-1.4.5.tar.gz</a><br><a href="https://github.com/nucleic/kiwi/releases/download/1.4.5/kiwisolver-1.4.5.tar.gz">https://github.com/nucleic/kiwi/releases/download/1.4.5/kiwisolver-1.4.5.tar.gz</a><br>$ check-source-download.sh <a href="https://github.com/nucleic/kiwi/archive/refs/tags/1.4.5.tar.gz">https://github.com/nucleic/kiwi/archive/refs/tags/1.4.5.tar.gz</a><br><a href="https://github.com/nucleic/kiwi/archive/refs/tags/1.4.5/kiwi-1.4.5.tar.gz">https://github.com/nucleic/kiwi/archive/refs/tags/1.4.5/kiwi-1.4.5.tar.gz</a><br>$ check-source-download.sh <a href="https://github.com/nucleic/kiwi/archive/03adafeb0f1188e34cde4c7ca8fe384912bd9e1b.zip">https://github.com/nucleic/kiwi/archive/03adafeb0f1188e34cde4c7ca8fe384912bd9e1b.zip</a><br><a href="https://github.com/nucleic/kiwi/archive/03adafe/kiwi-03adafeb0f1188e34cde4c7ca8fe384912bd9e1b.tar.gz">https://github.com/nucleic/kiwi/archive/03adafe/kiwi-03adafeb0f1188e34cde4c7ca8fe384912bd9e1b.tar.gz</a><br>$ check-source-download.sh <a href="https://github.com/nucleic/kiwi/archive/03adafeb0f1188e34cde4c7ca8fe384912bd9e1b.tar.gz">https://github.com/nucleic/kiwi/archive/03adafeb0f1188e34cde4c7ca8fe384912bd9e1b.tar.gz</a><br><a href="https://github.com/nucleic/kiwi/archive/03adafe/kiwi-03adafeb0f1188e34cde4c7ca8fe384912bd9e1b.tar.gz">https://github.com/nucleic/kiwi/archive/03adafe/kiwi-03adafeb0f1188e34cde4c7ca8fe384912bd9e1b.tar.gz</a><br>$ check-source-download.sh <a href="https://files.pythonhosted.org/packages/0f/ed/a02b18943f9162644f90354fe6445410e942c857dd21ded758f630ba41c0/pymediainfo-6.1.0.tar.gz">https://files.pythonhosted.org/packages/0f/ed/a02b18943f9162644f90354fe6445410e942c857dd21ded758f630ba41c0/pymediainfo-6.1.0.tar.gz</a><br><a href="https://files.pythonhosted.org/packages/source/p/pymediainfo/pymediainfo-0.1.6.tar.gz">https://files.pythonhosted.org/packages/source/p/pymediainfo/pymediainfo-0.1.6.tar.gz</a></font><br></div><div><font face="monospace"><br></font></div><div><font face="arial, sans-serif">Jeremy</font></div></div>