batch download videos from youtube

First fq. Then go to youtube to find a list of favorite videos. Copy it down.

Then go to this site.

https://youtubemultidownloader.com/playlist.html

Paste the url to the location marked with the red pen.

Then copy what you got below. Open idm--->>task--->>batch import from clipboard.

。。。

The link to this article is http://www.cnblogs.com/zimudao

。。。

Then I don't know why, the file name becomes video1, video2.... and so on. This road feels boring, don't do it

 

I can still do it with python.

First installed win32api. Address: https://sourceforge.net/projects/pywin32/files/pywin32/

Then I found a piece of code

1 import win32api
2 import win32con
3 本文链接 http://www.cnblogs.com/zimudao
4 win32api.mouse_event(win32con.MOUSEEVENTF_WHEEL,0,0,-1)

In this way, the wheel can only be realized once, and a cycle needs to be added.

1 import win32api
2 import win32con
3 本文链接 http://www.cnblogs.com/zimudao
4 win32api.mouse_event(win32con.MOUSEEVENTF_WHEEL,0,0,-1)

Then I found that the roll was too fast, and added the timing function

1 import win32api
2 import win32con
3 import time
4 while(1):本文链接 http://www.cnblogs.com/zimudao
5     win32api.mouse_event(win32con.MOUSEEVENTF_WHEEL,0,0,-1)
6     time.sleep(0.1)

Then open the mouse connector. Set to click every 100ms. It happens that chrome downloads something will have a little casting delay, just finished downloading

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325100012&siteId=291194637