“真实”链接到 Google 搜索结果中的文件?

发布于 2024-11-03 09:37:18 字数 1456 浏览 1 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

久伴你 2024-11-10 09:37:18

也许这不是最好的解决方案,但这是一种不需要 Chrome 和 Firefox 编码或附加组件的方法。假设 IE 和其他浏览器有类似的方法来执行此操作,但至少 IE 通常会在浏览器中打开 PDF,并在顶部的 URL 栏中显示链接,该链接很容易复制。

  1. 单击搜索结果,应下载 PDF。

  2. 现在在浏览器中打开最近下载的列表

  • ,Ctrl+J
  • Linux 上的 Firefox(?),即 Ctrl+Shift+Y
  1. 现在复制链接
  • Chrome:右键单击文件名下方列出的 URL,然后选择“复制”链接地址”
  • Firefox:右键单击该文件并选择“复制下载链接”

编辑:截至 2020 年 12 月,可能更早,Chrome 在搜索结果中显示一个干净、可复制的 URL。

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.

沫尐诺 2024-11-10 09:37:18

我创建了一个简单的网站来清理 Google 搜索结果 URL:

网址清理

从 Google 搜索结果复制的网址(例如 PDF 链接)比实际需要的更为复杂。该工具会删除不必要的部分,保留页面的原始 URL。

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.

月光色 2024-11-10 09:37:18

来自 @Blender 答案中的评论,我已经学会了如何安装 Firefox 和 Chrome 中的用户脚本

现在,当右键单击并复制 Google 搜索结果中的网址时,我会得到真正的链接,而不是那个垃圾(对不起,Google,我知道你爱我们,但我们不需要臭味十足的跟踪网址)

起初,我按照 @naxa 的建议使用了 googlePrivacy,但现在出现了问题。 Web 应用程序 SE 中提供的脚本关闭 Google 搜索结果间接可以完成这项工作。它具有用户脚本和扩展风格:

以下是有关如何操作的信息继续执行用户脚本。

安装 UserScript

在 Chrome 中,我使用 Tampermonkey 安装了它。

篡改猴

以及 Firefox 中的 Greasemonkey

油猴

结果

用户脚本之前的

丑陋的谷歌

之后

酷谷歌


Web 应用程序中的相关文章:

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:

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:

明明#如月 2024-11-10 09:37:18

URL 就在这里:

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

只需使用某种语言(例如 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

因此,要从 Google url 中提取 URL,请使用以下脚本:

import urllib

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

print urllib.unquote(url)

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)
花之痕靓丽 2024-11-10 09:37:18

我使用的 Firefox 扩展名为 Google/Yandex 搜索链接修复,它工作得很好并且允许直接复制链接目标

I'm using a Firefox extension named Google/Yandex search link fix, it works just great and allows direct copy of the link target

沧笙踏歌 2024-11-10 09:37:18

在 google 上进行了一些搜索,发现了名为 LinkWalker 的 Firefox 插件。

简单的链接上下文菜单实用程序,可解码嵌入和隐藏的 URL、剥离查询字符串参数并将文本选择转换为可点击的链接。

听起来这可以解决问题。

Doing a little google searching and ran across the Firefox add-on called LinkWalker.

Simple context menu utility for links which decodes embedded and cloaked URLs, strips off query-string parameters and converts text selections to clickable link.

Sounds like that could do the trick.

不可一世的女人 2024-11-10 09:37:18

这是一个很长的链接,因为谷歌想要跟踪谁找到了什么,并且实际上点击了搜索结果...

如果您想要真正的链接(上面也是一个真正的链接!),

请在您的 linkx 提示符上输入以下内容:

php -r "print urldecode('http://www.google.com/url?sa=t&source=web&cd=1&ved=0CCUQFjAA&url=http%3A%2F%2Fwww.marxists.org%2Freference%2Farchive%2Feinstein%2Fworks%2F1910s%2Frelative%2Frelativity.pdf&ei=Fai1TZq-Acugtgenw6DqDg&usg=AFQjCNFzYOTqpf68rQnuwW9K7wp39WL6Rg&sig2=z4RqvOLEEJsPohBqr1ghxQ');" | awk -F'&' '/url=/{ print $5 }'

it a long link because Google wants to keep track of who found what, and actually clicked on a search result...

if you want the real link (the above is also a real link!)

type this on your linkx-prompt:

php -r "print urldecode('http://www.google.com/url?sa=t&source=web&cd=1&ved=0CCUQFjAA&url=http%3A%2F%2Fwww.marxists.org%2Freference%2Farchive%2Feinstein%2Fworks%2F1910s%2Frelative%2Frelativity.pdf&ei=Fai1TZq-Acugtgenw6DqDg&usg=AFQjCNFzYOTqpf68rQnuwW9K7wp39WL6Rg&sig2=z4RqvOLEEJsPohBqr1ghxQ');" | awk -F'&' '/url=/{ print $5 }'
小镇女孩 2024-11-10 09:37:18

当我在 Internet Explorer 中查找此搜索时,我确实得到了<一href="http://www.google.nl/url?sa=t&source=web&cd=1&ved=0CBwQFjAA&url=http%3A%2F%2Fwww.marxists.org%2Freference%2 Farchive%2Feinstein%2Fworks%2F1910s%2Frelative%2Findex.htm&ei=aqq1TYKYK8mAOunv5IkJ&usg=AFQjCNEBLIS-mNpyeA_h4d7P3z4rXDfbww" rel="nofollow">这个链接

但是当我使用 Chrome 时,我得到了你想要的。所以这似乎是一个IE功能,或者至少与你使用的浏览器有关。如果您可以更换浏览器,我会考虑使用chrome(经过测试,给出正常的URL)或opera(经过测试,正常的url),但不使用firefox(经过测试,给出时髦的url)

When I look up this search in Internet Explorer I do indeed get this link

But when I use Chrome, I get what you want. So it seems to be an IE feature, or at least have something to do with the browser you are using. If you are in the position to change browsers, I would consider using chrome (tested, gives normal URL) or opera (tested, normal url) but not firefox (tested, gives funky url)

难以启齿的温柔 2024-11-10 09:37:18

请参阅此工具

http://www.duvidasdeinformatica.com/blog/limpar -links-paginas-resultados-google/

它是葡萄牙语的,但在底部有一个框,您可以在其中复制/粘贴网址,然后得到“转换”为真实的......

See this tool

http://www.duvidasdeinformatica.com/blog/limpar-links-paginas-resultados-google/

It's in portuguese, but at the bottom you have a box where you can copy/paste the url, and it get's "converted" to the real one...

影子是时光的心 2024-11-10 09:37:18

我想我读过一次,同时也有同样的挫败感,它当您登录到您的 Google 帐户并且您的帐户设置配置为网络历史记录跟踪时,它会掩盖实际的 URL。

如果我没记错的话,你可以尝试:
- 使用浏览器本机的“私密”或“隐身”浏览功能在单独的浏览器窗口中执行搜索
- 只需注销您的谷歌帐户,获取结果并重新登录即可
- 转到 google.com/history 并单击“暂停”,这会阻止保存未来的网络活动,然后在获取结果后返回到同一页面并单击“恢复”(如果您打算使用网络历史记录)。

如果您经常想要从结果中获取多个 URL,并且我记得上述技术不起作用,那么您可以尝试使用 Firefox 插件之类的方法,例如复制链接 URL,提供复制您选择的链接 URL 的功能,然后您可以将其粘贴到文本编辑器中,并使用“查找和查找”替换编码的元素。代替。

或者,您也许可以做一些研究来找到一个可以为您解码 URL 的网站。我在 webtoolhub.com 上发现 URL Deobfuscator,它通过解码编码字符、删除查询字符串等,很好地使主要/所需的 URL 可用于复制/粘贴。

干杯。

I think I read once, while having the same frustration, that it masks the actual URLs ONLY when you're logged into your google account and your accounts settings are configured for web history tracking.

IF my memory serves me correctly, you could try:
- performing the search in a separate browser window using your browsers native "private" or "incognito" browsing feature
- simply log out of your google account, get your results and log back in
- go to google.com/history and click "Pause", which prevents future web activity from being saved, and then return to the same page after grabbing your results and click "Resume" (if you intend to use Web History).

If this sort of activity is something where you would routinely want to grab multiple URLs from the results and the above technique doesn't work as I recall, you can try something like an add-on to firefox, such as Copy Link URL, which provides the ability to copy the URLs of links you select which you could then paste into a text editor and replace the encoded elements with a Find & Replace.

Or, you could perhaps do a little research to find a website that will decode the URL for you. I found URL Deobfuscator on webtoolhub.com that does a good job of making the main / desired URL available for copy/paste by decoding the encoded characters, removing query strings, etc.

Cheers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文