127.0.0.1 - - [10/May/2023 16:55:53] "GET / HTTP/1.1" 500 - Error on request: Traceback (most recent call last): File "C:\Users\GamerNoTitle\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 2189, in wsgi_app ctx.push() File "C:\Users\GamerNoTitle\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\ctx.py", line 377, in push
self.session = session_interface.open_session(self.app, self.request) File "C:\Users\GamerNoTitle\AppData\Local\Programs\Python\Python310\lib\site-packages\flask_session\sessions.py", line 329, in open_session sid = request.cookies.get(app.session_cookie_name) AttributeError: 'Flask' object has no attribute 'session_cookie_name'
metadata: level: # This means what word "level" shoule be like in the language, you can find it in every upgradable skin # example: https://valorant-api.com/v1/weapons/skinlevels/4c8a49bd-4118-9523-6612-4a924651b4a9 level:等級 EEquippableSkinLevelItem::VFX:视觉效果 EEquippableSkinLevelItem::Animation:视觉动画 EEquippableSkinLevelItem::Finisher:终结特效 EEquippableSkinLevelItem::SoundEffects:音效 # For Protocol 781-A Level 5 https://valorant-api.com/v1/weapons/skinlevels/a117218e-4f0e-0cca-7758-7ea30b08ac05 EEquippableSkinLevelItem::Voiceover:本地化语音 # For Neptune Level 2 https://valorant-api.com/v1/weapons/skinlevels/24e39414-4a8e-e800-1242-08bd94b5e3c4 EEquippableSkinLevelItem::FishAnimation:鱼缸动画 # For Neptune Level 3 https://valorant-api.com/v1/weapons/skinlevels/7b2826b6-4771-7529-b656-b89b9c1d86b6 EEquippableSkinLevelItem::KillBanner:击杀旗帜 # For Champions Set Level 4 https://valorant-api.com/v1/weapons/skinlevels/4c8a49bd-4118-9523-6612-4a924651b4a9 EEquippableSkinLevelItem::TopFrag:击杀光环 # For RGX 11z Pro Set Level 5 https://valorant-api.com/v1/weapons/skinlevels/796cf1d2-4893-fee7-3401-beb277c726c8 EEquippableSkinLevelItem::KillCounter:击杀计数器 # For Champions Set Level 2 https://valorant-api.com/v1/weapons/skinlevels/f96ed262-4280-2363-2542-38b5620bfbb5 EEquippableSkinLevelItem::InspectAndKill:击杀特效 # For some skins https://valorant-api.com/v1/weapons/skinlevels/bf4489ad-4739-555c-2511-7cbcc503566c EEquippableSkinLevelItem::KillEffect:击杀特效&音效 # For Black.Market Set Level 2 https://valorant-api.com/v1/weapons/skinlevels/65c7df10-4a5e-7eaa-dc45-d0a46f147b18 EEquippableSkinLevelItem::AttackerDefenderSwap:随阵营变色 description: # All these sources to replace can be found at the links above # You need to add ?language=<your lang> to check your language # Available language: ar-AE / de-DE / en-US / es-ES / es-MX / fr-FR / id-ID / it-IT / ja-JP / ko-KR / pl-PL / pt-BR / ru-RU / th-TH / tr-TR / vi-VN / zh-CN / zh-TW # For China mainland players, all the names of the guns are using zh-TW, cause this program does not support Valorant from Tencent. # example: https://valorant-api.com/v1/weapons/skinlevels/a117218e-4f0e-0cca-7758-7ea30b08ac05?language=zh-CN Voiceover:在地化語音可能會因地區而異 KillEffect:每次擊殺敵人時,都會播放專屬視覺特效及音效 AttackerDefenderSwap:此造型設計會因你是攻擊方或守備方而變化 TopFrag:(在對戰中取得最多擊殺時才會顯示光環)
$ export SESSION_TYPE=filesystem|redis # If you want to use redis u need to set it as redis, and configure the following items $ export REDIS_URL=<Your Redis URL> # If your redis url cannot be parsed $ export REDIS_HOST=<Your Redis Host> $ export REDIS_PORT=<Your Redis Port> $ export REDIS_PASSWORD=<Your Redis Password> # Optional $ export REDIS_SSL=True # If your redis does not support this, please DO NOT configure it, or this will make your application timeout.
defUpdateCache(): ifnot os.path.exists('assets/db/data.db'): withopen('assets/db/data.db', 'wb') as f: f.close() conn = sqlite3.connect('assets/db/data.db') c = conn.cursor() c.execute('CREATE TABLE skins (uuid TEXT PRIMARY KEY, name TEXT, "name-zh-CN" TEXT, "name-zh-TW" TEXT, "name-ja-JP" TEXT, data TEXT, "data-zh-CN" TEXT, "data-zh-TW" TEXT, "data-ja-JP" TEXT)') c.execute('CREATE TABLE skinlevels (uuid TEXT PRIMARY KEY, name TEXT, "name-zh-CN" TEXT, "name-zh-TW" TEXT, "name-ja-JP" TEXT, data TEXT, "data-zh-CN" TEXT, "data-zh-TW" TEXT, "data-ja-JP" TEXT)') conn.commit() conn.close()
for lang, link in Linkmap: print('Updating Skins Data of ' + lang) conn = sqlite3.connect('assets/db/data.db')
# with open('data.json', encoding='utf8') as f: # data = json.loads(f.read()) data = requests.get(link).json()
c = conn.cursor() if lang == 'en': for i in data['data']: try: c.execute(f'INSERT INTO skins ([uuid], name, data) VALUES (?, ?, ?)', ( i["uuid"], i["displayName"], json.dumps(i))) conn.commit() except sqlite3.IntegrityError: c.execute(f'UPDATE skins SET name = ?, data = ? WHERE uuid = ?', (i["displayName"], json.dumps(i), i["uuid"])) conn.commit() else: for i in data['data']: c.execute(f'UPDATE skins SET "name-{lang}" = ?, "data-{lang}" = ? WHERE uuid = ?', (i["displayName"], json.dumps(i), i["uuid"])) conn.commit()
# Delete Useless Data # For example: Random Favorite Skin fliter = ['Random Favorite Skin', "Standard Classic", "Standard Shorty", "Standard Frenzy", "Standard Ghost", "Standard Sheriff", "Standard Stinger", "Standard Spectre", "Standard Bucky", "Standard Judge", "Standard Bulldog", "Standard Guardian", "Standard Phantom", "Standard Vandal", "Standard Marshal", "Standard Operator", "Standard Ares", "Standard Odin", "Melee"] conn = sqlite3.connect('assets/db/data.db') c = conn.cursor() for ignore in fliter: c.execute('DELETE FROM skins WHERE name = ?', (ignore,)) conn.commit() c.close()
for lang, link in LinkLevelsmap: print('Updating Skin Levels Data of ' + lang) conn = sqlite3.connect('assets/db/data.db')
# with open('data.json', encoding='utf8') as f: # data = json.loads(f.read()) data = requests.get(link).json()
c = conn.cursor() if lang == 'en': for i in data['data']: try: c.execute(f'INSERT INTO skinlevels ([uuid], name, data) VALUES (?, ?, ?)', ( i["uuid"], i["displayName"], json.dumps(i))) conn.commit() except sqlite3.IntegrityError: c.execute(f'UPDATE skinlevels SET name = ?, data = ? WHERE uuid = ?', (i["displayName"], json.dumps(i), i["uuid"])) conn.commit() else: for i in data['data']: c.execute(f'UPDATE skinlevels SET "name-{lang}" = ?, "data-{lang}" = ? WHERE uuid = ?', (i["displayName"], json.dumps(i), i["uuid"])) conn.commit() c.close()
if request.args.get('query') notin ['近战武器', '近戰武器', 'Melee', '近接武器']: # 非近战武器,正常查询 if lang == 'en': # Get all skins' uuid & name c.execute( 'SELECT uuid, name, data FROM skins WHERE name LIKE ?', (query,)) elif lang == 'zh-CN'or lang == 'zh-TW': c.execute( f'SELECT uuid, "name-{dictlang}", "data-zh-TW" FROM skins WHERE "name-zh-CN" LIKE ? OR "name-zh-TW" LIKE ?', (query, query)) else: c.execute( f'SELECT uuid, "name-{dictlang}", "data-{dictlang}" FROM skins WHERE "name-{lang}" like ?', (query,)) conn.commit() else: # 近战武器,直接获取melee表 if lang == 'en': # Get all skins' uuid & name c.execute( 'SELECT uuid, name, data FROM melee') elif lang == 'zh-CN'or lang == 'zh-TW': c.execute( f'SELECT uuid, "name-{dictlang}", "data-zh-TW" FROM melee') else: c.execute( f'SELECT uuid, "name-{dictlang}", "data-{dictlang}" FROM melee') conn.commit() skins = c.fetchall()
c.execute( 'CREATE TABLE agents (uuid TEXT PRIMARY KEY, name TEXT, "name-zh-CN" TEXT, "name-zh-TW" TEXT, "name-ja-JP" TEXT)') c.execute( 'CREATE TABLE weapons (uuid TEXT PRIMARY KEY, name TEXT, "name-zh-CN" TEXT, "name-zh-TW" TEXT, "name-ja-JP" TEXT)') c.execute( 'CREATE TABLE maps (uuid TEXT PRIMARY KEY, name TEXT, "name-zh-CN" TEXT, "name-zh-TW" TEXT, "name-ja-JP" TEXT)')
for lang, link in LinkAgentsmap: print('Updating Agents Data of ' + lang) conn = sqlite3.connect('db/data.db') data = requests.get(link).json()
c = conn.cursor() if lang == 'en': for i in data['data']: if i['isPlayableCharacter']: # There's an unplayable SOVA in data try: c.execute(f'INSERT INTO agents ([uuid], name) VALUES (?, ?)', ( i["uuid"], i["displayName"])) conn.commit() except sqlite3.IntegrityError: c.execute(f'UPDATE agents SET name = ? WHERE uuid = ?', (i["displayName"], i["uuid"])) conn.commit() else: if i['isPlayableCharacter']: for i in data['data']: c.execute(f'UPDATE agents SET "name-{lang}" = ? WHERE uuid = ?', (i["displayName"], i["uuid"])) conn.commit() c.close()
for lang, link in LinkMapsmap: print('Updating Maps Data of ' + lang) conn = sqlite3.connect('db/data.db') data = requests.get(link).json()
c = conn.cursor() if lang == 'en': for i in data['data']: try: c.execute(f'INSERT INTO maps ([uuid], name) VALUES (?, ?)', ( i["uuid"], i["displayName"])) conn.commit() except sqlite3.IntegrityError: c.execute(f'UPDATE maps SET name = ? WHERE uuid = ?', (i["displayName"], i["uuid"])) conn.commit() else: for i in data['data']: c.execute(f'UPDATE maps SET "name-{lang}" = ? WHERE uuid = ?', (i["displayName"], i["uuid"])) conn.commit() c.close()
for lang, link in LinkWeaponsmap: print('Updating Weapons Data of ' + lang) conn = sqlite3.connect('db/data.db') data = requests.get(link).json()
c = conn.cursor() if lang == 'en': for i in data['data']: try: c.execute(f'INSERT INTO weapons ([uuid], name) VALUES (?, ?)', ( i["uuid"], i["displayName"])) conn.commit() except sqlite3.IntegrityError: c.execute(f'UPDATE weapons SET name = ? WHERE uuid = ?', (i["displayName"], i["uuid"])) conn.commit() else: for i in data['data']: c.execute(f'UPDATE weapons SET "name-{lang}" = ? WHERE uuid = ?', (i["displayName"], i["uuid"])) conn.commit() c.close()
if request.args.get('lang'): if request.args.get('lang') in app.config['BABEL_LANGUAGES']: lang = request.args.get('lang') elif request.accept_languages.best_match(app.config['BABEL_LANGUAGES']): lang = str(request.accept_languages.best_match( app.config['BABEL_LANGUAGES'])) else: lang = 'en' elif request.accept_languages.best_match(app.config['BABEL_LANGUAGES']): lang = str(request.accept_languages.best_match( app.config['BABEL_LANGUAGES'])) else: lang = 'en'
classplayer: defgetSkins(self): data = requests.get(f'{self.server}{Api.owned}{self.user_id}/{Options.skins}', headers=self.__header, timeout=30).json() skins = data['Entitlements'] owned_skins = [] for skin in skins: owned_skins.append(skin['ItemID'].upper()) return skins, owned_skins # 这里owned_skins就是已拥有的皮肤列表
defgetChromas(self): data = requests.get(f'{self.server}{Api.owned}{self.user_id}/{Options.chromas}', headers=self.__header, timeout=30).json() chromas = data['Entitlements'] owned_chromas = [] for chroma in chromas: owned_chromas.append(chroma['ItemID'].upper()) return chromas, owned_chromas # 这里owned_chromas就是已拥有的炫彩列表
1 2 3 4 5 6 7 8 9 10 11 12
{% if level.updated %}<!-- If this level has been updated, set the color of the button to green --> <buttontype="button"class="btn bg-gradient-success"data-bs-toggle="modal" data-bs-target="#WEAPON-{{level.uuid|escape}}"> {{level.displayName}}: {{level.levelItem}} </button> {% else %} <buttontype="button"class="btn bg-gradient-primary"data-bs-toggle="modal" data-bs-target="#WEAPON-{{level.uuid|escape}}"> {{level.displayName}}: {{level.levelItem}} </button> {% endif %}
How about “ValShop” as the name for your website? It’s short, easy to remember, and has a clear connection to the subject matter. For the abbreviation, you could use “VS” which is simple and recognizable.
换一个
Sure, here are a few more suggestions for the name of your website:
“DailyVault”: This name combines “daily” to indicate that the site is updated every day, and “vault” to reference the setting of the game.
“ValoraMart”: This name plays off the popular retail chain Walmart, and incorporates “Valora” to reference the game world.
“ValoraDeals”: This name emphasizes the focus on shopping and finding good deals within the Valoran setting.
For abbreviations, you could use “DV” for “DailyVault,” “VM” for “ValoraMart,” and “VD” for “ValoraDeals.”
它的功能不只有看商店,也可以查看夜市、查看库存、还有完整的皮肤资料库,请你加上这些依据再想想
Thank you for the additional information! Here are some more suggestions for the name of your website, taking into account the expanded functionality:
“ValoraHub”: This name suggests that your website is a central hub or resource for all things related to Valoran commerce, including daily shops, night markets, inventories, and skin information.
“ValoraMarket”: This name emphasizes the commerce aspect of your website, and can encompass both daily shops and night markets, as well as inventory and skin information.
“ValoraVault”: This name plays off the idea of a vault or treasure trove, and suggests that your website is a valuable resource for all things Valoran, including commerce and skin information.
For abbreviations, you could use “VH” for “ValoraHub,” “VM” for “ValoraMarket,” and “VV” for “ValoraVault.”
缩写请增至三个字母 请你再想想
Sure, here are revised names and abbreviations that are three letters long:
“ValHub” (VHB): This name is a shortened version of “ValoraHub” and still suggests that your website is a central resource for all things Valoran, including commerce and skin information.
“ValMar” (VLM): This name is a shortened version of “ValoraMarket” and still emphasizes the commerce aspect of your website, while also encompassing night markets, inventory, and skin information.
“ValVault” (VVT): This name is a shortened version of “ValoraVault” and still plays off the idea of a vault or treasure trove, suggesting that your website is a valuable resource for all things Valoran.