diff --git a/assets/1.png b/assets/1.png index 533d842..34c29d9 100644 Binary files a/assets/1.png and b/assets/1.png differ diff --git a/assets/3.png b/assets/3.png index d148932..da4c80f 100644 Binary files a/assets/3.png and b/assets/3.png differ diff --git a/assets/index.png b/assets/index.png index fba73c8..d7043ce 100644 Binary files a/assets/index.png and b/assets/index.png differ diff --git a/assets/new_resource.png b/assets/new_resource.png index fc9a5da..5a6a97d 100644 Binary files a/assets/new_resource.png and b/assets/new_resource.png differ diff --git a/yyetsbot/config.py b/yyetsbot/config.py index e074b98..d0e92d4 100644 --- a/yyetsbot/config.py +++ b/yyetsbot/config.py @@ -27,7 +27,7 @@ ZHUIXINFAN_SEARCH = "http://www.fanxinzhui.com/list?k={}" ZHUIXINFAN_RESOURCE = "http://www.fanxinzhui.com{}" # yyets website DOMAIN = "https://yyets.dmesg.app/" -WORKERS = f"{DOMAIN}resource.html?id=%s" +WORKERS = f"{DOMAIN}resource?id=" + "{}" # new zmz NEWZMZ_SEARCH = "https://newzmz.com/subres/index/getres.html?keyword={}" diff --git a/yyetsbot/fansub.py b/yyetsbot/fansub.py index 2470248..0b41cb3 100644 --- a/yyetsbot/fansub.py +++ b/yyetsbot/fansub.py @@ -192,7 +192,7 @@ class YYeTsOffline(BaseFansub): results = {} for item in data: info = item["data"]["info"] - url = "https://yyets.dmesg.app/resource.html?id={}".format(info["id"]) + url = WORKERS.format(info["id"]) url_hash = hashlib.sha1(url.encode('u8')).hexdigest() all_name = info["cnname"] + info["enname"] + info["aliasname"] results[url_hash] = { @@ -205,7 +205,7 @@ class YYeTsOffline(BaseFansub): comments = self.db["comment"].find({"content": {"$regex": f".*{search_text}.*", "$options": "i"}}) for c in comments: - url = "https://yyets.dmesg.app/resource.html?id={}#{}".format(c["resource_id"], str(c["_id"])) + url = WORKERS + "#{}".format(c["resource_id"], str(c["_id"])) url_hash = hashlib.sha1(url.encode('u8')).hexdigest() all_name = c["content"] results[url_hash] = { @@ -237,7 +237,7 @@ class YYeTsOffline(BaseFansub): rid = resource_url.split("id=")[1] data: dict = self.collection.find_one({"data.info.id": int(rid)}, {'_id': False}) name = data["data"]["info"]["cnname"] - share = WORKERS % rid + share = WORKERS.format(rid) t = "resource" return {"all": json.dumps(data, ensure_ascii=False, indent=4), "share": share, "cnname": name, "type": t}