From 67bd16409bd6bb0a1e0d56aa154522a6aa96eee7 Mon Sep 17 00:00:00 2001 From: Hexaitos Date: Tue, 12 Nov 2024 00:06:10 +0100 Subject: [PATCH] Better API call, add more categories --- categories.txt | 64 ++++++++++++++++++++++++++++++++++++++- get_images_by_category.rb | 3 +- 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/categories.txt b/categories.txt index ba066a4..7c8360f 100644 --- a/categories.txt +++ b/categories.txt @@ -37,4 +37,66 @@ Category:Quality_images_of_Haliaeetus_leucogaster Category:Quality_images_of_captive_Haliaeetus_pelagicus Category:Quality_images_of_Haliaeetus_vocifer Category:Quality_images_of_Haliastur_indus -Category:Quality_images_of_Haliastur_sphenurus \ No newline at end of file +Category:Quality_images_of_Haliastur_sphenurus +Category:Quality_images_of_Melierax_canorus +Category:Quality_images_of_Melierax_poliopterus +Category:Quality_images_of_Milvus_aegyptius +Category:Quality_images_of_Milvus_milvus +Category:Quality_images_of_Aegypius_monachus +Category:Quality_images_of_Busarellus_nigricollis +Category:Quality_images_of_Elanus_caeruleus +Category:Quality_images_of_captive_Geranoaetus_melanoleucus +Category:Quality_images_of_Gypaetus_barbatus +Category:Quality_images_of_Gypohierax_angolensis +Category:Quality_images_of_Leucopternis_semiplumbeus +Category:Quality_images_of_Lophaetus_occipitalis +Category:Quality_images_of_Necrosyrtes_monachus +Category:Quality_images_of_Neophron_percnopterus +Category:Quality_images_of_Nisaetus_cirrhatus +Category:Quality_images_of_Parabuteo_unicinctus +Category:Quality_images_of_Polemaetus_bellicosus +Category:Quality_images_of_Rostrhamus_sociabilis +Category:Quality_images_of_Rupornis_magnirostris +Category:Quality_images_of_Spilornis_cheela +Category:Quality_images_of_Stephanoaetus_coronatus +Category:Quality_images_of_Torgos_tracheliotos +Category:Quality_images_of_Cathartes_aura +Category:Quality_images_of_Cathartes_burrovianus +Category:Quality_images_of_Coragyps_atratus +Category:Quality_images_of_Gymnogyps_californianus +Category:Quality_images_of_Sarcoramphus_papa +Category:Quality_images_of_Vultur_gryphus +Category:Quality_images_of_Pandion_cristatus +Category:Quality_images_of_Pandion_haliaetus +Category:Quality_images_of_Sagittarius_serpentarius +Category:Valued_images_of_Accipitridae +Category:Accipiter_gentilis_in_flight +Category:Accipiter_nisus_in_flight +Category:Aegypius_monachus_in_flight +Category:Aquila_adalberti_in_flight +Category:Aquila_chrysaetos_in_flight +Category:Aquila_fasciata_in_flight +Category:Aquila_nipalensis_in_flight +Category:Aquila_rapax_in_flight +Category:Aviceda_subcristata_in_flight +Category:Buteo_jamaicensis_in_flight +Category:Buteo_buteo_in_flight +Category:Buteo lagopus in flight +Category:Buteo lineatus in flight +Category:Buteo regalis in flight +Category:Haliaeetus leucocephalus in flight +Category:Terathopius ecaudatus (captive, heads) +Category:Terathopius ecaudatus (captive) +Category:Terathopius ecaudatus in flight (captive) +Category:Terathopius ecaudatus in South Africa +Category:Terathopius ecaudatus of the Kruger National Park +Category:Terathopius ecaudatus of Kgalagadi Transfrontier Park +Category:Terathopius ecaudatus in Kenya +Category:Terathopius ecaudatus in Tanzania +Category:Terathopius ecaudatus in flight +Category:Haliaeetus leucogaster in flight +Category:Accipiter gentilis heads +Category:Haliaeetus leucocephalus heads +Category:Haliaeetus albicilla heads +Category:Haliaeetus leucogaster heads +Category:Haliaeetus pelagicus heads \ No newline at end of file diff --git a/get_images_by_category.rb b/get_images_by_category.rb index de039f5..94af7ae 100644 --- a/get_images_by_category.rb +++ b/get_images_by_category.rb @@ -19,7 +19,8 @@ def get_images_by_category(categories) action: 'query', list: 'categorymembers', cmtitle: "Category:#{random_category}", # Specify the category title - cmlimit: 100, + cmlimit: 500, + cmtype: 'file', format: 'json' # Request response in JSON format }