【发布时间】:2019-07-26 15:04:11
【问题描述】:
我正在尝试从 USPTO 设置的 API 中检索 URL。他们的系统为查询提供了一个 URL,在 Web 浏览器中搜索时它工作得很好。但是在 Python3 中这样做时我一直收到此错误
我已经尝试使用 urllib 和 requests 来检索数据。
我的代码:
import requests
link = new_url
f = requests.get("https://developer.uspto.gov/ibd-api/v1/patent/application?searchText=device&start=0&rows=2000")
print(f.text)
错误:
SSLError: HTTPSConnectionPool(host='developer.uspto.gov', port=443): Max
retries exceeded with url: /ibd-api/v1/patent/application?
searchText=device&start=0&rows=2000 (Caused by SSLError(SSLError("bad
handshake: Error([('SSL routines', 'tls_process_server_certificate',
'certificate verify failed')])")))
我希望能够使用 json 库读取此 URL 的内容。
【问题讨论】:
标签: python python-3.x python-requests urllib