(Jan-05-2021, 12:00 AM)woodmister Wrote: So, I'll have to figure that out unless you know a quick way to manupulate it. I haven't fully tested the script you gave me yet, but I did notice it wasn't getting the full sized one.My Code was just a quick test to see that user agent did work.
The full sized images are under tag
a
with href
for large and src
for small.So if adjust a little.
import requests from bs4 import BeautifulSoup url = 'https://archive.4plebs.org/hr/thread/2866456/' headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36'} response = requests.get(url, headers=headers) soup = BeautifulSoup(response.content, 'lxml') img_all = soup.select('div.thread_image_box > a') for img in img_all: print(img.get('href'))
Output:https://i.4pcdn.org/hr/1487896415236.jpg
https://i.4pcdn.org/hr/1487896485361.jpg
https://i.4pcdn.org/hr/1487896543620.jpg
https://i.4pcdn.org/hr/1487896605850.jpg
https://i.4pcdn.org/hr/1487896666111.jpg
https://i.4pcdn.org/hr/1487896726234.jpg
.....