通过Python使用wget [英] Using wget via Python
本文介绍了通过Python使用wget的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用wget使用Python下载文件(视频)并将其保存在本地?一堆文件,所以我怎么知道一个文件被下载了,以便自动开始下载另一个文件?
How would I download files (video) with Python using wget and save them locally? There will be a bunch of files, so how do I know that one file is downloaded so as to automatically start downloding another one?
谢谢.
推荐答案
简短答案(简体).获取一个文件
Short answer (simplified). To get one file
import urllib
urllib.urlretrieve("http://google.com/index.html", filename="local/index.html")
如果有必要,您可以弄清楚如何循环播放.
You can figure out how to loop that if necessary.
这篇关于通过Python使用wget的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文