'Downloading a file using wget or request

I am automating the process to download the csv file from the google trends after I do a search, It can be done by clicking the download button using selenium but I am thinking of doing it using requests, when I click the button definitely a request is posted in a form of url by any means can I fetch that url,

The url looks like this: https://trends.google.com/trends/api/widgetdata/multiline/csv?req=%7B%22time%22%3A%222021-03-09%202022-03-09%22%2C%22resolution%22%3A%22WEEK%22%2C%22locale%22%3A%22en-US%22%2C%22comparisonItem%22%3A%5B%7B%22geo%22%3A%7B%22country%22%3A%22PK%22%7D%2C%22complexKeywordsRestriction%22%3A%7B%22keyword%22%3A%5B%7B%22type%22%3A%22BROAD%22%2C%22value%22%3A%22bahria%20town%20karachi%22%7D%5D%7D%7D%5D%2C%22requestOptions%22%3A%7B%22property%22%3A%22%22%2C%22backend%22%3A%22IZG%22%2C%22category%22%3A29%7D%7D&token=APP6_UEAAAAAYioYw6KoUJcW4_Xv6d4fc4sJn3swSoON&tz=-300



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source