Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from bs4 import BeautifulSoup
- import urllib2
- x = raw_input("> ")
- openurl = urllib2.urlopen("http://www.urbandictionary.com/define.php?term="+x)
- soup = BeautifulSoup(openurl)
- for i in soup.find_all("div", {"class":"meaning"}):
- print i.get_text()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement