From 40f6c629a7507ab70cc3f317823ec284ccac3fa5 Mon Sep 17 00:00:00 2001 From: partisan Date: Fri, 14 Jun 2024 09:23:14 +0200 Subject: [PATCH] libreX fix --- text-librex.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/text-librex.go b/text-librex.go index 526d7e8..15dddd4 100644 --- a/text-librex.go +++ b/text-librex.go @@ -19,7 +19,11 @@ type LibreXResult struct { type LibreXResponse []LibreXResult func PerformLibreXTextSearch(query, safe, lang string, page int) ([]TextSearchResult, error) { - // LibreX uses page starting from 0 + + // LibreX/Y uses offset instead of page that starts at 0 + page-- + page = page * 10 + searchURL := fmt.Sprintf("https://%s/api.php?q=%s&p=%d&t=0", LIBREX_DOMAIN, url.QueryEscape(query), page) // User Agent generation