Skip to content

Instantly share code, notes, and snippets.

View aparrish's full-sized avatar

Allison Parrish aparrish

View GitHub Profile
import urllib2
import simplejson
import re
import requests
from bs4 import BeautifulSoup
from random import choice
# The request also includes the userip parameter which provides the end
# user's IP address. Doing so will help distinguish this legitimate
@aparrish
aparrish / oprah.py
Created March 5, 2012 15:48 — forked from ktibb/oprah.py
import urllib
import BeautifulSoup
import re
html = urllib.urlopen('http://www.oprah.com/relationships/What-Kind-of-Woman-Watches-Porn-Researchers-Find-Answers').read()
soup = BeautifulSoup.BeautifulSoup(html)
#texts = soup.findAll(text=True)
texts = soup.find("div", {"class": "arial14"})