Skip to content

Commit

Permalink
update to v0.1.24, support sheepsheep
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesPikachu committed Sep 17, 2022
1 parent addf896 commit 0c30e11
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ You can star this repository to keep track of the project if it's helpful for yo
| decryptbrowser | [click](https://mp.weixin.qq.com/s/sotiVBWrFxcyYAgdRJ5ydA) | [click](./pytools/modules/decryptbrowser) | 盗取浏览器里的账号密码 |
| githubacceleration | [click](https://mp.weixin.qq.com/s/OEWi5y_AbM1jE526LCp4aw) | [click](./pytools/modules/githubacceleration) | 国内访问Github一键加速脚本 |
| modifyfoldericon | [click](https://mp.weixin.qq.com/s/40QlSkwQ-ezpeDiPWlkUAg) | [click](./pytools/modules/modifyfoldericon) | 文件夹图标批量修改 |
| sheepsheep | [click]() | [click](./pytools/modules/sheepsheep) | "羊了个羊"小助手 |


# Install
Expand Down
7 changes: 6 additions & 1 deletion docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,9 @@
**2022-05-16**

- 版本号: v0.1.23,
- 更新内容: 支持文件夹图标批量修改。
- 更新内容: 支持文件夹图标批量修改。

**2022-09-17**

- 版本号: v0.1.24,
- 更新内容: "羊了个羊"小助手。
27 changes: 27 additions & 0 deletions docs/Quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,33 @@ tool_client.execute('modifyfoldericon', config={'icon_path': r'D:\icon.ico'})
}
```

#### "羊了个羊"小助手

**1.公众号文章链接**

[点击查看]()

**2.功能介绍**

"羊了个羊"小助手。

**3.调用示例代码**

```python
from pytools import pytools
tool_client = pytools.pytools()
tool_client.execute('sheepsheep', {'user_t': 'xxx'})
```

**4.config中支持的参数**

```
{
user_t: 每个用户特有的t值, 需要自己抓包获取,
}
```


## 随机运行一个小程序

Expand Down
2 changes: 1 addition & 1 deletion pytools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'''url'''
__url__ = 'https://github.com/CharlesPikachu/pytools'
'''version'''
__version__ = '0.1.23'
__version__ = '0.1.24'
'''author'''
__author__ = 'Charles'
'''email'''
Expand Down
1 change: 1 addition & 0 deletions pytools/modules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from .timer import Timer
from .clock import Clock
from .runcat import RunCat
from .sheepsheep import SheepSheep
from .tianyancha import Tianyancha
from .ukrainemap import UkraineMap
from .desktoppet import DesktopPet
Expand Down
2 changes: 2 additions & 0 deletions pytools/modules/sheepsheep/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
'''初始化'''
from .sheepsheep import SheepSheep
42 changes: 42 additions & 0 deletions pytools/modules/sheepsheep/sheepsheep.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
'''
Function:
羊了个羊小助手
Author:
Charles
微信公众号:
Charles的皮卡丘
'''
import time
import random
import requests


'''羊了个羊小助手'''
class SheepSheep():
tool_name = '羊了个羊小助手'
def __init__(self, user_t, **kwargs):
self.headers = {
'Host': 'cat-match.easygame2021.com',
'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.28(0x18001c27) NetType/WIFI Language/zh_CN',
't': user_t,
'Referer': 'https://servicewechat.com/wx141bfb9b73c970a9/17/page-frame.html',
'Accept-Encoding': 'gzip,compress,br,deflate',
'Connection': 'close',
}
'''运行'''
def run(self):
# 完成闯关羊群
response = requests.get(f'https://cat-match.easygame2021.com/sheep/v1/game/game_over?rank_score=1&rank_state=1&rank_time={random.randint(1, 3600)}&rank_role=1&skin=1', headers=self.headers, timeout=10, verify=True)
if response.json()['err_code'] == 0:
self.logging('闯关羊群成功')
else:
self.logging(f'闯关羊群失败, 返回内容为:\n{response.json()}')
# 完成闯关话题
response = requests.get(f'https://cat-match.easygame2021.com/sheep/v1/game/topic_game_over?rank_score=1&rank_state=1&rank_time={random.randint(1, 3600)}&rank_role=2&skin=1', headers=self.headers, timeout=10, verify=True)
if response.json()['err_code'] == 0:
self.logging('闯关话题成功')
else:
self.logging(f'闯关话题失败, 返回内容为:\n{response.json()}')
'''打印日志'''
def logging(self, text):
print(f'[{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} INFO]: {text}')
2 changes: 1 addition & 1 deletion pytools/pytools.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def initialize(self):
'artsigngenerator': ArtSignGenerator, 'controlpcbyemail': ControlPCbyEmail, 'naughtyconfession': NaughtyConfession, 'luxunsentencesquery': LuxunSentencesQuery,
'hubbleseeonbirthday': HubbleSeeOnBirthday, 'newyearcardgenerator': NewYearCardGenerator, 'trumptweetsgenerator': TrumpTweetsGenerator, 'sovietgenerator': SovietGenerator,
'goodgoodgenerator': GoodGoodGenerator, 'tianyancha': Tianyancha, 'decryptbrowser': DecryptBrowser, 'githubacceleration': GithubAcceleration,
'modifyfoldericon': ModifyFolderICON,
'modifyfoldericon': ModifyFolderICON, 'sheepsheep': SheepSheep,
}
return supported_tools
'''获得所有支持的tools信息'''
Expand Down

0 comments on commit 0c30e11

Please sign in to comment.