安裝
pip3 install newspaper3k
使用
from newspaper import Article
url = 'http://www.example.com/path/to/article'
article = Article(url)
article.download()
article.parse()
text = article.text # 獲取新聞正文
images = article.images # 獲取新聞圖片
安裝
pip3 install newspaper3k
使用
from newspaper import Article
url = 'http://www.example.com/path/to/article'
article = Article(url)
article.download()
article.parse()
text = article.text # 獲取新聞正文
images = article.images # 獲取新聞圖片
https://github.com/zhangbo2008/Trie_with_informationExtraction_and_fuzzy_matchingv2