'How to get outgoing HTTP requests after visiting a site?
Say I visit https://google.com, I find it makes several other HTTP calls that fetch data to render the Google homepage, including:
- https://www.google.com/complete/search?q&cp=0&client=gws-wiz&xssi=t&hl=en-HK&authuser=0&psi=EB5hYtyeKNaXr7wPuumHyAQ.1650531857155&dpr=2
- https://aa.google.com/u/0/_/gog/get?rt=j&sourceid=538
- etc
Is there a way to fetch these outgoing HTTP requests with server-side code? The function I am looking to implement is basically:
def fetchOutgoingLinks(url):
# TODO
fetchOutgoingLinks("https://google.com") == ["https://www.google.com/complete/search?q&cp=0&client=gws-wiz&xssi=t&hl=en-HK&authuser=0&psi=EB5hYtyeKNaXr7wPuumHyAQ.1650531857155&dpr=2", "https://aa.google.com/u/0/_/gog/get?rt=j&sourceid=538", ...]
Thank you.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

