mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-23 18:11:37 +08:00
2.3.4
This commit is contained in:
@@ -13,6 +13,7 @@ ENV PASSWORD=adminadmin
|
||||
ENV METHOD=pn
|
||||
ENV GROUP_TAG=False
|
||||
ENV NOT_CONTAIN=720
|
||||
ENV RULE_DEBUG=False
|
||||
|
||||
COPY ./app /app
|
||||
COPY ./config /config
|
||||
|
||||
@@ -37,7 +37,8 @@ class CollectRSS:
|
||||
for item in self.items:
|
||||
name = item.title.string
|
||||
# debug 用
|
||||
# print(name)
|
||||
if EnvInfo.get_rule_debug:
|
||||
sys.stdout.write(f"[{EnvInfo.time_show_obj}] Raw {name}")
|
||||
exit_flag = False
|
||||
for rule in self.rules:
|
||||
for group in rule["group_name"]:
|
||||
@@ -78,7 +79,7 @@ class CollectRSS:
|
||||
if exit_flag:
|
||||
break
|
||||
if not exit_flag:
|
||||
print(f"[{EnvInfo.time_show_obj}] ERROR Not match with {name}")
|
||||
sys.stdout.write(f"[{EnvInfo.time_show_obj}] ERROR Not match with {name}")
|
||||
|
||||
def put_info_json(self):
|
||||
had_data = []
|
||||
@@ -105,6 +106,7 @@ class CollectRSS:
|
||||
"group": item["group"],
|
||||
"added": False
|
||||
})
|
||||
had_data.append(json_title)
|
||||
sys.stdout.write(f"[{EnvInfo.time_show_obj}] add {json_title} {json_season}" + "\n")
|
||||
sys.stdout.flush()
|
||||
with open(EnvInfo.info_path, 'w', encoding='utf8') as f:
|
||||
@@ -116,4 +118,6 @@ class CollectRSS:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
cr = CollectRSS()
|
||||
cr = CollectRSS()
|
||||
cr.get_info_list()
|
||||
cr.put_info_json()
|
||||
@@ -17,6 +17,7 @@ class EnvInfo:
|
||||
info_path = "/config/bangumi.json"
|
||||
rule_path = "/config/rule.json"
|
||||
not_contain = os.environ["NOT_CONTAIN"]
|
||||
get_rule_debug = os.getenv("RULE_DEBUG", 'False').lower() in ('true', '1', 't')
|
||||
else:
|
||||
# Debug ENV
|
||||
host_ip = "localhost:8181"
|
||||
@@ -30,6 +31,7 @@ class EnvInfo:
|
||||
info_path = "../config/bangumi.json"
|
||||
rule_path = "../config/rule.json"
|
||||
not_contain = "720"
|
||||
get_rule_debug = True
|
||||
# Static ENV
|
||||
rule_url = "https://raw.githubusercontent.com/EstrellaXD/Bangumi_Auto_Collector/main/AutoBangumi/config/rule.json"
|
||||
time_show_obj = time.strftime('%Y-%m-%d %X')
|
||||
|
||||
Reference in New Issue
Block a user