"Real" link to file in Google search results? [closed]

Solution 1:

Maybe this is not the best solution, but here's one way that doesn't require coding or add-ons for Chrome and Firefox. Assume there are similar ways to do this for IE and others, though at least IE will usually open PDFs in the browser with the link in the url bar at the top which is easy enough to copy.

  1. Click on the search result, which should download the PDF.

  2. Now in your browser open the list of recent downloads

  • Chrome, Ctrl+J
  • Firefox on Linux(?), it's Ctrl+Shift+Y
  1. Now copy the link
  • Chrome: Right click on the URL listed beneath the name of the file and select "Copy Link Address"
  • Firefox: Right click on the file and select "Copy Download Link"

EDIT: As of December 2020, and probably earlier, Chrome shows you a clean, copyable URL in the search results.

Solution 2:

I've created a simple web site that cleans Google search result URLs:

URL Clean

URLs copied from Google search results (such as links to PDFs) are more complicated than they need to be. This tool removes the unnecessary parts, leaving the page's original URL.

Solution 3:

From a comment in @Blender answer, I've learned how to install a User Script in Firefox and Chrome.

Now, when right clicking and copying a URL in Google search results, I get the real link instead of that rubbish (sorry, Google, I know you love us, but we don't need no stinky tracking URLs).

At first, I used googlePrivacy as suggested by @naxa, but it's bugging nowadays. The script provided in Web Applicatations SE, Turning off Google search results indirection, does the work. It has User Script and Extension flavors:

  • "Don't track me Google" at the Chrome Web Store.
  • "Don't track me Google" at Userscripts.org

Bellow the info on how to proceed with the User Script.

Installing the UserScript

In Chrome, I installed it using Tampermonkey.

tampermonkey

And Greasemonkey in Firefox.

greasemonkey

Results

Before the UserScript

ugly google

After

cool google


Related post in Web Applications:

  • How to make Google search not redirect

Solution 4:

The URL is right here:

&url=http%3A%2F%2Fwww.marxists.org%2Freference%2Farchive%2Feinstein%2Fworks%2F1910s%2Frelative%2Frelativity.pdf

Just unescape it with some language, like Python:

>>> import urllib
>>> print urllib.unquote('http%3A%2F%2Fwww.marxists.org%2Freference%2Farchive%2Feinstein%2Fworks%2F1910s%2Frelative%2Frelativity.pdf')
http://www.marxists.org/reference/archive/einstein/works/1910s/relative/relativity.pdf

So to extract the URL from a Google url, here's a script to do so:

import urllib

url = raw_input('What is the Google url? ')
url = url[url.find('&url=') + 5:]
url = url[:url.find('&')]

print urllib.unquote(url)