from proxy.proxy_valid import ValidIp from api.rest_api import RestApi from util.util_function import CheckDir, DownloadFile, WriteInfo from util.log_handler import LogHandler from util.config import GetConfig # change: 定义当前爬虫名字 app = "uid5" # change: 每次请求 uid 数量 req_nums = 200 log = LogHandler(app) # 初始化 api = RestApi() configs = GetConfig() url_address = 'http://www.jiayuan.com/' #当前文件的路径 csv_path = project_path + '\logs\csv\\' #输出文件夹 out_dir = './download.new' # cookie = GetUserCookie() error_num = 0 # proxies = ValidIp(True,'https://www.jiayuan.com')
#coding=utf-8 import sys import logging sys.path.append('..') from util.log_handler import LogHandler # 引入模块 from api.rest_api import RestApi # 初始化 api = RestApi() # 创建处理记录 # api.create_record(name) # 传入参数: # name: 2018-04-09 晴 上午 # 返回参数 : 14 api.create_record(100) # 创建视频记录 # api.create_video(id, name) # # 传入参数: # id: 处理记录 返回 id # name: 视频处理后文件夹名 # 返回参数 : 11 api.create_video(1, "上方视频")