修改巨量签到图片路径

This commit is contained in:
zhangdongxu 2024-02-23 10:33:01 +08:00
parent 3ed3e60954
commit 2ef19cd3b3
2 changed files with 9 additions and 2 deletions

View File

@ -18,9 +18,9 @@ from tencentcaptcha import EC
from tencentcaptcha import Tencent
import os
juliang_account = os.getenv("juliang_account").split('\n')
class Juliang_net(Tencent):
"""
Tencent的子类完成set_info()函数

View File

@ -17,6 +17,7 @@ import time
import re
import requests
import os
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
@ -154,7 +155,13 @@ class Tencent:
# print('【缺口识别】 {x}px'.format(x=x / 2))
# return x / 2
# return 0
with open('E:/PycharmProjects/littlepythonsheep/bg.jpeg', 'rb') as f:
# 判断当前环境是windows还是linux
imul = ''
if os.name == 'nt':
imul = 'E:/PycharmProjects/littlepythonsheep/bg.jpeg'
elif os.name == 'posix':
imul = '/ql/scripts/root_littlepythonsheep/bg.jpeg'
with open(imul, 'rb') as f:
base64_data = base64.b64encode(f.read())
b64 = base64_data.decode()
data = {"username": "littlecow", "password": "littlecow", "typeid": 33, "image": b64}