login about faq

Hi, I have a program that find in the database the already crawled links, then I want to add it to the spidered list with SkipUnspidered function (I haven't find a better way) This function take the index of the URL in the Unspidered List and must put it in the Spidered List But that list remains empty

Here my code :
std::string temp;
std::string s = ""ur":["";
size_t begin = json.find(s);
size_t end = json.find(""]",begin);
bool b = true;
temp = json.substr(begin + s.size(), end - begin - s.size());
this->spider->AddUnspidered(temp.c_str());
this->spider->SkipUnspidered(0);
while (b)
{
begin = json.find(s, end);
if (begin != std::string::npos)
{
end = json.find(""]", begin);
temp = json.substr(begin + s.size(), end - begin - s.size());
this->spider->AddUnspidered(temp.c_str());
this->spider->SkipUnspidered(0);
}
else
{
b = false;
}
}

asked Oct 22 '15 at 09:07

Nymeria's gravatar image

Nymeria
12

edited Oct 22 '15 at 09:09

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×98
×65

Asked: Oct 22 '15 at 09:07

Seen: 1,015 times

Last updated: Oct 22 '15 at 09:09

powered by OSQA