0

我是 goose-extractor 的一个问题这是我的代码:

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

看看我的问题。

RuntimeError: maximum recursion depth exceeded

有什么建议么 ?

我是一个糟糕的程序员或隐藏的错误在 python 中不可见

4

1 回答 1

0

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.

于 2015-04-02T00:11:37.927 回答