如何从网站获取所有图像?

发布于 2024-12-28 13:57:08 字数 1459 浏览 0 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

厌倦 2025-01-04 13:57:08

我建议您查看 这个链接

应该是这样的;

wget -r -A.jpg http://url-to-webpage-with-images/

我之前做的另一种方法,

1) 获取文档的 html 源

2) 解析链接

3) 保存.txt 文件中的链接

4) 之后使用 wget -i file_name.txt

您可以使用 这个通用的类我写的。这很容易理解。只要看看Test.java如何使用该类即可。

I recommend you to take a look at this link

it should be something like this ;

wget -r -A.jpg http://url-to-webpage-with-images/

Another way that I did earlier,

1) get html source of documents

2) parse links

3) save the links in a .txt file

4) after that use wget -i file_name.txt

You can use this generic class I wrote. It is easy to understand. Just look at Test.java how to use the class.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文