| 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' |