How can resolve recursion depth exceeded (Goose-extractor)

201 Views Asked by At

I am one problem with goose-extractor This is my code:

  for resultado in soup.find_all('a', href=True,text=re.compile(llave)):
        url = resultado['href']
        article = g.extract(url=url)
        print article.title

and take a look at my problem.

RuntimeError: maximum recursion depth exceeded

any suggestions ?

I am a lousy programmer or hidden errors are not visible in python

1

There are 1 best solutions below

1
On

As mentioned in the comments, you can increase the recursion limit with sys.setrecursionlimit() (2/3):

import sys
sys.setrecursionlimit(10**5)

You can check what the default limit is with sys.getrecursionlimit() (2/3).

Of course, this won't fix whatever's causing this recursion (there's no way to know what's wrong without more details), and might crash your computer if you don't fix that.