gpt4 book ai didi

python - "No module named tldextract"

转载 作者:行者123 更新时间:2023-11-28 21:39:59 28 4
gpt4 key购买 nike

我在 python 中尝试了以下代码:

from newspaper import Article

#A new article from BBC
url = "http://www.bbc.com/news/magazine-26935867"

#For different language newspaper refer above table
BBC_article = Article(url, language="en") # en for English

我收到以下错误:

Traceback (most recent call last): File "news_paper_article.py", line 3, in from newspaper import Article

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/newspaper/init.py", line 10, in from .article import Article, ArticleException

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/newspaper/article.py", line 12, in from . import images File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/newspaper/images.py", line 21, in from . import urls

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/newspaper/urls.py", line 16, in from tldextract import tldextract ImportError: No module named tldextract

这可能是一些简单的问题,但我才刚刚开始,我们将不胜感激。

最佳答案

尝试:

pip install tldextract

关于python - "No module named tldextract",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46158754/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com