What do you want to save?
Add Code snippet
New code examples
-
Other 2021-10-24 01:56:16
grab a href using beuatiful soup
from BeautifulSoup import BeautifulSoup html = '''<a href="some_url">next</a> <span class="class"><a href="another_url">later</a></span>''' soup = BeautifulSoup(html) for a in soup.find_... Add solution -
Other 2021-10-23 02:30:09
Faster scraping
import requests from bs4 import BeautifulSoup BASE_URL = "https://news.ycombinator.com/" STORY_LINKS = [] for i in range(10): resp = requests.get(f"{BASE_URL}news?p={i}") soup = BeautifulSoup(resp.content, "html.parser&q... Add solution -
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-10-05 05:03:07
expired domains scrapper python
#all cats are yellow import requests,time from bs4 import BeautifulSoup url = "URL_HERE" r = requests.get(url) listy = [] main_url = "https://www.expireddomains.net" while True: try: r = requests.get(url) html = B... Add solution