コード例 #1
0
def setup_data(phone):
    phone_list = []
    # url_b = 'http://10.1.200.141:9004/entry/registration'
    url_b = 'http://127.0.0.1:9004/entry/registration'
    data_b = {"countryCode": "00852", "phone": phone, "type": 'b'}
    r1 = json_post(url=url_b, headers={}, data=data_b, remark='注册B端')
    if r1['state'] == 1:
        url = 'http://127.0.0.1:9004/jianzhao/company/registration'
        data = {"countryCode": "00852", "phone": phone}
        r = json_post(url=url, headers={}, data=data, remark='创建公司')
        if r.get('state', 0) == 1:
            phone_list.append(phone)
    return phone_list
コード例 #2
0
def communicateposition():
    url = 'https://gate.lagou.com/v1/entry/im/communicateposition'
    data = {"buserId": 100014641, "positionId": 5378018, "sessionId": 1}
    return json_post(url=url, data=data, headers=header, remark='切换职位卡片')


# communicateposition()
コード例 #3
0
ファイル: orderResumes.py プロジェクト: Ariaxie-1985/aria
def orderResumes_resume_interview(userToken,
                                  resumeId,
                                  positionId,
                                  ip_port=None,
                                  userId=None):
    url = "https://gate.lagou.com/v1/zhaopin/orderResumes/{}/interview".format(
        resumeId)
    header = app_header_999(userToken=userToken, DA=False, userId=userId)
    ten_min_after = datetime.datetime.now() - datetime.timedelta(minutes=-10)
    ten_min_after_timestamp = time.mktime(ten_min_after.timetuple()) * 1000
    data = {
        "orderResumeId": resumeId,
        "templateId": 0,
        "contact": "王子",
        "positionId": positionId,
        "interviewTime": ten_min_after_timestamp,
        "contactAddress": "北京市海淀区海置创投大厦4楼",
        "contactPhone": "16601010101",
        "addInfo": "请提前10分钟到,谢谢"
    }
    remark = "邀约面试"
    return json_post(url=url,
                     headers=header,
                     data=data,
                     remark=remark,
                     ip_port=ip_port,
                     rd='mandy')
コード例 #4
0
def search_positions(userToken, userId=None, ip_port=None, **kw):
    city = kw.get('city', '北京')
    keyword = kw.get('keyword', '测试')
    showId = kw.get('showId', "")
    salaryLower = kw.get('salaryLower', 20000)
    salaryUpper = kw.get('salaryUpper', 35000)
    header = app_header_999(userToken, DA=False, userId=userId)
    url = 'https://gate.lagou.com/v1/entry/positionsearch/searchPosition'
    data = {
        "keyword": keyword,
        "hiTag": "",
        "refreshHiTagList": True,
        "shieldDeliveyCompany": False,
        "sort": "0",
        "showId": showId,
        "workExperience": ["5-10年"],
        "keywordSource": 0,
        "lastShowCompanyId": 0,
        "isAd": "1",
        "tagType": "",
        "salaryLower": salaryLower,
        "city": city,
        "salaryUpper": salaryUpper,
        "education": [],
        "jobNature": [],
        "pageNo": 1,
        "longitudeAndLatitude": "-1.000000,-1.000000",
        "pageSize": 15
    }
    return json_post(url=url,
                     data=data,
                     headers=header,
                     remark='搜索职位',
                     ip_port=ip_port,
                     rd='royliu')
コード例 #5
0
ファイル: convert_pytest.py プロジェクト: Ariaxie-1985/aria
def run_case(
        url,
        method,
        content_type,
        header,
        body,
        remark):
    if method == 'GET':
        jsonData = get_requests(
            url=url, headers=header, remark=remark)
    elif method == 'POST' or method == 'PUT' or method == 'DELETE':
        if content_type == 'application/x-www-form-urlencoded':
            requets_data = dict()
            for i in body['urlencoded']:
                requets_data[i['key']] = i['value']

            jsonData = form_post(
                url=url,
                data=requets_data,
                headers=header,
                remark=remark)
        elif content_type == 'application/x-www-form-urlencoded':
            requets_data = json.loads(body['raw'])
            jsonData = json_post(
                url=url,
                data=requets_data,
                headers=header,
                remark=remark)
        else:
            jsonData = form_post(url=url, headers=header, remark=remark)

    return jsonData
コード例 #6
0
ファイル: deliver.py プロジェクト: Ariaxie-1985/aria
def deliver_create(positionId,
                   resumeId,
                   resumeType,
                   isTalk=True,
                   userToken=None,
                   H9=False):
    url = 'https://gate.lagou.com/v1/entry/deliver/create'
    if H9 == True:
        header = app_header_999(userToken, DA=False)
    else:
        header = get_app_header_new(userId=100014648,
                                    X_L_REQ_HEADER={
                                        "appVersion": "V_70000_1",
                                        "deviceType": 150,
                                        "reqVersion": 71300,
                                        "userType": 0
                                    })
    data = {
        "isTalk": isTalk,
        "positionId": int(positionId),
        "resumeId": resumeId,
        "resumeType": resumeType
    }
    remark = '投递简历'

    return json_post(url=url,
                     headers=header,
                     data=data,
                     remark=remark,
                     rd='征桂')
コード例 #7
0
def workExperiences(userToken, mutongStrategy=None, **kwargs):
    url = 'https://gate.lagou.com/v1/neirong/workExperiences/'
    startDate = kwargs.get('startDate', '2015.09')
    endDate = kwargs.get('endDate', '至今')
    companyName = kwargs.get('companyName', '杰威尔音乐有限公司')
    data = {
        "id": 0,
        "workContent": "<p>跟进迭代测试工作,用户反馈;</p><p>dubbo接口测试,http接口测试</p>",
        "positionType1": "销售类",
        "isFilter": True,
        "positionType": "销售顾问",
        "positionType2": "销售",
        "endDate": endDate,
        "positionName": "艺人经纪",
        "companyName": companyName,
        "startDate": startDate,
        "companyIndustry": "分类信息",
        "department": "用户价值部",
        "skillLabels": ["测试"]
    }
    if mutongStrategy == 'A':
        del data['skillLabels']
        data['isGuide'] = '1'
        # data['workContent']=''
        # 调用附件上传接口并成功

    header = app_header_999(userToken, DA=False)
    return json_post(url=url, data=data, headers=header, remark="提交工作经历", rd='征桂')
コード例 #8
0
def publish_position(userToken, userId=None, ip_port=None):
    '''
    发布职位
    :return:
    '''
    url = "https://gate.lagou.com/v1/zhaopin/positions/publish"
    data = {
        "isConfirm": True,
        "recruitmentType": 1,
        "typeId": 0,
        "recommend": False,
        "positionType": "测试",
        "workYear": "3-5年",
        "positionDesc": "<p>由于岗位称谓每个公司不尽相同,所以发布职位时同一职位我们会以不同标题发布多条。</p>",
        "labels": [{
            "name": "电商",
            "id": 1
        }],
        "salaryMin": 15,
        "positionDescPlainText": "\n1、组织完成项目质量计划,针对项目问题组织回溯,推动短板改进;\n2、进行质量文化宣传培训,提升项目的质量效率;",
        "positionName": "拉勾测试测试工程师" + str(random.randint(0, 99)),
        "positionThirdType": "测试工程师",
        "firstType": "开发|测试|运维类",
        "positionBrightPoint": "每年18薪",
        "education": "本科",
        "jobNature": "全职",
        "department": "",
        # "workAddressId" : 1629630,
        "workAddressId": 1560096,
        "salaryMax": 25
    }
    remark = "发布职位"
    headers = app_header_999(userToken, DA=False, userId=userId)
    return json_post(url=url, headers=headers, data=data, remark=remark, ip_port=ip_port, rd='royliu')
コード例 #9
0
ファイル: exchange.py プロジェクト: Ariaxie-1985/aria
def exchange(goodsid):
    url = 'https://jf.lagou.com/integral/mall/goods/exchange.json'
    data = {'goodsId': goodsid, 'deviceType': 'web'}
    header = get_code_token('https://jf.lagou.com/task/center/index.htm')
    return json_post(url=url, data=data, remark='h5兑换积分商品', headers=header)


# exchange()
コード例 #10
0
ファイル: admin_review.py プロジェクト: Ariaxie-1985/aria
def admin_review(userid):
    url = "https://easy.lagou.com/bstatus/auth/manager/assist.json"
    header = get_header(url="https://easy.lagou.com/im/chat/index.htm")
    data = {'applyUserId': userid, 'confirmButton': 'true'}
    return json_post(url=url,
                     headers=header,
                     data=data,
                     remark="管理员审核通过",
                     rd='王豪')
コード例 #11
0
def modify_password(userToken):
    url = 'https://gate.lagou.com/v1/entry/account/me/modifyPassword'
    header = get_edu_app_header(userToken, DA=False)
    data = {"oldPassword": "", "newPassword": "******"}
    return json_post(url=url,
                     remark="设置验证码",
                     headers=header,
                     data=data,
                     rd="曾小宁")
コード例 #12
0
def positions_tag_report(firstCateGory, secCategory, tagName):
    url = host + "/positions/tag_report"
    data = {
        "secCategory": secCategory,
        "firstCateGory": firstCateGory,
        "tagName": tagName
    }
    remark = "职位标签上报"
    return json_post(url=url, headers=headers, data=data, remark=remark)
コード例 #13
0
def positions_recommend(positionId):
    '''
    职位推荐
    :param positionId: int, 职位id
    :return:
    '''
    url = host + "/positions/recommend?positionId=" + positionId
    remark = "获取职位推荐"
    return json_post(url=url, headers=headers, remark=remark)
コード例 #14
0
def company_attention_list(userToken, userId=None, ip_port=None):
    url = 'https://gate.lagou.com/v1/entry/company/attention/list'
    header = app_header_999(userToken=userToken, DA=False, userId=userId)
    data = {"pageNo": 1, "pageSize": 10}
    remark = '查询关注的公司列表'
    return json_post(url=url,
                     headers=header,
                     data=data,
                     remark=remark,
                     ip_port=ip_port)
コード例 #15
0
ファイル: orderResumes.py プロジェクト: Ariaxie-1985/aria
def orderResumes_process_save(userToken, content, resumeId):
    url = host + '/orderResumes/process/save'
    data = {"content": content, "resumeId": resumeId}
    header = app_header_999(userToken=userToken, DA=False)
    remark = '提交简历评价'
    return json_post(url=url,
                     data=data,
                     headers=header,
                     remark=remark,
                     rd='mandy')
コード例 #16
0
def personalCards(userToken, mutongStrategy=None):
    url = 'https://gate.lagou.com/v1/neirong/personalCards/'
    data = {
        "selfDescription": "<p>虽然我是学生,但我很有冲劲,选我吧!</p>"
    }
    if mutongStrategy == 'A':
        data["selfDescription"] = ''
        data['headPic'] = ''
    header = app_header_999(userToken, DA=False)
    return json_post(url=url, data=data, headers=header, remark="提交个人名片", rd='征桂')
コード例 #17
0
def company_attention_delete(userToken, companyId, userId=None, ip_port=None):
    url = 'https://gate.lagou.com/v1/entry/company/attention/delete'
    header = app_header_999(userToken=userToken, DA=False, userId=userId)
    data = {"companyId": companyId}
    remark = '取消关注已关注的公司'
    return json_post(url=url,
                     headers=header,
                     data=data,
                     remark=remark,
                     ip_port=ip_port)
コード例 #18
0
ファイル: collect.py プロジェクト: Ariaxie-1985/aria
def collect_add(userToken, positionId, userId=None, ip_port=None):
    url = 'https://gate.lagou.com/v1/entry/position/collect/add'
    header = app_header_999(userToken=userToken, DA=False, userId=userId)
    data = {"positionId": positionId}
    remark = "收藏职位"
    return json_post(url=url,
                     headers=header,
                     data=data,
                     remark=remark,
                     ip_port=ip_port)
コード例 #19
0
def bing_or_change_phone(userToken, countryCode, phone, verifyCode):
    url = 'https://gate.lagou.com/v1/entry/account/me/bindOrChangePhone'
    header = app_header_999(userToken, DA=False)
    data = {
        "countryCode": countryCode,
        "phone": phone,
        "businessType": "CHANGE_BIND_PHONE",
        "verifyCode": verifyCode
    }
    return json_post(url=url, remark="更换C端用户的手机号", headers=header, data=data)
コード例 #20
0
ファイル: collect.py プロジェクト: Ariaxie-1985/aria
def collect_list(userToken, userId=None, ip_port=None):
    url = 'https://gate.lagou.com/v1/entry/position/collect/list'
    header = app_header_999(userToken=userToken, DA=False, userId=userId)
    data = {"clearRedDot": True, "pageNo": 1, "pageSize": 10}
    remark = "收藏职位列表"
    return json_post(url=url,
                     headers=header,
                     data=data,
                     remark=remark,
                     ip_port=ip_port)
コード例 #21
0
ファイル: requests_test.py プロジェクト: Ariaxie-1985/aria
def post_requests_json():
    payload = {
        "positionId": 8834,
        "positionName": "高级市场营销经理",
        "firstType": "市场|商务类",
        "positionType": "市场|营销",
        "positionThirdType": "市场营销",
        "workAddress": "北京市海淀区时代网络大厦4层"
    }
    r = json_post('http://127.0.0.1:18980/data/position', data=payload)
    return r
コード例 #22
0
def autoInviteSwitch_open(autoInviteType, status, userToken):
    '''

    :param autoInviteType: int, 邀约类型 1特权/普通职位,2无曝光职位
    :param status: int, 开关状态 1关闭,2开启
    :return:
    '''
    url = host + "/autoInviteSwitch/open"
    data = {"autoInviteType": autoInviteType, "status": status}
    headers = app_header_999(userToken, DA=False)
    remark = "开关"
    return json_post(url=url, headers=headers, data=data, remark=remark)
コード例 #23
0
ファイル: toB_saveHR_1.py プロジェクト: Ariaxie-1985/aria
def submit_new():
    submit_url = "https://hr.lagou.com/corpCenter/auth/person/idcard/submit.json"
    submit_data = {
        "imgUrl": "i/image2/M01/B0/0F/CgotOV3mDn6AQdeXAABc2chZae0419.png"
    }
    step2_url = 'https://hr.lagou.com/corpCenter/openservice/step2.html'
    submit_header = get_code_token(step2_url)
    remark = "验证B端提交招聘者审核是否成功"
    return json_post(url=submit_url,
                     data=submit_data,
                     headers=submit_header,
                     remark=remark,
                     rd='王豪')
コード例 #24
0
ファイル: course.py プロジェクト: Ariaxie-1985/aria
def exchange_present(gateLoginToken):
    data = {"presentId": 5}
    url = 'https://gate.lagou.com/v1/neirong/course/user_growth/exchangePresent'
    header = {
        "Cookie": f"gate_login_token ={gateLoginToken};",
        "X-L-REQ-HEADER": "{deviceType:1}"
    }
    remarke = '礼物兑换成功'
    return json_post(url=url,
                     headers=header,
                     remark=remarke,
                     data=data,
                     rd='Bob')
コード例 #25
0
ファイル: course.py プロジェクト: Ariaxie-1985/aria
def receive_credit(gateLoginToken):
    data = {"taskAbbreviation": "CREDIT_CENTER_DAILY_LOGIN"}
    url = 'https://gate.lagou.com/v1/neirong/course/user_growth/receiveCredit'
    header = {
        "Cookie": f"gate_login_token ={gateLoginToken};",
        "X-L-REQ-HEADER": "{deviceType:1}"
    }
    remarke = '学分领取成功'
    return json_post(url=url,
                     headers=header,
                     remark=remarke,
                     data=data,
                     rd='Bob')
コード例 #26
0
def expectJob(userToken):
    url = 'https://gate.lagou.com/v1/entry/expectJob'
    data = {
        "positionNameType2": "影视|媒体",
        "expectStatus": "积极找工作",
        "expectCity": "北京",
        "positionType": "实习",
        "positionName": "经纪人|星探",
        "expectArrivalTime": "随时",
        "positionNameType1": "文娱|传媒|艺术|体育",
        "expectSalary": "8k-12k"
    }
    header = app_header_999(userToken, DA=False)
    return json_post(url=url, data=data, headers=header, remark="提交求职意向", rd='征桂')
コード例 #27
0
def batchCancel(userIds, userToken=None):
    url = 'https://gate.lagou.com/v1/entry/helper/user/batchCancel'
    header = app_header_999(userToken, DA=False)
    data = {
        "ps":
        "fd7b546cfddb50deead1e5e89123a37fd71626ab06a5c155a7exxxdeead1e5e89123a37fd71626ab",
        "userIds": str(userIds)
    }
    remark = "注销账号"
    return json_post(url=url,
                     headers=header,
                     data=data,
                     remark=remark,
                     rd='曾小宁')
コード例 #28
0
ファイル: positionindex.py プロジェクト: Ariaxie-1985/aria
def new(userToken, expectJobId, filterCity='北京', ip_port=None, userId=None):
    url = 'https://gate.lagou.com/v1/entry/positionindex/new'
    header = app_header_999(userToken=userToken, userId=userId)
    data = {
        "pageSize": 10,
        "salaryLower": 0,
        "pageNo": 1,
        "expectJobPageNo": 1,
        "shieldDeliveryCompany": False,
        "salaryUpper": 0,
        "filterCity": filterCity,
        "expectJobId": expectJobId
    }
    return json_post(url=url, data=data, headers=header, remark='推荐职位', ip_port=ip_port, rd='royliu')
コード例 #29
0
ファイル: searchCompany.py プロジェクト: Ariaxie-1985/aria
def searchCompany(userToken):
    url = 'https://gate.lagou.com/v1/entry/positionsearch/searchCompany'
    data = {
        "city": "北京",
        "keyword": "Java",
        "pageNo": 1,
        "pageSize": 5,
        "sortType": 0
    }
    header = app_header_999(userToken, DA=False)
    return json_post(url=url,
                     data=data,
                     headers=header,
                     remark='搜索公司',
                     rd='王豪')
コード例 #30
0
def reward(taskLabel, taskGroup, rcode):
    url = 'https://jf.lagou.com/task/center/receive/reward.json'
    header = get_code_token('https://jf.lagou.com/task/center/index.htm')
    data = {
        'taskLabel': taskLabel,
        'taskGroup': taskGroup,
        'rcode': rcode,
        'isAllReceive': False,
        'deviceType': 'web'
    }
    return json_post(url=url, headers=header, data=data, remark='领取')


# tasks()
# reward()