MCPcopy Create free account
hub / github.com/Mashiro2000/HeyTapTask / getGoodMess

Method getGoodMess

DailyCash.py:126–144  ·  view source on GitHub ↗
(self,count=10)

Source from the content-addressed store, hash-verified

124
125 # 秒杀详情页获取商品数据
126 def getGoodMess(self,count=10):
127 taskUrl = f'https://msec.opposhop.cn/goods/v1/SeckillRound/goods/{random.randint(100,250)}' # 随机商品
128 headers = {
129 'clientPackage': 'com.oppo.store',
130 'Host': 'msec.opposhop.cn',
131 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
132 'Content-Type': 'application/x-www-form-urlencoded',
133 'Connection': 'keep-alive',
134 'User-Agent': 'okhttp/3.12.12.200sp1',
135 'Accept-Encoding': 'gzip',
136 }
137 params = {
138 'pageSize':count + random.randint(1,3)
139 }
140 response = self.sess.get(url=taskUrl,headers=headers,params=params).json()
141 if response['meta']['code'] == 200:
142 return response
143 else:
144 notify(response)
145
146 def getCash(self,dic):
147 url = 'https://store.oppo.com/cn/oapi/omp-web/web/dailyCash/drawReward'

Callers 1

viewGoodsMethod · 0.95

Calls 1

notifyFunction · 0.70

Tested by

no test coverage detected