RedditVideoMakerBot icon indicating copy to clipboard operation
RedditVideoMakerBot copied to clipboard

Error after youtube video download

Open Shadowles19 opened this issue 4 years ago • 2 comments

Downloading the background video... please be patient 🙏 Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1348, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1328, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1277, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1037, in _send_output self.send(msg) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 975, in send self.connect() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1454, in connect self.sock = self._context.wrap_socket(self.sock, File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 512, in wrap_socket return self.sslsocket_class._create( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1070, in _create self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1341, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/bradyn/Documents/GitHub/RedditVideoMakerBot/main.py", line 20, in download_background() File "/Users/bradyn/Documents/GitHub/RedditVideoMakerBot/video_creation/background.py", line 26, in download_background YouTube("https://www.youtube.com/watch?v=n_Dv4JMiwK8").streams.filter( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pytube/main.py", line 295, in streams self.check_availability() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pytube/main.py", line 210, in check_availability status, messages = extract.playability_status(self.watch_html) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pytube/main.py", line 102, in watch_html self._watch_html = request.get(url=self.watch_url) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pytube/request.py", line 53, in get response = _execute_request(url, headers=extra_headers, timeout=timeout) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pytube/request.py", line 37, in _execute_request return urlopen(request, timeout=timeout) # nosec File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 216, in urlopen return opener.open(url, data, timeout) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 519, in open response = self._open(req, data) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 536, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 496, in _call_chain result = func(*args) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1391, in https_open return self.do_open(http.client.HTTPSConnection, req, File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1351, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>

Shadowles19 avatar Jun 01 '22 19:06 Shadowles19

You only need to download the background file once. This is a hacky soultion but it worked for me:

  1. use a youtube to mp4 website like this one (https://onlinevideoconverter.pro/en81/youtube-downloader-mp4)
  2. paste the youtube link into it (https://www.youtube.com/watch?v=n_Dv4JMiwK8)
  3. download in 720p
  4. rename the video to "background.mp4"
  5. create a new folder inside of "assets" called "mp4"
  6. drag the finished mp4 into the mp4 file
  7. enjoy! please lmk if you have any more issues.

VaughnBosu avatar Jun 02 '22 05:06 VaughnBosu

Hi @Shadowles19 .

I hope you were able to resolve your issue as there has not been activity in this Issue, I will be closing this for the time being. Feel free to re-open the issue if it has not been solved!!

Happy Coding!

FreebieII avatar Jun 06 '22 18:06 FreebieII