[英]Get Output in CSV-File
此代碼向我輸出與 Google 新聞中的關鍵字“航空公司”相關的新聞項目,這些新聞項目在一天內發布。 在這里,我得到了標題、描述和 URL。 我有一個問題:我想在 CSV 文件中以表格形式從我的控制台輸出結果,任何人都可以幫助我嗎?
非常感謝!
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
from GoogleNews import GoogleNews
import csv
googlenews = GoogleNews()
googlenews.set_encode('utf_8')
googlenews.set_lang('de')
googlenews.set_period('1d')
googlenews.get_news('Airlines')
print(googlenews.results())
´´´
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.