coding-coworking-club / python-spring-2021

ccClub Python Spring 2021
https://www.ccclub.io/course/2021Spring
23 stars 6 forks source link

[General] 爬蟲問題!!! #514

Closed 11087tim closed 3 years ago

11087tim commented 3 years ago

提交連結

程式碼

from fredapi import Fred
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
api = "1118ae8f2b49b0cbddaa4b83883ad728"
fred = Fred(api_key= api)
data = fred.get_series("GDP")

錯誤訊息

image

問題描述

想利用fred提供的api來完成問題,但一直跑出url error ,上stackoverload找答案,用了import ssl的方式去避開認證 但print出來卻沒有東西。 問題是 為什麼會辦法存取,利用ssl 背後的意思是啥,網站上也有提到Certificates.command方法,到我也不知道背後的使用意義是啥???

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.