What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-13 10:37:10
python webscraper stack overflow
import urllib2 from BeautifulSoup import BeautifulSoup # or if you're using BeautifulSoup4: # from bs4 import BeautifulSoup soup = BeautifulSoup(urllib2.urlopen('http://example.com').read()) for row in soup('table', {'class': 'spad'})[0].tbody('tr'): ... Add solution -
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 -
Python 2021-09-09 16:03:01
Following Links in Python
import urllib from BeautifulSoup import * URL = raw_input("Enter the URL:") #Enter main URL link_line = int(raw_input("Enter position:")) - 1 #The position of link relative to first link count = int(raw_input("Enter count:")... Add solution