Article Directory
1. Description:
Today, I found an error when downloading YouTube videos using the pytube module, but there was no problem with the previous use. Finally, I found an answer in the issue under the pytube project.
Error content:
from pytube.compat import quote ImportError: cannot import name 'quote'
Solutions:
1. Google search:
Put the wrong last two sentences in Google or Baidu search.
from pytube.compat import quote ImportError: cannot import name 'quote'
2. Slowly find solutions:
I am very fortunate that the first one found a solution:
In fact pytube3
, I saw a lot of answers to install , so I guess the module used before was abandoned. . . .
In fact, it mainly consists of the following two lines of code:
pip uninstall pytube
pip install pytube3
try:
The video is downloaded successfully, it's okay.