Small improvements / fix for unlisted apps

This commit is contained in:
Alexandre Aubin 2018-05-11 16:27:55 +02:00
parent 6ef0ea1457
commit 93c283e063

View file

@ -16,7 +16,7 @@ class UnlistedApps():
apps = []
for i in range(0,6):
for i in range(0,7):
print("Page " + str(i) + " ... ")
r = requests.get("https://api.github.com/search/repositories?q=_ynh&sort=updated&per_page=100&page="+str(i))
@ -48,9 +48,9 @@ class UnlistedApps():
apps = sorted(apps, key=lambda x: x["updated_days_ago"])
for app in apps:
if app["updated_days_ago"] > 200:
if app["updated_days_ago"] > 100:
continue
print(app["name"] + " ... " + app["url"])
print(app["name"] + " ... " + app["url"] + " ... " + str(app["updated_days_ago"]))
with open('apps.json', 'w') as f:
json.dump(apps, f)