Удаление входа по VK и Google и обновление патчей api
This commit is contained in:
@@ -9,7 +9,8 @@ import requests
|
||||
def apply(config: dict) -> bool:
|
||||
response = requests.get(config['server'])
|
||||
assert response.status_code == 200, f"Failed to fetch data {response.status_code} {response.text}"
|
||||
for item in json.loads(response.text)['modifications']:
|
||||
new_api = json.loads(response.text)
|
||||
for item in new_api['modifications']:
|
||||
tqdm.write(f"Изменение {item['file']}")
|
||||
filepath = './decompiled/smali_classes2/com/swiftsoft/anixartd/network/api/'+item['file']
|
||||
with open(filepath, 'r') as f:
|
||||
@@ -18,4 +19,12 @@ def apply(config: dict) -> bool:
|
||||
if content.count(item['src']) == 0:
|
||||
tqdm.write(f"⚠ Не найдено {item['src']}")
|
||||
f.write(content.replace(item['src'], item['dst']))
|
||||
|
||||
tqdm.write(f"Изменение Github ссылки")
|
||||
filepath = './decompiled/smali_classes2/com/swiftsoft/anixartd/utils/anixnet/GithubPagesNetFetcher.smali'
|
||||
with open(filepath, 'r') as f:
|
||||
content = f.read()
|
||||
with open(filepath, 'w') as f:
|
||||
f.write(content.replace('const-string v1, "https://anixhelper.github.io/pages/urls.json"', f'const-string v1, "{new_api["gh"]}"'))
|
||||
|
||||
return True
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
priority = -1
|
||||
|
||||
import os
|
||||
from lxml import etree
|
||||
|
||||
|
||||
def rename_dir(src, dst):
|
||||
@@ -86,6 +87,16 @@ def apply(config: dict) -> bool:
|
||||
except:
|
||||
pass
|
||||
|
||||
file_path = "./decompiled/res/layout/fragment_sign_in.xml"
|
||||
parser = etree.XMLParser(remove_blank_text=True)
|
||||
tree = etree.parse(file_path, parser)
|
||||
root = tree.getroot()
|
||||
|
||||
last_linear = root.xpath("//LinearLayout/LinearLayout[4]")[0]
|
||||
last_linear.set(f"{{{config['xml_ns']['android']}}}visibility", "gone")
|
||||
|
||||
tree.write(file_path, pretty_print=True, xml_declaration=True, encoding="utf-8")
|
||||
|
||||
return True
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user