Trying to scrape some headlines off a newspaper with this code: import urllib, re pattern = re.compile("""<h2><a href="(.*)">(.*)</p>""", re.DOTALL) page = urllib.urlopen("http://www.startribune.com").read() for (headline, code, description) in pattern.findall(page): print (headline, code, description)
I'm getting the error below and can't find anything in the documentation. Suggestions Traceback (most recent call last): File "C:/Python24/Stribwebscrape.py", line 13, in ? for (headline, code, description) in pattern.findall(page): ValueError: need more than 2 values to unpack __________________________________ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor