0

I have a website that allows me to export my data to an excel file. I want my python code to get the file for me using the requests library. I'm attaching a picture for clarity.

I tried getting an excel version of the page itself but it doesn't appear the way I want it to. I want the exported version the website offers.

If anyone knows how to get the file it would be great! Thanks!

screenshot from website

Request screenshot

R-A
  • 1
  • 1
  • please attach the link. A link is required to find the request used when the excel file is downloaded. If you do not want to attach the link and want to find the request yourself, press F12 and go to network. while you download the file, look closely for request calls. – Andy_ye Nov 29 '20 at 11:06
  • Maybe this thread will help you out. --> https://stackoverflow.com/questions/42113041/perform-download-via-download-button-in-python What you typically do is first inspect the element/button within the firefox or chrome browser (right click on button > inspect element) on the page. Then you can use the selenium webdriver to automate the process of clicking on the button and save it. – Maximilian Freitag Nov 29 '20 at 11:56
  • @Andy_ye I can't see any request calls when I download the file (I am editing the post to add a screenshot) – R-A Nov 29 '20 at 13:16
  • well there are many other options. you could hover your mouse over the button in inspect elements mode or you could right click the downloaded file to get the download link then search for it within the html. or, maybe, just maybe, you could just send the link so I can have a look – Andy_ye Nov 29 '20 at 14:14
  • @Andy_ye the website requires a user so a link won't help.. – R-A Nov 30 '20 at 11:29

0 Answers0