Advertisement
Guest User

Untitled

a guest
May 28th, 2015
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. import sys
  2. import requests
  3. from bs4 import BeautifulSoup
  4.  
  5. url = "http://www.goodreads.com/quotes"
  6. reqst = requests.get(url)
  7.  
  8. soup = BeautifulSoup(reqst.content.decode('utf-8'))
  9.  
  10. quotes_data = soup.find_all("div",{"class":"quoteText"})
  11.  
  12. for quote in quotes_data:
  13.     print (quote.text.encode('utf-8'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement