Error when running python pytube module: from pytube.compat import quote ImportError: cannot import name'quote'

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:

Address to solve the problem:

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:
Insert picture description here

Insert picture description here

The video is downloaded successfully, it's okay.

Insert picture description here

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_42081389/article/details/108224596