Home > Back-end >  Fetching a redirect's target URL in OpenRefine
Fetching a redirect's target URL in OpenRefine

Time:06-24

I have a CSV of ~2000 URLs that, when queried, do a 301 or 302 redirect, and I'm trying to figure out if OpenRefine is able to export to a new column the destination url that it retrieves HTML from when I fetch the html from it (or some other way).

e.g.

https://www-istp.gsfc.nasa.gov/stargaze/Ssolsys.htm 

redirects to

https://pwg.gsfc.nasa.gov/stargaze/Ssolsys.htm

And I know that from clicking the link in my browser of choice. I've found a few answers suggesting that this can be done in various coding languages, but nothing so far suggesting how to do so in OpenRefine, even though I'm like 80% sure that it can be.

Does anyone out there know what I might be able to do to make this happen?

CodePudding user response:

In OpenRefine you can write expressions in Screenshot of OpenRefine dialog for adding a new column with the target URL.

  • Related