Commit d817d81c authored by litaolemo's avatar litaolemo

update

parent 53307e8c
...@@ -9,7 +9,7 @@ import random ...@@ -9,7 +9,7 @@ import random
import time import time
import redis, json import redis, json
# from crawler.crawler_sys.utils.rpc_data_to_answer import post_single_data,post_muilty_data from crawler.crawler_sys.utils.rpc_data_to_answer import post_single_data,post_muilty_data
from crawler_sys.utils.output_results import retry_get_url from crawler_sys.utils.output_results import retry_get_url
from crawler.gm_upload.gm_upload import upload, upload_file from crawler.gm_upload.gm_upload import upload, upload_file
from crawler.crawler_sys.scheduler.redis_to_rpc.rpc_config import * from crawler.crawler_sys.scheduler.redis_to_rpc.rpc_config import *
......
...@@ -129,7 +129,7 @@ class Crawler_xiaohongshu(): ...@@ -129,7 +129,7 @@ class Crawler_xiaohongshu():
def releaser_page_by_xiaochengxu(self, releaserUrl, def releaser_page_by_xiaochengxu(self, releaserUrl,
output_to_file=False, output_to_file=False,
filepath=None, filepath=None,
releaser_page_num_max=30, releaser_page_num_max=200,
output_to_es_raw=False, output_to_es_raw=False,
es_index=None, es_index=None,
doc_type=None, doc_type=None,
...@@ -165,7 +165,8 @@ class Crawler_xiaohongshu(): ...@@ -165,7 +165,8 @@ class Crawler_xiaohongshu():
time.sleep(random.randint(1, 2)) time.sleep(random.randint(1, 2))
data_list = res.json() data_list = res.json()
if data_list["code"] != 0 or not data_list["success"]:
break
if data_list: if data_list:
print("get data at releaser: %s page: %s" % (releaser_id, count)) print("get data at releaser: %s page: %s" % (releaser_id, count))
count += 1 count += 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment