Lord, help solve the problem:
There is a website where you need to download a csv file for further data manipulation.
File link is not direct, but such
CSV_URL = f'somesite.ru/?export_excel=Y&FILTER%5BUF_WAREHOUSE%5D=1&FILTER%5BUF_SHIPPING_DATE%5D%5Bstart%5D%5B0%5D={date}&FILTER%5BUF_SHIPPING_DATE%5D%5Bfinish%5D%5B0%5D={date}'
Clicking that link starts the download a csv with the required sampling parameters.
At the moment I swing through Selenium, but I want to do a little blood through requests.
When working through Selenium I point download.default_directory": ROOT_PATH and the file is downloaded where necessary.
Globally the problem is the following: I the script is packaged in .exe, but its correct operation should always carry with you the driver for chrome. It happens that on some PC version of chrome is different and nothing works:) And if you can solve this problem by using requests, everything should be OK
May be all the information it needs when the page is rendered, and the link only initiates the procedure of filtration and preservation. - adela.Sauer95 commented on April 19th 20 at 12:24
https://somesite.ru/delivery/?export_excel=Y
Downloaded the whole table in csv format, which is already loaded on the table.
If you set some filter like date, link, the button changes to
But if you replace the dates FROM and TO in the link manually or programmatically( as I now work), then download the file for the desired date, regardless of current page content - Johnny_DAmore commented on April 19th 20 at 12:27