Skip to content

Commit 3b20eb1

Browse files
committed
Fix #17
1 parent 94b3f9f commit 3b20eb1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

api_config.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
"md5": "md5"
3939
}
4040
# App Settings
41-
TOKEN = os.environ['TOKEN']
42-
DOCS_URL = os.environ['DOCS_URL']
43-
API_VERSION = os.environ['IMAGE_TAG']
41+
TOKEN = os.getenv("TOKEN", "APITOKEN")
42+
DOCS_URL = os.getenv("DOCS_URL", "/api/v1/docs")
43+
API_VERSION = os.getenv("API_VERSION", "v1")
4444

4545
# MySQL Settings
4646
DB_HOST = os.getenv('DB_HOST', None)

fetcher.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def fetch_genshin_impact_update():
4040
this_name_hash_id = str(item["NameTextMapHash"])
4141
this_item_id = int(item["id"])
4242
name_list = [
43-
lang_dict[this_name_hash_id].replace("'", "\\'") if this_name_hash_id in lang_dict.keys() else "" for
43+
lang_dict[this_name_hash_id] if this_name_hash_id in lang_dict.keys() else "" for
4444
lang_dict in dict_list
4545
]
4646
lang_dict = {
@@ -104,7 +104,7 @@ def fetch_starrail_update():
104104
raise ValueError(f"Unknown item type: {item}")
105105

106106
name_list = [
107-
lang_dict[this_name_hash_id].replace("'", "\\'") if this_name_hash_id in lang_dict.keys() else "" for
107+
lang_dict[this_name_hash_id] if this_name_hash_id in lang_dict.keys() else "" for
108108
lang_dict in dict_list
109109
]
110110
lang_dict = {
@@ -192,7 +192,7 @@ def is_valid_weapon_item(name_hash_value: str):
192192
this_name_hash_id = item[name_hash_id]
193193
this_item_id = item[item_id]
194194
name_list = [
195-
lang_dict[this_name_hash_id].replace("'", "\\'") if this_name_hash_id in lang_dict.keys() else "" for
195+
lang_dict[this_name_hash_id] if this_name_hash_id in lang_dict.keys() else "" for
196196
lang_dict in dict_list
197197
]
198198
lang_dict = {

0 commit comments

Comments
 (0)