diff --git a/PyGame/practice/webscrap2.py b/PyGame/practice/webscrap2.py new file mode 100644 index 0000000..6711f69 --- /dev/null +++ b/PyGame/practice/webscrap2.py @@ -0,0 +1,12 @@ + +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']) \ No newline at end of file diff --git a/PyGame/practice/webscrape.py b/PyGame/practice/webscrape.py new file mode 100644 index 0000000..40eb029 --- /dev/null +++ b/PyGame/practice/webscrape.py @@ -0,0 +1,6 @@ +import requests + +URL = "https://cs.finescale.com/fsm/m/online/1581353.aspx" +page = requests.get(URL) + +print(page.text) \ No newline at end of file