Parcourir la source

Add an arbitrary limit on the number of values returned

jherve il y a 1 an
Parent
commit
2ae7111cbf
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      src/de_quoi_parle_le_monde/internet_archive.py

+ 2 - 0
src/de_quoi_parle_le_monde/internet_archive.py

@@ -125,6 +125,8 @@ class InternetArchiveClient:
             # of the HTTP layer that this client should not be aware of..
             to_=min(dt + timedelta(hours=6.0), datetime.now()),
             filter="statuscode:200",
+            # Just to be safe, add an arbitrary limit to the number of values returned
+            limit=100,
         )
 
         all_snaps = await self.search_snapshots(req)