模拟网络爬虫

/*
利用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://www.csruizhi.cn/article/piiidd.html

其他资讯

Copyright © 2007-2024 成都优众联杰科技有限公司 All Rights Reserved 蜀ICP备2024116266号
友情链接: 成都网站设计公司 自适应网站建设 手机网站建设 营销型网站建设 高端网站设计 响应式网站建设 高端网站设计 成都网站建设公司 成都网站建设公司 网站制作 温江网站设计 外贸网站建设 攀枝花网站设计 广安网站设计 泸州网站建设 网站建设开发 成都网站建设 成都网站建设 定制网站建设多少钱 成都网站制作 宜宾网站设计 成都网站建设