如何从命令行继续 HTTrack 镜像会话?

如何从命令行继续 HTTrack 镜像会话?

我想使用命令提示符而不是 WinHTTrack 界面来驱动我的镜像项目,以便我可以更轻松地编写脚本和安排镜像会话。

输出httrack --help给出了继续中断的镜像会话的简单命令:

example: httrack --continue
continues a mirror in the current folder

当我尝试httrack --continue进入我的 HTTrack 项目文件夹时,我得到的只是如下输出:

Example: -%F "<!-- Mirrored from %s by HTTrack Website Copier/3.x [XR&CO'2010], %s -->"
* Option %F needs to be followed by a blank space, and a footer string

为了便于阅读,每个参数都占一行,我的doit.log文件的第一行如下所示:

-qiC1%P0s0b0u1j0%s%u0N0%I0p1DaK0c1T30H0%kf2E1800A25000%c0.1%f#f 
-F "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" 
-%F "" 
-%l "en, en, *" 
http://saa.gov.uk/search.php?SEARCHED=1&SEARCH_TABLE=council_tax&SEARCH_TERM=City+of+Edinburgh&DISPLAY_COUNT=100 
-O1 
"C:\\Users\\Iain\\Projects\\Council Tax Analysis\\Code\\HTTrack\\Council Tax Valuation List" 
-* \
+*search.php?SEARCHED=1* 
-*DISPLAY_MODE=FULL*

该参数%F ""应该告诉 HTTrack 使用空页脚。

我使用 WinHTTrack 界面创建项目并启动镜像会话。我可以使用该界面中断和继续镜像会话。

WinHTTrack 保存没有页脚的 HTML 文件。

答案1

%F我通过从中删除选项解决了该问题doit.log

现在httrack --continue确实继续镜像我的项目。

镜像会话结束后,控制台输出如下所示:

Mirror launched on Sat, 24 Nov 2012 19:22:10 by HTTrack Website Copier/3.46+htsswf+htsjava [XR&CO'2010]
mirroring http://saa.gov.uk/search.php?SEARCHED=1&SEARCH_TABLE=council_tax&SEARCH_TERM=City+of+Edinburgh&DISPLAY_COUNT=100 -* +*search.php?SEARCHED=1* -*DISPLAY_MODE=FULL* with the wizard help..
Done.
Thanks for using HTTrack!

HTTrack 为新文件添加了页脚:

<!-- Mirrored from saa.gov.uk/search.php?SEARCHED=1&SEARCH_TABLE=council_tax&SEARCH_TERM=City+of+Edinburgh%2C+EDINBURGH&DISPLAY_COUNT=100&PAGE=0&ASSESSOR_ID=&TYPE_FLAG=C&ORDER_BY=SET+DESC&ORIGINAL_SEARCH_TERM=City+of+Edinburgh&DRILL_SEARCH_TERM=CLAREMONT+GARDENS%2C+EDINBURGH&DD_TOWN=EDINBURGH&DD_STREET=CLAREMONT+GARDENS by HTTrack Website Copier/3.x [XR&CO'2010], Sat, 24 Nov 2012 19:52:28 GMT -->

我并不真的想要页脚,但至少我可以从命令提示符控制 HTTrack。

相关内容