Merge branch 'main' into feat/cnr

This commit is contained in:
Dr.Lt.Data
2024-12-25 15:56:10 +09:00
parent 8aa3617a18
commit 806fdd721d
13 changed files with 4385 additions and 3271 deletions

View File

@@ -2632,7 +2632,7 @@ def populate_github_stats(node_packs, json_obj_github):
if url in json_obj_github:
v['stars'] = json_obj_github[url]['stars']
v['last_update'] = json_obj_github[url]['last_update']
v['trust'] = json_obj_github[url]['author_account_age_days'] > 180
v['trust'] = json_obj_github[url]['author_account_age_days'] > 600
else:
v['stars'] = -1
v['last_update'] = -1

View File

@@ -103,7 +103,12 @@ async def get_data(uri, silent=False):
if uri.startswith("http"):
async with aiohttp.ClientSession(trust_env=True, connector=aiohttp.TCPConnector(verify_ssl=False)) as session:
async with session.get(uri) as resp:
headers = {
'Cache-Control': 'no-cache',
'Pragma': 'no-cache',
'Expires': '0'
}
async with session.get(uri, headers=headers) as resp:
json_text = await resp.text()
else:
with cache_lock: