Created
February 26, 2015 17:45
-
-
Save ateoto/cc776d55ec538ad679a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import csv | |
from bs4 import BeautifulSoup | |
for page_num in range(1, 11): | |
r = requests.get("http://www.sos.arkansas.gov/corps/search_corps.php?SEARCH=1&run={}&corp_name=%27".format(page_num)) | |
if r.status_code == requests.codes.ok: | |
res = r.content | |
soup = BeautifulSoup(res) | |
cells = soup.find_all("td", class_=lambda x: x and x == 'alt' or x and x == 'light') | |
for c in cells: | |
print(c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment