Jan-06-2017, 11:00 AM
Hi all. Self-taught Python noob here. I'm trying to write a short python script to visit a web page and simulate the user clicking a download button to download a zip file. The url of this zip file changes frequently, hence the need to simulate clicking the button (the site's url remains the same). I'm using the package "selenium" to do this. Please let me know if there's anything better out there!
Whilst testing my first attempt, I've noticed the first line of my script (below) seems to be causing issues:
The script seems to produce the output below (even with all code stripped out leaving just the one line of code above).
https://gyazo.com/23b2f2d66e5169182b8764772aefd7bc
The script is currently being called by a cmd window as part of a larger process. If I manually type the command above into a Python window, it seems to work correctly.
If it helps, I'm using Python 2.7 (I have to as this is the version bundled with ArcGIS, the program I'm using for most other tasks in this group). I've got the latest version of Selenium (3.0.2).
Whilst testing my first attempt, I've noticed the first line of my script (below) seems to be causing issues:
from selenium import webdriver
The script seems to produce the output below (even with all code stripped out leaving just the one line of code above).
https://gyazo.com/23b2f2d66e5169182b8764772aefd7bc
The script is currently being called by a cmd window as part of a larger process. If I manually type the command above into a Python window, it seems to work correctly.
If it helps, I'm using Python 2.7 (I have to as this is the version bundled with ArcGIS, the program I'm using for most other tasks in this group). I've got the latest version of Selenium (3.0.2).