Python Bytes - Simple Web Scraping BeautifulSoup

Published: 17 May 2023
on channel: AC
1,142
19

#Coded by Andrew C
from bs4 import BeautifulSoup
import requests

doc = "https://en.m.wikipedia.org/wiki/Pytho...)"

r = requests.get(doc)

soup = BeautifulSoup(r.content,features="lxml")

text =[''.join(s.findAll(string=True))for s in soup.findAll('p')]

title_text = soup.title.get_text()

print(title_text)

print(*text,sep='\n')


Watch video Python Bytes - Simple Web Scraping BeautifulSoup online without registration, duration hours minute second in high quality. This video was added by user AC 17 May 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,142 once and liked it 19 people.