
実現したいこと
・pythonでrequestsを使ってスクレイピングをしようとしています。
発生している問題・エラーメッセージ
例外が発生しました: SSLError HTTPSConnectionPool(host='google.co.jp', port=443): Max retries exceeded with url: / (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) urllib3.exceptions.SSLError: Can't connect to HTTPS URL because the SSL module is not available. During handling of the above exception, another exception occurred: File "C:\mypython 2\python ai\requests\adapters.py", line 489, in send resp = conn.urlopen( urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='google.co.jp', port=443): Max retries exceeded with url: / (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) During handling of the above exception, another exception occurred: File "C:\mypython 2\python ai\requests\adapters.py", line 563, in send raise SSLError(e, request=request) File "C:\mypython 2\python ai\requests\sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "C:\mypython 2\python ai\requests\sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "C:\mypython 2\python ai\requests\api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "C:\mypython 2\python ai\requests\api.py", line 73, in get return request("get", url, params=params, **kwargs) File "C:\mypython 2\python ai\python scraping a.py", line 12, in <module> requests = requests.get(url) requests.exceptions.SSLError: HTTPSConnectionPool(host='google.co.jp', port=443): Max retries exceeded with url: / (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))
該当のソースコード
python
1ソースコード 2```requests = requests.get(url) 3 4raise SSLError(e, request=request)
補足情報(FW/ツールのバージョンなど)
os:windows10
vscode
python:3.10
anaconda:3
requests :2.28.2
selenium :4.8.0
お分かりになる方いらっしゃいませんでしょうか?どうぞよろしくお願いいたします。