BigSteve/PyGame/practice/webscrap2.py

12 lines
309 B
Python

import requests
from bs4 import BeautifulSoup
def getdata(url):
r = requests.get(url)
return r.text
htmldata = getdata("https://cs.finescale.com/fsm/m/online/1581353.aspx")
soup = BeautifulSoup(htmldata, 'html.parser')
for item in soup.find_all('img'):
print(item['src'])