Reputation: 1
the images I am trying to get are inside an and I want the High resolution images.
I have found this code here but it doesn't seem to work.
import requests
from bs4 import BeautifulSoup
from selenium import webdriver
from time import sleep
from cookie_accepter3 import load_and_accept_cookies
driver = webdriver.Safari()
def getdata(url):
r = requests.get(url)
return r.text
URL = 'https://www.duelingbook.com/deck?id=13690926
htmldata = getdata("https://www.duelingbook.com/deck?id=13690926")
soup = BeautifulSoup(htmldata, 'html.parser')
for item in soup.find_all('img'):
print(item['src'])
Any help , appreciate
Upvotes: 0
Views: 158
Reputation: 1087
I think your code seems fine really. It may be that the source doesn't provide you with high-res images
Upvotes: 1
Reputation: 1087
Getting high res images really depends on the source. Does the source provide you with high res? Do they allow resolution parameters to be passed?
Unless you're using something like OpenCV or related tech, you may not be able to upscale the images dimensions into high res.
Upvotes: 1