title: Is there a way to download csv data from websites without using Selenium and Web Browser?
body: <p>I want to automate the data download process(via Python) from specific websites but cannot use Selenium or a browser, since the code would be scheduled on a server where both selenium and browser options are not available.</p>
  <p>I tried a python code using <em>pyautogui</em> package to automate mouse movement n click to download the file, but it wouldn't work since server would not allow opening a browser option (and i can't use Selenium as well, which would be the ideal option)</p>
  <p>attaching the code below:</p>
  <pre><code>import time
  
  import webbrowser
  
  url = 'https://covid.cdc.gov/covid-data-tracker/#ed-visits'
  
  #Open URL in a new tab, if a browser window is already open*
  
  webbrowser.open_new_tab(url)
  
  print(pyautogui.size())
  
  time.sleep(5)
  
  pyautogui.moveTo(1275, 655, duration = 5)
  
  pyautogui.click()
  
  time.sleep(5)
  
  pyautogui.press('down')
  
  pyautogui.press('enter')
  </code></pre>
  <p>I would like a bit of help on the other ways this can be achieved. Given the above limitations, how can i automate the file download, such that I run/schedule a .py file on the server side to automate this process.</p>
  <p>I tried to follow <em>@Olvin Roght's</em> answer but could not find the triggered function or the file source for the csv :
  <a href="https://stackoverflow.com/questions/55918415/is-there-any-way-to-download-csv-file-from-website-button-click-using-python/55919705">Is there any way to download csv file from “website button click” using Python?</a></p>
  <p>Attaching the snap of that as well:</p>
  <p><a href="https://i.stack.imgur.com/4PyQM.png" rel="nofollow noreferrer">Download_Button_Inspect_Element_snap</a></p>