From 3f153593f1863e3795ec9fb3828f4475475430f6 Mon Sep 17 00:00:00 2001
From: Elias Chetouane <elias.chetouane@univ-grenoble-alpes.fr>
Date: Fri, 24 May 2024 14:53:08 +0200
Subject: [PATCH] =?UTF-8?q?Correction=20bug=20requ=C3=AAte.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 0-collect-data/rdg.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/0-collect-data/rdg.py b/0-collect-data/rdg.py
index 138b3ac..53cffb6 100644
--- a/0-collect-data/rdg.py
+++ b/0-collect-data/rdg.py
@@ -22,9 +22,9 @@ urls = [
     'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=producerAffiliation%3AUGA',
     'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=contributorAffiliation%3AUGA',
     'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=datasetContactAffiliation%3A(Grenoble AND Alpes)',
-    'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=authorAffiliation%3AGrenoble(Grenoble AND Alpes)',
-    'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=producerAffiliation%3AGrenoble(Grenoble AND Alpes)',
-    'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=contributorAffiliation%3AGrenoble(Grenoble AND Alpes)'
+    'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=authorAffiliation%3A(Grenoble AND Alpes)',
+    'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=producerAffiliation%3A(Grenoble AND Alpes)',
+    'https://entrepot.recherche.data.gouv.fr/api/search?q=*&fq=contributorAffiliation%3A(Grenoble AND Alpes)'
     # possiblilité d'ajouter d'autres requêtes
 ]
 
@@ -39,7 +39,7 @@ def get_results(url):
     count = nb_res
     page = 1
     while(nb_res > 0):
-        newurl = url+"&start="+str(count)
+        newurl = url+"&type=dataset"+"&start="+str(count)
         req = requests.get(newurl)
         results.append(req.json())
         nb_res = results[page]["data"]["count_in_response"]
-- 
GitLab