I’ve got a problem with a code for taking a screenshot of a website.
So i want to take a screenshot of this train timetable, which updates every few minutes. First i thoght that the code is working properly, then i noticed that the bmp.file which it saves, always stay the same like the first time i opened the website, even if i delet it.
I have to admit that i’m extremly poor in programming, the code is a copy i found online, so i don’t know how it is workin to be hornest, and i was not able to find a solution. I also was lookin for a cache or temp data, where the first pic of the site may be saved but i did not find anything.
Maybe someone here can help me with this topic?!
Thats the code:
BASE = 'https://mini.s-shot.ru/1024x0/JPEG/1024/Z100/?’ # you can modify size, format, zoom
url = ‘Liveticker’
url = urllib.parse.quote_plus(url) #service needs link to be joined in encoded format
path = ‘target1.bmp’
response = requests.get(BASE + url, stream=True)
if response.status_code == 200:
with open(path, ‘wb’) as file:
for chunk in response: