You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

新手求教:如何获取网页动态加载且未在源码中显示的数据链接?

How to Find the Hidden Data URL for Dynamic Country/City Dropdowns

Hey there! I totally get why this is confusing—dynamic forms that load data without changing the URL or showing up in the page source are tricky at first. Let’s walk through exactly how to track down that data link using your browser’s built-in dev tools:

  • Open Developer Tools: Hit F12 (or Ctrl+Shift+I on Windows/Linux, Cmd+Opt+I on Mac) to pull up your browser’s dev tools. Switch to the Network tab—this is where we’ll watch for the hidden requests.
  • Set Up the Request Capture:
    • Click the small trash icon in the top-left of the Network tab to clear any existing requests.
    • Check the Preserve log box so we don’t lose requests when the dropdown updates.
    • Use the filter dropdown (it probably says "All" by default) to select XHR or Fetch. This filters out irrelevant stuff like images, CSS, and static JS files, so we only see the dynamic data requests.
  • Trigger the Data Load: Go back to the page, select a country from the first dropdown, then click the second city dropdown (or wait for it to populate). You’ll see new entries pop up in the Network tab.
  • Find the Target URL: Look for a request that makes sense—its name might include words like cities, getLocations, country-cities, or something similar. Click on that request, then go to the Headers section. The Request URL field here is exactly the link that’s loading the city data!
    • Bonus: Check the Payload tab to see what data (like the selected country’s ID) is being sent to the server, and the Response tab to view the raw city data that comes back.

If you don’t see an XHR/Fetch request, it’s possible the city data is preloaded in a JavaScript file somewhere. In that case, switch to the Sources tab, use the search bar (hit Ctrl+F or Cmd+F) to search for a city name you know should be in the list—you might find it stored in a variable or object within one of the JS files.

内容的提问来源于stack exchange,提问作者user9322960

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 04:15:37