Hacker News new | ask | show | jobs
by Isofarro 5599 days ago
> sed 's/#!\///g' urls.txt | xargs curl

So easy, you've actually got it wrong.

Certain special characters after the hash-bang need to be url-encoded, and then that value needs to be added to what's before the #! by including a query string parameter of _escaped_fragment_, checking first whether there is already a query string so as to append the information rather than incorrectly whacking on a '?'.

Plus, this isn't in the form of interpretive dance. So no content for you.

1 comments

Ok fine, so it will take 10 minutes to whip up and test a quick Ruby script instead of 30 seconds to think of the regular expression. I stand corrected.
Now multiply that 10 minutes by number of scripts, utilities, libraries and applications in the world that handle URLs, and you'll be somewhere close to the magnitude of effort required to work around these broken URLs.