Buongiorno lista, Sto usando BeautifulSoup per estrarre un elenco di link da una pagina html. Il codice che sto usando è il seguente:
soup = BeautifulSoup(html_doc, 'html.parser') a=soup.find_all(href=re.compile("showthread")) print a Ottengo l'errore: RuntimeError: maximum recursion depth exceeded while calling a Python object Indagando un po' ho scoperto che il problema è dato dal fatto che i link sono troppi, infatti facendo: a=soup.find_all(href=re.compile("showthread"),limit=200) non mi dà errore e si comporta come mi aspetto. Nella documentazione di BeautifulSoup non sono riuscito a trovare un modo per iterare elemento per elemento, avete qualche suggerimento? *____________________________* *Giuseppe Amato* e-mail: giuam...@gmail.com
_______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python