What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-21 14:13:03
python scrape data from aspx page
#pip install requests #pip install lxml #pip install bs4 import requests from bs4 import BeautifulSoup r_obj = requests.Session() url = "aspx_website_url_here" # i.e. http://bisegrw.edu.pk/ r_soup = r_obj.get(url) soup = BeautifulSoup(r_soup.co... Add solution -
Python 2021-10-09 05:20:09
BeautifulSoup - scraping paragraphs from html
from bs4 import BeautifulSoup # Simple HTML SIMPLE_HTML = '''<html> <head></head> <body> <h1>This is a title</h1> <p class="subtitle">Lorem ipsum dolor sit amet.</p> <p>Here's another p with... Add solution -
Python 2021-09-29 02:54:02
how to get text from a website python
import requests from bs4 import BeautifulSoup #pip install bs4 url = 'https://www.troyhunt.com/the-773-million-record-collection-1-data-reach/' res = requests.get(url) html_page = res.content soup = BeautifulSoup(html_page, 'html.parser') text = soup.fi... Add solution -
Python 2021-09-16 15:57:03
python beautifulsoup get attibute
xmlData = None with open('conf//test1.xml', 'r') as xmlFile: xmlData = xmlFile.read() xmlDecoded = xmlData xmlSoup = BeautifulSoup(xmlData, 'html.parser') repElemList = xmlSoup.find_all('repeatingelement') for repElem in repElemList: print(&q... Add solution -
Html 2021-09-06 04:59:01
scrape beautifulsoup python html attribute value
xmlData = None with open('conf//test1.xml', 'r') as xmlFile: xmlData = xmlFile.read() xmlDecoded = xmlData xmlSoup = BeautifulSoup(xmlData, 'html.parser') repElemList = xmlSoup.find_all('repeatingelement') for repElem in repElemList: print(&q... Add solution