質問編集履歴

1

errorを追加しました。

2018/01/16 03:55

投稿

Nippun
Nippun

スコア1147

test CHANGED
File without changes
test CHANGED
@@ -25,3 +25,111 @@
25
25
  pytubeは8.02です。
26
26
 
27
27
  どうすれば動くようになりますか?
28
+
29
+
30
+
31
+ ```Python
32
+
33
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1318, in do_open
34
+
35
+ encode_chunked=req.has_header('Transfer-encoding'))
36
+
37
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1239, in request
38
+
39
+ self._send_request(method, url, body, headers, encode_chunked)
40
+
41
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1285, in _send_request
42
+
43
+ self.endheaders(body, encode_chunked=encode_chunked)
44
+
45
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1234, in endheaders
46
+
47
+ self._send_output(message_body, encode_chunked=encode_chunked)
48
+
49
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1026, in _send_output
50
+
51
+ self.send(msg)
52
+
53
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 964, in send
54
+
55
+ self.connect()
56
+
57
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1400, in connect
58
+
59
+ server_hostname=server_hostname)
60
+
61
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 407, in wrap_socket
62
+
63
+ _context=self, _session=session)
64
+
65
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 814, in __init__
66
+
67
+ self.do_handshake()
68
+
69
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1068, in do_handshake
70
+
71
+ self._sslobj.do_handshake()
72
+
73
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 689, in do_handshake
74
+
75
+ self._sslobj.do_handshake()
76
+
77
+ ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)
78
+
79
+
80
+
81
+ During handling of the above exception, another exception occurred:
82
+
83
+
84
+
85
+ Traceback (most recent call last):
86
+
87
+ File "<pyshell#6>", line 1, in <module>
88
+
89
+ yt = YouTube(url)
90
+
91
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pytube/__main__.py", line 83, in __init__
92
+
93
+ self.prefetch_init()
94
+
95
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pytube/__main__.py", line 91, in prefetch_init
96
+
97
+ self.prefetch()
98
+
99
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pytube/__main__.py", line 147, in prefetch
100
+
101
+ self.watch_html = request.get(url=self.watch_url)
102
+
103
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pytube/request.py", line 21, in get
104
+
105
+ response = urlopen(url)
106
+
107
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 223, in urlopen
108
+
109
+ return opener.open(url, data, timeout)
110
+
111
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 526, in open
112
+
113
+ response = self._open(req, data)
114
+
115
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 544, in _open
116
+
117
+ '_open', req)
118
+
119
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 504, in _call_chain
120
+
121
+ result = func(*args)
122
+
123
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1361, in https_open
124
+
125
+ context=self._context, check_hostname=self._check_hostname)
126
+
127
+ File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1320, in do_open
128
+
129
+ raise URLError(err)
130
+
131
+ urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)>
132
+
133
+ コード
134
+
135
+ ```