欧美free性护士vide0shd,老熟女,一区二区三区,久久久久夜夜夜精品国产,久久久久久综合网天天,欧美成人护士h版

首頁綜合 正文
目錄

柚子快報邀請碼778899分享:爬蟲 自動化滇醫(yī)通

柚子快報邀請碼778899分享:爬蟲 自動化滇醫(yī)通

http://yzkb.51969.com/

###我已經(jīng)將數(shù)據(jù)爬取出來### 現(xiàn)在開源集合大家的思路一起研究 (請更換ip 以及 暫停時間 不然會提示違規(guī)操作) 腳本讀取預(yù)約信息后開始隨機(jī)搶一家的,qiang方法里面請自行修改抓包數(shù)據(jù)參數(shù)?。? 現(xiàn)在開源大家一起討論

python代碼:

#!/usr/bin/env python

# -*- coding:utf-8 -*-

import requests

import random

import json

import time

# 抓包信息填入

from_date="2021-09-07"#今日日期 請注意格式

end_date="2021-09-14"#14

reg_data="2017-2-20"

Authorization="DYT eyJhbGciOiJIUzI1NiJ9.eyJ3ZWNoYXRfaWQiOjQyMDM5NTUsInN1YnNjcmliZSI6MCwiZHpqX3N1YnNjcmliZSI6MCwib3BlbmlkIjoib19VMzZzNE0yclR0M0NZbG5Zb05jZnZ3UnIwWSIsInRoaXJkX3VzZXJfaWQiOiIiLCJpc3MiOiJkeXQiLCJuZXdfc3Vic2NyaWJlIjowLCJuZXdfb3BlbmlkIjoiIiwiZHpqX29wZW5pZCI6IiIsInVzZXJfaWQiOjI4ODg1MTUsIndlY2hhdF9vcGVuX2lkIjoib19VMzZzNE0yclR0M0NZbG5Zb05jZnZ3UnIwWSIsInVuaW9uX2lkIjoib05RejQwWHpPVkRMdW1acmpBTDZEd1M3NUpCQSIsIm1vY2tfb3BlbmlkIjpmYWxzZSwibWluaV9vcGVuaWQiOiJvaUE0UDVFcnFIdFpFeW5MdjVjbjJTSWRhVlpJIiwiZXhwIjoxNjMxMDI2NDIwLCJpYXQiOjE2MzEwMjA4MjB9.d_wdcEKoUY6yXFPdkZpqk_LbA8pnVuTAS7VP3siM36g"

x_uuid="058F41FDBC3F09683D4E3A96505A4BA8"

acw_tc="0bdd34c216310199867268852e01a12d34c1660f204dfaa7363155fb5343ed"

def dlogin():

host = "https://newdytapi.ynhdkc.com/index/hospital/871958/depart"

#其他醫(yī)院請更改871958 華山871958

params = {

}

headers = {

"Host": "newdytapi.ynhdkc.com",

'Connection': 'keep-alive',

"Accept": "application/json, text/plain, */*",

"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat",

# "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",

"Authorization": Authorization,

"x-uuid": x_uuid,

"Origin": "https://appv2.ynhdkc.com",

"X-Requested-With": "com.tencent.mm",

"Sec-Fetch-Site": "same-site",

"Sec-Fetch-Mode": "cors",

"Sec-Fetch-Dest": "empty",

"Referer": "https://appv2.ynhdkc.com/",

"Accept-Encoding": "gzip, deflate",

"Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7"

}

cookies = {

"acw_tc": acw_tc

}

r = requests.get(host, data=params)

print("函數(shù)dlogn\n",r.json())

# debug = r.json()

code = r.json()['data']['dep_list'][0]

msg = r.json()['code']

if msg != 1:

print("獲取不到信息請檢查接口")

else:

# print(code)

print("======繼續(xù)執(zhí)行?。?!======")

tmp_dep_id = str(code['dep_id'])

print("以獲取===dep_id===hos_code")

global dep_id,hos_code

dep_id = code['dep_id']

hos_code=code['hos_code']

tmp_dep_name = str(code['dep_name'])

tmp_hos_code = str(code['hos_code'])

print("dep_id:", tmp_dep_id)

print("dep_name:", tmp_dep_name)

print("hos_code:", tmp_hos_code)

print("======開始監(jiān)控疫苗開搶狀態(tài)======")

dier(tmp_dep_id,tmp_dep_name,tmp_hos_code)

# 變量存入

def dier(tmp_dep_id,tmp_dep_name,tmp_hos_code):

host = "https://newdytapi.ynhdkc.com/index/doctor?hos_code="+tmp_hos_code+"&dep_id="+tmp_dep_id+"&from_date="+from_date+"&end_date="+end_date+"®_date="+reg_data+"&other_info=undefined&vip=0"

# 其他醫(yī)院請更改871958 華山871958

params = {

}

headers = {

"Host": "newdytapi.ynhdkc.com",

'Connection': 'keep-alive',

"Accept": "application/json, text/plain, */*",

"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat",

"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",

"Authorization": Authorization,

"x-uuid": x_uuid,

"Origin": "https://appv2.ynhdkc.com",

"X-Requested-With": "com.tencent.mm",

"Sec-Fetch-Site": "same-site",

"Sec-Fetch-Mode": "cors",

"Sec-Fetch-Dest": "empty",

"Referer": "https://appv2.ynhdkc.com/",

"Accept-Encoding": "gzip, deflate",

"Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7"

}

cookies = {

"acw_tc": acw_tc

}

print(host)

r = requests.get(host, data=params, headers=headers, cookies=cookies)

debug = r.json()['data'][5]

# 2為重組 5為九價其他請自行抓包

print("========================",debug)

print("存入全局:======")

print("doc_id",debug['doc_id'])

global doc_id

doc_id = debug['doc_id']

print("doc_id存入全局:======")

print("hospital_id",debug['hospital_id'])

print("doc_name",debug['doc_name'])

print("doc_id",debug['doc_id'])

print("hos_id",debug['hos_id'])

print("sch_date", debug['sch_date'])

if r.json()['code']==1:

print("獲取信息成功!下一步獲取預(yù)約人信息")

tmp_hos_id=str(debug['hos_id'])

yuyue(tmp_hos_id)

else:

print("失?。。?!")

def cunhuo(tttt):

tmo=str(tttt)

print("接收到傳參數(shù)據(jù)",tmo)

host = "https://newdytapi.ynhdkc.com/index/patient/2807231?hos_id="+tmo

# 其他醫(yī)院請更改871958 華山871958

params = {

}

headers = {

"Host": "newdytapi.ynhdkc.com",

'Connection': 'keep-alive',

"Accept": "application/json, text/plain, */*",

"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat",

"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",

"Authorization": Authorization,

"x-uuid": x_uuid,

"Origin": "https://appv2.ynhdkc.com",

"X-Requested-With": "com.tencent.mm",

"Sec-Fetch-Site": "same-site",

"Sec-Fetch-Mode": "cors",

"Sec-Fetch-Dest": "empty",

"Referer": "https://appv2.ynhdkc.com/",

"Accept-Encoding": "gzip, deflate",

"Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7"

}

cookies = {

"acw_tc": acw_tc

}

print(host)

r = requests.get(host, data=params, headers=headers, cookies=cookies)

zate = r.json()['msg']

print(zate)

def yuyue(hos_id):

tmo=str(hos_id)

print("接收到傳參數(shù)據(jù)",tmo)

host = "https://newdytapi.ynhdkc.com/index/patient/2807231?hos_id="+tmo

# 其他醫(yī)院請更改871958 華山871958

params = {

}

headers = {

"Host": "newdytapi.ynhdkc.com",

'Connection': 'keep-alive',

"Accept": "application/json, text/plain, */*",

"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat",

"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",

"Authorization": Authorization,

"x-uuid": x_uuid,

"Origin": "https://appv2.ynhdkc.com",

"X-Requested-With": "com.tencent.mm",

"Sec-Fetch-Site": "same-site",

"Sec-Fetch-Mode": "cors",

"Sec-Fetch-Dest": "empty",

"Referer": "https://appv2.ynhdkc.com/",

"Accept-Encoding": "gzip, deflate",

"Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7"

}

cookies = {

"acw_tc": acw_tc

}

print(host)

r = requests.get(host, data=params, headers=headers, cookies=cookies)

zate = r.json()['msg']

print(zate)

gguide=r.json()['data'][0]

print("pat_id",gguide['pat_id'])

print("user_id",gguide['user_id'])

print("=====存入全局====")

global user_id, pat_id

user_id = gguide['user_id']

pat_id = gguide['pat_id']

print("=====存入全局====")

print("預(yù)約人姓名",gguide['patient_name'])

print("開始獲取疫苗今日信息")

yimiao_data()

def yimiao_data():

print("======正在搶====")

hos_cede_tt=str(hos_code)

dep_id_tt = str(dep_id)

doc_id_tt = str(doc_id)

pat_id_tt = str(pat_id)

user_id_tt = str(user_id)

# print("hos_code", hos_cede_tt)

# print("dep_id", dep_id_tt)

# print("doc_id", doc_id_tt)

# print("pat_id", pat_id_tt)

# print("user_id", user_id_tt)

print("數(shù)據(jù)預(yù)覽")

# 需要xxuid cookie

host = "https://newdytapi.ynhdkc.com/index/schedule?hos_code="+hos_cede_tt+"&dep_id="+dep_id_tt+"&doc_id="+doc_id_tt+"&from_date="+from_date+"&end_date="+end_date+"®_date="+reg_data+"&hyid=&vip=0"

params = {

}

headers = {

"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",

"Host": "newdytapi.ynhdkc.com",

"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat",

"Accept": "application/json, text/plain, */*",

"Authorization": Authorization,

"x-uuid": x_uuid,

"Origin": "https://appv2.ynhdkc.com",

"X-Requested-With": "com.tencent.mm",

"Sec-Fetch-Site": "same-site",

"Sec-Fetch-Mode": "cors",

"Sec-Fetch-Dest": "empty",

"Referer": "https://appv2.ynhdkc.com/",

"Accept-Encoding": "gzip, deflate",

"Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7"

}

cookies = {

"acw_tc": acw_tc

}

print(host)

r = requests.get(host, data=params, headers=headers, cookies=cookies)

code = r.json()['data']

# 昆明市婦幼保健院(華山西路院區(qū) 疫苗)

print("當(dāng)前所選擇醫(yī)院疫苗剩余:")

# print(code)

a = 0

for sch_date1 in code:

if sch_date1['src_num'] > 0:

print("可以搶_次數(shù)+1")

a=a+1

else:

print("不可以搶")

print("總可搶數(shù)據(jù)次數(shù):",a)

sjs = random.randint(0, a)

print("隨機(jī)數(shù)",sjs)

code1 = r.json()['data']

aa = 0

for sch_date in code1:

aa=aa+1

print("日期:", sch_date['sch_date'], "剩余預(yù)約數(shù)量:", sch_date['src_num'])

if aa==sjs:

print("可以搶")

# print("schedule_id",sch_date['schedule_id'])

# print("sch_date",sch_date['sch_date'])

# print("time_type", sch_date['time_type'])

tmp_1 = sch_date['schedule_id']

tmp_2 = sch_date['sch_date']

tmp_3 = sch_date['time_type']

qiang(tmp_1, tmp_2, tmp_3)

# 跳轉(zhuǎn)到搶 疫苗的qiang函數(shù)

else:

print("不可以搶")

def qiang(schedule_id,sch_date,time_type):

print("======正在搶疫苗====")

hos_code_q=str(hos_code)

dep_id_q = str(dep_id)

doc_id_q = str(doc_id)

pat_id_q = str(pat_id)

user_id_q = str(user_id)

schedule_id_q = str(schedule_id)

sch_date_q = str(sch_date)

# sch_date_q=datetime.date(sch_date_q)

print(sch_date_q)

# sch_date_q = datetime.datetime.strptime(sch_date_q, '%Y-%m-%d').date()

time_type_q = str(time_type)

url = "https://dytapi.ynhdkc.com/v1/appoint?hos_code="+hos_code_q+"&dep_id="+dep_id_q+"&doc_id="+doc_id_q+"&pat_id="+pat_id_q+"&user_id="+user_id_q+"&schedule_id="+schedule_id_q+"&cate_name="

body = {

"doc_name": "重組帶狀皰疹疫苗(CHO細(xì)胞)",

"hos_name": "昆明市婦幼保健院(華山西路院區(qū) 疫苗)",

"hos_code": "871958",

"dep_name": "疫苗接種預(yù)約",

"level_name": "",

"dep_id": dep_id_q,

"doc_id": doc_id_q,

"pat_id": pat_id_q,

"schedule_id": schedule_id_q,

"jz_card": "",

"sch_date": sch_date_q,

"time_type": time_type_q,

"info": "",

"ghf": 0,

"zlf": 0,

"zjf": 0,

"jz_start_time": 0,

"amt": 0,

"jz_card_type": 0,

"wechat_login": "dytminiapp"

}

headers = {

'Host':'dytapi.ynhdkc.com',

'Connection': 'keep-alive',

'Content-Length': '415',

'Accept': 'application/json, text/plain, */*',

'x-uuid': x_uuid,

'Content-Type': 'application/json;charset=UTF-8',

'Origin': 'https://appv2.ynhdkc.com',

'X-Requested-With': 'com.tencent.mm',

'Sec-Fetch-Site': 'same-site',

# 'User-Agent':'Mozilla/5.0 (Linux; Android 9; V1814T Build/PKQ1.180819.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3117 MMWEBSDK/20210601 Mobile Safari/537.36 MMWEBID/9644 MicroMessenger/8.0.11.1980(0x28000B3B) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram',

'Sec-Fetch-Mode': 'cors',

'Sec-Fetch-Dest': 'empty',

'Referer': 'https://appv2.ynhdkc.com/',

'Accept-Encoding': 'gzip, deflate',

"Authorization": Authorization,

"acw_tc": acw_tc,

'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7'

}

#cookies可以攜帶在header

print(url)

# data = json.dumps(body)

print("數(shù)據(jù)壓縮")

# print(data)

response = requests.post(url, json=body, headers=headers)

# 也可以直接將data字段換成json字段,2.4.3版本之后支持

# response = requests.post(url, json = body, headers = headers)

# 返回信息

print (response.text)

# 返回響應(yīng)頭

print (response.status_code)

def timer(n):

while True:

cunhuo(871958) # 獲取用戶信

time.sleep(n)

if __name__ == '__main__':

dlogin()

# timer(10) # 存活

# print("dep_id:", dep_id)

# print("doc_id:", doc_id)

# print("pat_id:", pat_id)

柚子快報邀請碼778899分享:爬蟲 自動化滇醫(yī)通

http://yzkb.51969.com/

精彩內(nèi)容

評論可見,查看隱藏內(nèi)容

本文內(nèi)容根據(jù)網(wǎng)絡(luò)資料整理,出于傳遞更多信息之目的,不代表金鑰匙跨境贊同其觀點和立場。

轉(zhuǎn)載請注明,如有侵權(quán),聯(lián)系刪除。

本文鏈接:http://gantiao.com.cn/post/18908212.html

發(fā)布評論

您暫未設(shè)置收款碼

請在主題配置——文章設(shè)置里上傳

掃描二維碼手機(jī)訪問

文章目錄