模拟网络爬虫

/*
利用wget  指令和队列 模拟实现网络爬虫
利用自己的站点wzsts.host3v.com测试了一下
有一点错误
文件运行后拿到index.html
对于连接仅仅可以拿到 html 和htm 结尾的 而.com的没有考虑(设计文件可能多)
一次测试后了解到如下问题:
1.文件应该有树形话还原网站目录
2.文本记录的连接应该分类化
项目运行需要 su 根权限进行 
因为mv命令
本项目仅仅适合在linux下运行
本项目给真真的linux 爬虫做铺垫
*/
#include
using namespace std;
#include 
#include 
#include 
string s("index.html");
queueq;
 //略去一段
int main()
{
 //index.html
system("wget wzsts.host3v.com");

ofstream out("out.txt"); 
string mv("mv ");
string html(" html");
q.push(s);
  while(!q.empty())
   {
out<            
            
                        
当前题目:模拟网络爬虫
地址分享:http://csruizhi.cn/article/piiidd.html

其他资讯

Copyright © 2007-2024 成都优众联杰科技有限公司 All Rights Reserved 蜀ICP备2024116266号
友情链接: 古蔺网站建设 成都网站建设 成都网站建设 四川成都网站设计 成都营销网站制作 成都网站建设 泸州网站建设 成都网站制作 宜宾网站设计 成都网站制作 企业网站设计 外贸网站设计方案 高端网站设计 营销型网站建设 营销型网站建设 教育网站设计方案 成都网站制作 定制网站建设多少钱 网站制作 高端网站设计推广 H5网站制作 成都网站建设