Learn the basics of scraping
――If you want to try scraping --If you want to experience beautiful soup
--Udemy course https://www.udemy.com/course/pythondjango-a/learn/lecture/8650684
test_scraping.py
from bs4 import BeautifulSoup
import requests
res = requests.get('https://www.ikuji-kaji-yaruman.work/')
soup = BeautifulSoup(res.text, 'html.parser')
for h2 in soup.find_all('h2'):
print(h2.text)
--Please do not repeatedly attack my site in the source code lol
--Colab is very convenient because you don't need to build a python environment!
Recommended Posts