aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2021-07-05 15:47:33 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2021-07-05 15:47:33 +0200
commit9e17197215a2e7b5390ee12aad79f3f876f15bf3 (patch)
treedf4b35897244767ef24b9d9374fb620e40b4afc4
parentremoved the requirements on the password for the UserForm (diff)
downloadnewspipe-9e17197215a2e7b5390ee12aad79f3f876f15bf3.tar.gz
newspipe-9e17197215a2e7b5390ee12aad79f3f876f15bf3.tar.bz2
newspipe-9e17197215a2e7b5390ee12aad79f3f876f15bf3.zip
only delete read article retrieved more than 60 days ago.
-rwxr-xr-xnewspipe/commands.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/newspipe/commands.py b/newspipe/commands.py
index 2eba5d15..8bcefcad 100755
--- a/newspipe/commands.py
+++ b/newspipe/commands.py
@@ -101,12 +101,12 @@ def disable_inactive_users(last_seen):
@application.cli.command("delete_read_articles")
def delete_read_articles():
- "Delete read articles (and not liked) retrieved since more than 15 days ago."
+ "Delete read articles (and not liked) retrieved since more than 60 days ago."
filter = {}
filter["user_id__ne"] = 1
filter["readed"] = True
filter["like"] = False
- filter["retrieved_date__lt"] = date.today() - relativedelta(days=15)
+ filter["retrieved_date__lt"] = date.today() - relativedelta(days=60)
articles = ArticleController().read(**filter).limit(5000)
for article in articles:
try:
bgstack15