从多个 url 中提取图像
我想每秒从不同的网址(在 csv 文件中)下载图像。
我可以下载图像。然而,我的代码每秒都会重写图像。我如何每次用不同的名称编写它们,以免覆盖图像?
I want to download images from differenturls (in the csv file) every second.
I can download the images. However, my code over writes the images after every second. How do I write them with different names each time so that it does not overwrite the images?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如您所提到的,您每三秒下载一次图像。我建议您在图像名称之前添加当前时间(以秒为单位)。
我只是给你一个想法。您可以按照自己的风格实现代码。
我这里可能有语法错误,因为我不是 python 开发人员。但是,我希望你能明白。
As you've mentioned you're downloading images every three seconds. I would suggest you add the current time in seconds format before your image name.
I'm just giving you the idea. You can implement your code in your own style.
I might have a syntax error here as I'm not a python-dev. But, I hope you get the idea.