python脚本怎么运行网页抢座位_某网站抢号脚本(python)

最近抢号一直抢不到,极为郁闷,于是就抓了抓数据,写了如下脚本:

python 3.7.7

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

__author__ = "zoranlee"

import requests

import json

import threading

import datetime

def crawl():

# url中的参数需要根据自己的情况做调整

url = ""

#headers根据自己情况输入

headers = """

Content-Type:application/json

Accept-Encoding:gzip, deflate, br

Connection:keep-alive

Accept:*/*

User-Agent:Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/7.0.17(0x17001124) NetType/WIFI Language/zh_CN

Content-Length:164

Accept-Language:zh-cn

"""

headers = headers_to_dict(headers)

payload = {

'hospital_id': '',

'appoint_date': '',

'baby_id': '',

你可能感兴趣的:(python脚本怎么运行网页抢座位_某网站抢号脚本(python))