大众点评数据反序列化___Python调用jar包
# -*- coding: utf-8 -*-
# coding=utf-8
"""
# ---------------------------------------
# @DateTime : 2021-02-19 16:29:41
# @Author : ts, QuJianJun
# @FileName :DianPingDecode.py
# @Email : 8577352@qq.com
# @ProductName :PyCharm
# ---------------------------------------
"""
import base64
from Crypto.Cipher import AES
import requests
import gzip
import base64
from jpype import *
def start():
headers = {
"Accept-Encoding": "identity",
"pragma-uuid": "0cb2799e-0897-4f7c-babc-05caeb866472",
"pragma-os": "MApi 1.3 (com.dianping.v1 10.29.3 om_sd_sgsztc13 Redmi_Note_8; Android 10)",
"User-Agent": "MApi 1.3 (com.dianping.v1 10.29.3 om_sd_sgsztc13 Redmi_Note_8; Android 10)",
"pragma-dpid": "a79ae61b7dc14587acd1e29c7839f78ea161382351370453307",
"M-SHARK-TRACEID": "11a79ae61b7dc14587acd1e29c7839f78ea161382351370453307b3de5a1613788487152c2ad06",
"pragma-device": "00000000000000",
"pragma-unionid": "a79ae61b7dc14587acd1e29c7839f78ea161382351370453307",
"network-type": "wifi",
"Connection": "Keep-Alive",
}
url = "https://mapi.dianping.com/mapi/searchshop.api?start=0&myLng=0.0&mylat=0.0&categoryid=141®ionid=0&cityid=1®iontype=0&parentregionid=0&parentcategoryid=0&disablerewrite=0&ganextindex=0&requestuuid=a8880c31-15de-42f5-8add-2895917e02e3&devicelat=0.0&devicelng=0.0&keepcategory=1&tabid=-1&charactercount=20&isresearch=0&istravelsearch=0&noprofile=0"
res = requests.get(url=url, headers=headers)
res = base64.b64encode(res.content)
res = decodeData(res.decode())
if res is not None:
print(res)
else:
print("返回数据 None")
def decodeData(base64Str):
startJVM(get_default_jvm_path(), "-ea", "-Djava.class.path=MeiRiApp.jar")
decodeClass = JClass("com.dianping.decode.DianpingDecode")
decode = decodeClass()
res = decode.decryption(base64Str)
shutdownJVM()
return res
if __name__ == '__main__':
start()
# print(get_default_jvm_path())
0x003. jar包如下,请付费下载
温馨提示:登录付款后可永久阅读隐藏内容。
付费可读
lian
qq是啥
用户 MacOS 695 天前回复
学习APP
收款额度是0,加QQ没回
用户 Windows10 1147 天前回复
15068780100
二维码用不了 老哥
用户 MacOS 1205 天前回复
admin
@15068780100加QQ处理
作者 MacOS 1204 天前回复
wu
二维码用不了,加你q也没回我哎
用户 MacOS 1239 天前回复
liu
二维码不能用
用户 Windows10 1276 天前回复
admin
@liu加我QQ
作者 MacOS 1248 天前回复
jiakaipeng
你好,二维码支付不了啊
用户 Windows10 1309 天前回复
admin
@jiakaipeng加我QQ
作者 MacOS 1248 天前回复