From 3aa01807741ffad103b9f6a74d878e58f2e828e8 Mon Sep 17 00:00:00 2001 From: lolcat Date: Mon, 16 Oct 2023 02:30:43 -0400 Subject: captcha and imgur, findthatmeme, yep imagesearch --- api/v1/ac.php | 4 ++-- api/v1/images.php | 6 ++++++ api/v1/music.php | 7 +++++++ api/v1/news.php | 6 ++++++ api/v1/videos.php | 6 ++++++ api/v1/web.php | 6 ++++++ 6 files changed, 33 insertions(+), 2 deletions(-) (limited to 'api') diff --git a/api/v1/ac.php b/api/v1/ac.php index 0964fd9..3ee1481 100644 --- a/api/v1/ac.php +++ b/api/v1/ac.php @@ -17,7 +17,7 @@ class autocomplete{ "yep" => "https://api.yep.com/ac/?query={searchTerms}", "marginalia" => "https://search.marginalia.nu/suggest/?partial={searchTerms}", "yt" => "https://suggestqueries-clients6.youtube.com/complete/search?client=youtube&q={searchTerms}", - "sc" => "https://api-v2.soundcloud.com/search/queries?q={searchTerms}&client_id=iMxZgT5mfGstBj8GWJbYMvpzelS8ne0E&limit=10&offset=0&linked_partitioning=1&app_version=1693487844&app_locale=en" + "sc" => "https://api-v2.soundcloud.com/search/queries?q={searchTerms}&client_id=ArYppSEotE3YiXCO4Nsgid2LLqJutiww&limit=10&offset=0&linked_partitioning=1&app_version=1693487844&app_locale=en" ]; /* @@ -100,7 +100,7 @@ class autocomplete{ foreach($js[1] as $item){ - $json[] = strip_tags($item[0]); + $json[] = htmlspecialchars_decode(strip_tags($item[0])); } echo json_encode( diff --git a/api/v1/images.php b/api/v1/images.php index 694658e..474e2dd 100644 --- a/api/v1/images.php +++ b/api/v1/images.php @@ -7,6 +7,12 @@ chdir("../../"); include "lib/frontend.php"; $frontend = new frontend(); +/* + Captcha +*/ +include "lib/captcha_gen.php"; +new captcha($frontend, false); + [$scraper, $filters] = $frontend->getscraperfilters( "images", isset($_GET["scraper"]) ? $_GET["scraper"] : null diff --git a/api/v1/music.php b/api/v1/music.php index faf2d96..7512ac0 100644 --- a/api/v1/music.php +++ b/api/v1/music.php @@ -7,6 +7,13 @@ chdir("../../"); include "lib/frontend.php"; $frontend = new frontend(); +/* + Captcha +*/ +$null = null; +include "lib/captcha_gen.php"; +new captcha($null, $null, $null, $null, false); + [$scraper, $filters] = $frontend->getscraperfilters( "music", isset($_GET["scraper"]) ? $_GET["scraper"] : null diff --git a/api/v1/news.php b/api/v1/news.php index 775ef94..97738fc 100644 --- a/api/v1/news.php +++ b/api/v1/news.php @@ -7,6 +7,12 @@ chdir("../../"); include "lib/frontend.php"; $frontend = new frontend(); +/* + Captcha +*/ +include "lib/captcha_gen.php"; +new captcha($frontend, false); + [$scraper, $filters] = $frontend->getscraperfilters( "news", isset($_GET["scraper"]) ? $_GET["scraper"] : null diff --git a/api/v1/videos.php b/api/v1/videos.php index 225611a..9277792 100644 --- a/api/v1/videos.php +++ b/api/v1/videos.php @@ -7,6 +7,12 @@ chdir("../../"); include "lib/frontend.php"; $frontend = new frontend(); +/* + Captcha +*/ +include "lib/captcha_gen.php"; +new captcha($frontend, false); + [$scraper, $filters] = $frontend->getscraperfilters( "videos", isset($_GET["scraper"]) ? $_GET["scraper"] : null diff --git a/api/v1/web.php b/api/v1/web.php index 7f6d769..c479149 100644 --- a/api/v1/web.php +++ b/api/v1/web.php @@ -7,6 +7,12 @@ chdir("../../"); include "lib/frontend.php"; $frontend = new frontend(); +/* + Captcha +*/ +include "lib/captcha_gen.php"; +new captcha($frontend, false); + [$scraper, $filters] = $frontend->getscraperfilters( "web", isset($_GET["scraper"]) ? $_GET["scraper"] : null -- cgit v1.2.3