We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在用回调函数on_list_page去获得列表页数据时候, $options = array( 'method' => 'get', 'context_data' => $page_views, );
$phpspider->add_url($content_url, $options);
这个方法不生效, 无法在content 页获得这个options 里的信息。 我猜想是这个$content_url已经在url列表里了, 无法重复再加入。
请问怎么解决这个问题?
The text was updated successfully, but these errors were encountered:
看了看源码,我觉得这里可以处理一下。 我可以改吗:)
$exists = queue::exists($key); // 不存在或者当前URL可重复入 if (!$exists || $allowed_repeat) { // 待爬取网页记录数加一 queue::incr('collect_urls_num'); // 先标记为待爬取网页 queue::set($key, time()); // 入队列 $link = json_encode($link); //根据采集设置为顺序采集还是随机采集,使用列表或集合对象 2018-5 BY KEN <[email protected]> if (self::$configs['queue_order'] == 'rand') { queue::sadd('collect_queue', $link); } else { queue::lpush('collect_queue', $link); } $status = true; }
Sorry, something went wrong.
看了看源码,我觉得这里可以处理一下。 我可以改吗:) $exists = queue::exists($key); // 不存在或者当前URL可重复入 if (!$exists || $allowed_repeat) { // 待爬取网页记录数加一 queue::incr('collect_urls_num'); // 先标记为待爬取网页 queue::set($key, time()); // 入队列 $link = json_encode($link); //根据采集设置为顺序采集还是随机采集,使用列表或集合对象 2018-5 BY KEN <[email protected]> if (self::$configs['queue_order'] == 'rand') { queue::sadd('collect_queue', $link); } else { queue::lpush('collect_queue', $link); } $status = true; }
可以呀, 改完给我提一个patch即可啊
No branches or pull requests
在用回调函数on_list_page去获得列表页数据时候,
$options = array(
'method' => 'get',
'context_data' => $page_views,
);
这个方法不生效, 无法在content 页获得这个options 里的信息。
我猜想是这个$content_url已经在url列表里了, 无法重复再加入。
请问怎么解决这个问题?
The text was updated successfully, but these errors were encountered: