On Thu, Nov 26, 2015 at 9:04 AM, ryguy7272 <ryanshu...@gmail.com> wrote: > Ok, I guess that makes sense. So, I just tried the script below, and got > nothing... > > import requests > from bs4 import BeautifulSoup > > r = > requests.get("https://en.wikipedia.org/wiki/Wikipedia:Unusual_place_names") > soup = BeautifulSoup(r.content) > print soup.find_all("a",{"title"})
The second argument to find_all is supposed to be a dict, not a set, and it's only useful if you want to put some restriction on the titles. To simply enumerate all the titles, try this: [a.get("title") for a in soup.find_all("a")] ChrisA -- https://mail.python.org/mailman/listinfo/python-list