To maintain the green and healthy development of the network , Related encryption hidden , The code is for learning and communication only , Do not use for illegal purposes
# -*- coding:utf-8 -*-
import hashlib
import time
import json
import random
import requests
import urllib.parse
from sign import getTracrId, getParams
def getStoreList(city, page):
url = "https://popvip-go.paquapp.com/miniapp/v********"
data = {
"city": city, "lon": 125.96641540527344, "page_num": int(page),
"parent_type": 0, "openid": "o*******************"}
data = getParams(data)
trace_id = getTracrId(data, url)
headers = {
"identity_code": "o*******************",
"User-Agent": "Mozilla/5.0 (iPad; CPU OS 12_4_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.13(0x18000d37) NetType/WIFI Language/zh_CN",
"trace_id": trace_id,
}
resp = requests.post(url, data=data, headers=headers)
print(resp.json())
def getStoreListDemo():
city = " Qingdao "
page = 1
getStoreList(city, page)
def getCityListDemo():
url = "https://popvip-go.paquapp.com/miniapp/********ies"
data = {
"openid": "o*******************"
}
data = getParams(data)
trace_id = getTracrId(data, url)
headers = {
"User-Agent": "Mozilla/5.0 (iPad; CPU OS 12_4_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.13(0x18000d37) NetType/WIFI Language/zh_CN",
"trace_id": trace_id,
}
res = requests.get(url, params=data, headers=headers)
print(res.json())
def main():
# Get a list of cities
getCityListDemo()
# Get a list of stores
getStoreListDemo()
if __name__ == '__main__':
main()