Google goto url 参数解析
Google goto url 参数解析
Created: 11/28/2026 19:10:19
Updated: 11/28/2026 19:13:15
Exported: 11/28/2026 19:23:15
User:
11/28/2026 19:11:16
google serp 的goto?url=有解?Assistant:
11/28/2026 19:11:28
正在考虑Google搜索结果链接的重定向格式。
- 正在考虑Google搜索结果链接的重定向格式。
- google search results “goto?url=” redirect link
- Done
不能直接解码。简单说:goto?url=CAES...里的那串内容看起来是 Google 内部的标识符,不是把目标网址编码进去,所以没办法靠 base64 之类的方法还原。
背景- 以前的结果链接是 /url?q=<编码后的网址>,可以直接解出来;新的 /goto?url= 带的是看似随机的 base64 字节,除了访问该链接之外,没人知道怎么还原。编码后的网址>
- Google 今年 7 月开始测试,8 月下旬大范围铺开。业内普遍认为这是反爬措施,针对第三方抓取工具和 AI 公司。Search Engine Land 则报道,Google 称这是防止搜索结果被滥用的技术措施。
现在能用的解法:跟随重定向- 这是 302 跳转,多数工具的做法是像处理普通 href 一样,请求该链接并跟随跳转拿到真实网址。
- 要注意Google 会拦截 HEAD 请求,所以每个链接都得用完整的 GET 请求。目标地址只在响应的 Location 头里,所以最好用
allow_redirects=False发 GET,读取 Location,不要真的去加载目标页面。- 成本会上升:一个结果页有上百个链接,每个都要多一次请求,而且大量请求容易触发风控,需要代理和限速。
如果你在做 SERP 抓取- 用第三方 API 的话,可以看提供商有没有处理。SerpApi 已经发文说明他们解决了 /goto 重定向的问题。如果你看到返回里仍有 goto 链接,可以按他们的指引提交 Search ID。
- 自己抓的话,建议把”解析重定向”做成一个独立步骤,并监控 goto 链接和直链的比例,以免数据结构悄悄变化。
另外,安全方面也有影响:用户不能再靠悬停预览来独立核对链接指向哪里。
你是想解决抓取/数据采集的问题,还是只是想知道某个链接实际指向哪里?我可以按你的场景给出具体写法。
—
Sources:- > ## Content Index
- Google’s new search redirects make links harder to check before you click
- Google’s new search redirects make links harder to check before you click
- googles new goto redirect urls resolution in progress
- googles new search redirects make links harder to check before you click
- Back to top
[Hacker Newsnew past comments ask show jobs submitlogin](https://news.ycombinator.com/item?id=49447708) - googles new search redirects make links harder to check before you click
- googles new search redirects make links harder to check before you click
- > ## Content Index
- googles new search redirects make links harder to check before you click
- googles new search redirects make links harder to check before you click
- We Have Resolved the Google /goto URL Redirect Rollout
- Confirmed: Google Search Rolling Out google.com/goto Tracking Parameters
- Google.com/goto Explained: What Changed in Search Results
- googles new search redirects make links harder to check before you click
User:
11/28/2026 19:13:03
有extension或userscripts幫我轉?Assistant:
11/28/2026 19:13:15
Searched the web- userscript extension Google search goto redirect direct links remove
- Done
有的,而且針對/goto的已經出現了。要注意舊的「移除 Google 重定向」類工具(改寫/url?q=、停用rwt函數那種)大多對/goto無效,因為/goto裡面沒有網址可以解出來,必須實際發請求去拿 Location。
Userscript(Tampermonkey)- Google Search Direct Links (Bypass /goto)(Greasy Fork,另有繁中名稱「Google 搜尋真實連結還原」):宣稱可繞過 /goto 並清理追蹤參數。
- 限制:只支援 Tampermonkey(4.19.0 以上),Violentmonkey 和 ScriptCat 因缺少
redirect: manual或拿不到 302 的 Location 標頭而無法還原 /goto 連結。- 它預設用「本地靜態模式」,完全離線、各管理器通用,但對一般網頁搜尋、新聞、影片、AI 概覽的 /goto 仍然保留,要還原得靠網路解析。所以想真正還原一般結果,要啟用它的網路解析選項並用 Tampermonkey。
瀏覽器擴充功能- Google Goto URL Extractor(GitHub:alexbruf/google-goto-url-fix):跨瀏覽器、無執行期依賴,把 /goto 轉回一般可複製的目標網址。預設會在頁面或捲動穩定後預先解析附近幾個連結,也可以在設定關閉預取,改成只在滑鼠懸停時解析。
- 它只會把 Google 的 /goto 連結送回 Google 取得跳轉目標,不會去請求目的網站。目前看起來要依 repo 的 INSTALL.md 以未封裝方式載入(Chrome),不是商店版,安裝前建議先看一下原始碼。
不太有用的舊方案- Google Direct、Avoid Google Search redirects 這類:做法是停用
window.rwt函數,擋的是點擊時的改寫,不是 /goto。- 有些文章推薦的「Google Redirect Removal」之類,多半是針對舊的
/url?q=,別預期能處理 /goto。
安全提醒
第三方腳本/擴充會讀取你的 Google 搜尋頁面,請只裝你信得過、能讀原始碼的,並檢查權限範圍(最好只限 google 網域)。
你用的是什麼瀏覽器和腳本管理器?我可以幫你確認該選哪個,或直接幫你寫一個最小的 Tampermonkey 腳本(用GM_xmlhttpRequest配redirect: manual讀 Location)。
—
Sources:- How to Turn Off Google Search Results Indirection (Direct Links)
- User scripts for google.com
- Google Search Direct Links (Bypass /goto) - Source code
- google goto url fix
- Google Direct - remove tracking links from Google Search results
- awesome userscripts
- awesome userscripts
- Google Search Direct Links (Bypass /goto)
- avoid google search redirects
Powered by Claude Exporter (https://www.ai-chat-exporter.net)
you asked
message time: 2026-11-28 19:16:54
https://greasyfork.org/en/scripts/591392-google-search-direct-links-bypass-goto
運作原理?
grok response
這個腳本的運作原理是繞過 Google 搜尋結果頁(SERP)從 2026 年中開始廣泛使用的 /goto 重新導向機制,把搜尋結果的連結還原成真正的目標網址。
背景問題
從 2026 年 7 月左右開始,Google 在未登入、無痕等情況下,把搜尋結果的連結改成類似:
1
https://www.google.com/goto?url=CAES...(一長串加密/亂數 token)
而不是直接的目標網址。
這造成幾個問題:
- 無法直接複製乾淨的連結
- 瀏覽器的「已造訪連結」(紫色)標記失效(因為 token 每次都不同)
- 其他過濾/增強腳本(如 uBlacklist、Better Google 等)也受影響
腳本如何解決(雙模式架構)
腳本採自適應雙模式,預設完全離線、保護隱私:
- Local Static Mode(預設,100% 離線)
- 不發任何背景網路請求。
- 直接從頁面現有的 HTML 屬性、JS 變數、data-lpage、Protobuf 資料、註解等前端資料解析出真實網址。
- 支援的範圍:
- Google 圖片(
udm=2,從data-lpage提取) - Google Lens 的 Visual matches
- Google Scholar(解碼
/scholar_url?url=...) - 傳統的
/url?q=...、/imgres?...重新導向
- Google 圖片(
- 同時清理各種追蹤參數(utm_、gclid、各種廣告/社群追蹤碼等)。
- Network Resolution Mode(需手動開啟,僅 Tampermonkey 支援)
- 因為從 2026 年 9 月起,標準搜尋結果(All / Web / News / Forums / Videos 等)的前端資料已不再包含真實網址,必須靠網路解析。
- 使用 Tampermonkey 特有的
redirect: 'manual'能力,在背景對/goto連結發輕量 HEAD/GET 請求,讀取 HTTP 302 回應的Locationheader,拿到真正的目標網址。 - 只連 Google 官方伺服器,不會連到目標網站本身。
- 有快取(24 小時)、併發限制(6 workers)、節流與斷路器機制,降低被限流或觸發 CAPTCHA 的風險。
- 其他腳本管理器(Violentmonkey、ScriptCat 等)因技術限制(無法正確讀取 manual redirect 的 header)無法還原標準結果的直連。
其他功能
- 還原
:visited樣式(紫色已造訪連結) - 清理網址列與外部連結上的追蹤參數
- 支援多個 Google 域名
總結
- 預設:完全本地解析 + 清理參數(隱私優先,圖片/Scholar 等可直接還原)。
- 要完整還原一般搜尋結果:必須用 Tampermonkey,並在腳本設定中手動開啟「Network Resolution Mode」。
這就是為什麼腳本強調「專為 Tampermonkey 設計」,以及其他管理器無法完整還原 /goto 直連的原因。
--
Comments powered by Disqus.