update scanner

update DB
This commit is contained in:
Dr.Lt.Data
2024-06-09 16:36:05 +09:00
parent eb1f9ae0a3
commit 1db1ca5ce6
7 changed files with 1983 additions and 1056 deletions

View File

@@ -293,12 +293,16 @@ def update_custom_nodes():
if len(path_parts) >= 2 and domain == "github.com":
owner_repo = "/".join(path_parts[-2:])
repo = g.get_repo(owner_repo)
owner = repo.owner
now = datetime.datetime.now(datetime.timezone.utc)
author_time_diff = now - owner.created_at
last_update = repo.pushed_at.strftime("%Y-%m-%d %H:%M:%S") if repo.pushed_at else 'N/A'
item = {
"stars": repo.stargazers_count,
"last_update": last_update,
"cached_time": datetime.datetime.now().timestamp(),
"cached_time": now.timestamp(),
"author_account_age_days": author_time_diff.days,
}
return url, item
else: