我正在尝试制作网络解析器并保存它。我找到了报纸图书馆。我正在使用 Eclipse。但是我没有得到好的结果。请帮我。
import newspaper
cnn_paper = newspaper.build('http://cnn.com')
for article in cnn_paper.articles:
print(article.url)
这是一条错误消息:
Traceback (most recent call last):
File "D:\workspace2\JesElaSearchSys\NespaperScraper_01.py", line 2, in <module>
import newspaper
File "C:\Python27\lib\site-packages\newspaper3k-0.1.5-py2.7.egg\newspaper\__init__.py", line 10, i
n <module>
from .article import Article, ArticleException
File "C:\Python27\lib\site-packages\newspaper3k-0.1.5-py2.7.egg\newspaper\article.py", line 12, in
<module>
from . import images
File "C:\Python27\lib\site-packages\newspaper3k-0.1.5-py2.7.egg\newspaper\images.py", line 15, in
<module>
import urllib.request
ImportError: No module named request