📄 parselink.cpp
字号:
/*************************************************************************** ParseLink.cpp - description ------------------- begin : April 3, 2005 ParseLink: Parse linkss from raw data. usage: ParseLink SrcFile ***************************************************************************/#include "WebDataFile.h"#include <sys/types.h>#include <sys/stat.h>#include <unistd.h>#include <dirent.h>#include <iostream>#include <string>#include <vector>#include <cstdlib>#include <time.h>using namespace std;int main(int argc, char* argv[]){ if( argc != 2 ){ cout << "ExtractUrl: Extract Urls from raw data." << endl; cout << "usage:\t ExtractUrl RawDataFile" << endl; return -1; } //InitDataBuffer CWebDataFile iWebDataFile; if(! iWebDataFile.InitDataBuffer()){ std::cerr << "Insuficient memory.\n"; return -2; } //OpenFile char* sFileName = argv[1]; if(! iWebDataFile.OpenFile(sFileName)){ cout << "Fail to open file \"" << sFileName << "\"" << endl; return -3; } //cout << "Open file " << sFileName << "...\n"; while(true){ // Get a page object to process if(! iWebDataFile.GetAWebPage((string)argv[1])){ cout << "Error: GetAWebPage() returned a false!" << endl; break; } } iWebDataFile.CloseFile();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -