WGET - Warc-File仅获得主页和机器人页面?

发布于 2025-01-31 05:52:03 字数 372 浏览 2 评论 0原文

我正在尝试在一个小型WARC文件上进行一个小项目。我使用了此命令:

[ ! -f course.warc.gz ] && wget -r -l 3 "https://www.ru.nl/datascience/" --delete-after --no-directories --warc-file="course" || echo Most likely, course.warc.gz already exists

第一次运行它,一切都很好,价值超过150页,惊人。现在,我想从头开始重做它,因此我删除了文件“ course.warc.gz';问题是,当我运行相同的命令时,我会收到3页:一张请求,以及两个机器人页面启动。为什么会发生这种情况?

I am trying to do a little project on a small-ish WARC file. I used this command:

[ ! -f course.warc.gz ] && wget -r -l 3 "https://www.ru.nl/datascience/" --delete-after --no-directories --warc-file="course" || echo Most likely, course.warc.gz already exists

First time I ran it, everything went fine, got over 150 pages worth, amazing. Now I wanted to redo it from scratch, so I deleted the file 'course.warc.gz'; problem is, when I run the same command now I get 3 pages: the one requested for, and two robot pages to boot. Why is this happening?

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

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

发布评论

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

评论(1

可遇━不可求 2025-02-07 05:52:03

wget可以遵循html中的链接,[...]有时将其称为“递归下载”。执行此操作时,WGET尊重机器人排除标准(/robots.txt)。 ( wget Marual

https://www.ru.nl/robots.txt“ rel =“ nofollow noreferrer”> robots.txt 包括以下规则:

# Block alle andere spiders
User-agent: *
Disallow: /

难以回答WGET上一次运行期间发生的事情。也许robots.txt更改了?

Wget can follow links in HTML, [...] This is sometimes referred to as “recursive downloading.” While doing that, Wget respects the Robot Exclusion Standard (/robots.txt). (wget manual)

The robots.txt includes the following rule:

# Block alle andere spiders
User-agent: *
Disallow: /

Difficult to answer whether what happened during the previous run of wget. Maybe the robots.txt changed?

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