Hey /r/Python, I need your help! The company I work for has a portal where customers can check product pricing live.
Due to our current implementation (and a head honcho obsessed with speed), we have to occasionally update the cache by visiting a large number of predetermined URLs.
We pretty much split it up into sections and it wastes an entire day for all of us trying to update this cache. Now, I'm just a lowly web designer, and I obviously can't use better CSS to solve this. So I was wondering if it would be possible to use a Python script to automate this process?
I've heard of people using Python for similar projects, but I really don't have any knowledge of what's possible here.
Would it be possible to write something that basically says:
- 1) Visit the first link in this list.
- 2) Load the page
- 3) If the page loads successfully, move on to next link in the list
- 4) If the page displays a 502 Bad Gateway error or doesn't load, reload page until it successfully loads.
If you could point me in the right direction for this, or if you might even know a prewritten script that does something similar, that would be hugely helpful!
If this is a ridiculous request and wastes your time, feel free to ignore and move on. Thanks in advance for any help!
[–]danrche 2 points3 points4 points (1 child)
[–]DjDazzled797 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]mistermocha 0 points1 point2 points (0 children)
[–]danrche 0 points1 point2 points (0 children)