资源简介
httrack_x64-noinst-3.48.22(网站下载器).zip
代码片段和文件信息
/*
HTTrack external callbacks example : enforce a constant base href
Can be useful to make copies of site‘s archives using site‘s URL base href as root reference
.c file
How to build: (callback.so or callback.dll)
With GNU-GCC:
gcc -O -g3 -Wall -D_REENTRANT -shared -o mycallback.so callbacks-example.c -lhttrack1
With MS-Visual C++:
cl -LD -nologo -W3 -Zi -Zp4 -DWIN32 -Fe“mycallback.dll“ callbacks-example.c libhttrack1.lib
Note: the httrack library linker option is only necessary when using libhttrack‘s functions inside the callback
How to use:
httrack --wrapper mycallback ..
*/
#include
#include
#include
/* Standard httrack module includes */
#include “httrack-library.h“
#include “htsopt.h“
#include “htsdefines.h“
/* Local function definitions */
static int process_file(t_hts_callbackarg *carg httrackp* opt char* html int len const char* url_address const char* url_file);
static int check_detectedlink(t_hts_callbackarg *carg httrackp* opt char* link);
static int check_detectedlink_end(t_hts_callbackarg *carg httrackp *opt);
/*
module entry point
*/
EXTERNAL_FUNCTION int hts_plug(httrackp *opt const char* argv) {
const char *arg = strchr(argv ‘‘);
if (arg != NULL)
arg++;
/* Check args */
fprintf(stderr “Plugged..\n“);
if (arg == NULL || *arg == ‘\0‘ || strlen(arg) >= HTS_URLMAXSIZE / 2) {
fprintf(stderr “** callback error: arguments expected or bad arguments\n“);
fprintf(stderr “usage: httrack --wrapper modulenamebase\n“);
fprintf(stderr “example: httrack --wrapper callbackhttp://www.example.com/\n“);
return 0; /* failed */
} else {
char *callbacks_userdef = strdup(arg); /* userdef */
/* Plug callback functions */
CHAIN_FUNCTION(opt check_html process_file callbacks_userdef);
CHAIN_FUNCTION(opt linkdetected check_detectedlink callbacks_userdef);
CHAIN_FUNCTION(opt end check_detectedlink_end callbacks_userdef);
fprintf(stderr “Using root ‘%s‘\n“ callbacks_userdef);
}
return 1; /* success */
}
static int process_file(t_hts_callbackarg *carg httrackp* opt char* html int len const char* url_address const char* url_file) {
char* prevbase;
/* Call parent functions if multiple callbacks are chained. */
if (CALLBACKARG_PREV_FUN(carg check_html) != NULL) {
if (!CALLBACKARG_PREV_FUN(carg check_html)(CALLBACKARG_PREV_CARG(carg) opt html len url_address url_file)) {
return 0; /* Abort */
}
}
/* Disable base href if any */
if ( ( prevbase = strstr(html “se HREF=\““) ) != NULL) {
prevbase[1] = ‘X‘;
}
return 1; /* success */
}
static int check_detectedlink(t_hts_callbackarg *carg httrackp* opt char* link) {
const char *base = (char*) CALLBACKARG_USERDEF(carg);
/* Call parent functions if multiple callbacks are chained. */
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 385 2000-12-13 19:09 file_id.diz
目录 0 2016-04-26 17:48 httrack\
文件 154112 2016-04-26 17:34 httrack\zlib1.dll
文件 683504 2016-04-26 17:41 httrack\WinHTTrack.exe
文件 9256 2016-04-26 17:41 httrack\webhttrack.lib
文件 5131 2016-04-26 17:41 httrack\webhttrack.exp
文件 94192 2016-04-26 17:41 httrack\webhttrack.exe
文件 357376 2014-10-15 07:14 httrack\ssleay32.dll
文件 9256 2016-04-26 17:41 httrack\proxytrack.lib
文件 5137 2016-04-26 17:41 httrack\proxytrack.exp
文件 345072 2016-04-26 17:41 httrack\proxytrack.exe
文件 627200 2010-02-14 14:19 httrack\msvcr90.dll
文件 2356 2010-02-14 14:19 httrack\Microsoft.VC90.MFC.manifest
文件 1859 2010-02-14 14:19 httrack\Microsoft.VC90.CRT.manifest
文件 1671160 2010-02-14 14:19 httrack\mfc90.dll
文件 357376 2014-10-15 07:14 httrack\libssl32.dll
文件 762880 2016-04-26 17:41 httrack\libhttrack.dll
文件 1651712 2014-10-15 07:13 httrack\libeay32.dll
文件 27136 2016-04-26 17:41 httrack\httrack.exe
文件 207856 2016-04-26 17:41 httrack\htsswf.dll
文件 73712 2016-04-26 17:41 httrack\htsjava.dll
目录 0 2016-04-26 17:35 httrack\src\
目录 0 2016-04-26 17:10 httrack\src\coucal\
文件 1509 2016-04-26 17:10 httrack\src\coucal\LICENSE
文件 1132 2016-04-26 17:10 httrack\src\coucal\Makefile
文件 7554 2016-04-26 17:10 httrack\src\coucal\tests.c
文件 2902 2016-04-26 17:10 httrack\src\coucal\sample.c
文件 3366 2016-04-26 17:10 httrack\src\coucal\murmurhash3.h.orig
文件 769 2016-04-26 17:10 httrack\src\coucal\murmurhash3.h.diff
文件 3787 2016-04-26 17:10 httrack\src\coucal\murmurhash3.h
文件 18635 2016-04-26 17:10 httrack\src\coucal\coucal.h
............此处省略526个文件信息
相关资源
- RFID_TEST.zip
- myeclipse2016Stable1.0.rar
- 图像处理标准图像库非常齐全.rar
- 苹果CMSv10模板.zip
- tensorflow指南.pdf
- 如何学习QT-绝对经典.zip
- 鸣鹤房产中介版v1.2.6开源公众号应用
- Pandownload_203.zip
- 先电大数据平台操作手册-XianDian-Big
- 格林财务软件真正永久注册版.exe
- layui-springmvc-imgupload.zip
- 性别检测20151210.ppt
- 考试练习自制软件系统,随机抽题考
- qq_15099569_9208019.zip
- setup-cyowcopy-1.6.0-build-555.rar
- nodejs深入浅出.pdf
- 网络通讯协议关系图[中文珍藏版][P
- optisystem7初级入门中文讲义网络版.p
- CadenceIC617安装全过程.pdf
- QuidwaySVNClient.exe
- Effective.Modern.C.rar
- 一键定时Y自动S预约U座位+重约+后台抢
- GBT+51212-2016+建筑信息模型应用统一标
- VSPD6.9中文破解版.rar
- 百达卡达晶控晶创延期.vmp.exe
- rar(19)
- 220ddc4f0dfcdbc35b693cd005ac3e16.rar
- 林业档案管理.rar
- 隐写工具.zip
- redis监控.rar
评论
共有 条评论