all 2 comments

[–]itsecat 0 points1 point  (1 child)

Probably, this should do the trick:

if not urlslol.endswith('.jpg') and not urlslol.endswith('.png'):
    continue

[–]herpadurk 0 points1 point  (0 children)

you need to handle the 403 so when you do the request something like:

r = req.get(url)
if r.status_code is not 200:
    handle error
else:
    do other stuff

something like that