一、前言
(一)一罐app简介
一罐app 是一款小众交友软件,可以匿名or真身发布动态
(二)开发目的
因为某些原因,某些板块被隐藏起来了。(一罐称板块为xxx海)
(三)运行环境
1.python3.11
2.reqable 抓包,关键收藏接口:/mood/fav
(四)使用方法
代码简单,但是目的达到了就行,关键隐藏海ID在附件📎
使用本项目需要懂得一点python,直接运行用账号密码登陆获取cookie即可。
二、代码
import csv
import json
import time
import requests
from datetime import datetime
import pandas as pd
from urllib3.exceptions import InsecureRequestWarningrequests.packages.urllib3.disable_warnings(InsecureRequestWarning)phone = input("请输入一罐账号(手机号): ")
password = input("请输入一罐账号密码: ")url = 'https://api.jijigugu.club/user/login'params = {'phone': phone,'password': password,'platform': 1,'version': '3.16.4','os_version': 9,'dist': '','model': 'samsung/SM-G988N','screen': '720*1280','deviceId': '','network': 2,'smDeviceId': ''
}try:# 登录并获取用户keyresponse = requests.get(url, params=params, verify=False)if response.status_code == 200:data = json.loads(response.text)YGT= data["data"]["YGT"]print(YGT)else:print("登录失败,状态码: {}".format(response.status_code))exit()
except Exception as e:print("登录失败,原因:{}".format(e))exit()#读取txt文件中ID列表id_list = []
with open('./example.txt', 'r', encoding='utf-8') as f:reader = csv.reader(f)for row in reader:id_list.append(row[0])#遍历ID列表逐一收藏
fav_api = 'https://api.jijigugu.club/mood/fav' headers2={
'authority':'api.jijigugu.club',
'accept': '*/*',
'content-type':'application/x-www-form-urlencoded; charset=utf-8',
'content-length':'381',
'ygt': YGT,
'appPermission': '0',
'user-agent': 'guan/3.14.6 (club.jijigugu.yiguan; build:722; iOS 16.6.0) Alamofire/5.1.0',
'accept-language': 'zh-Hans-CN;q=1.0',
'accept-encoding': 'br;q=1.0, gzip;q=0.9, deflate;q=0.8'}data3={
'deviceId': 'E2FD710F-FB30-4E9D-9297-71E7BD16E4EE',
'dist': 'appstore',
'model': 'iPad8,6',
'os_version': '16.6',
'platform': '2',
'secondsFromGMT': '28800',
'smDeviceId': '2023100509092276bdcf65243ea6d9e649498307ede3b00110834df17a2485',
'version': '3.14.6',
'x-jike-device-properties': '{"idfa":"00000000-0000-0000-0000-000000000000","idfv":"D229DD92-AD62-5D4E-9AB6-5F139DA19878"}'}for id_value in id_list:try:data3['id'] = id_valueresponse3 = requests.post(fav_api, data=data3, headers=headers2, verify=False)response3.raise_for_status()print("ID: {}, 收藏成功".format(id_value))except Exception as e:print("ID: {}, 收藏失败,原因:{}".format(id_value, e))