forked from Shinonome/dots-hyprland
konachan.net instead of konachan.com to prevent captchas (#1664)
This commit is contained in:
@@ -11,7 +11,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
mkdir -p ~/Pictures/Wallpapers
|
||||
page=$((1 + RANDOM % 1000));
|
||||
response=$(curl "https://konachan.com/post.json?tags=rating%3Asafe&limit=1&page=$page")
|
||||
response=$(curl "https:net/post.json?tags=rating%3Asafe&limit=1&page=$page")
|
||||
link=$(echo "$response" | jq '.[0].file_url' -r);
|
||||
ext=$(echo "$link" | awk -F. '{print $NF}')
|
||||
downloadPath="$HOME/Pictures/Wallpapers/konachan_random_image.$ext"
|
||||
|
||||
@@ -58,8 +58,8 @@ Singleton {
|
||||
},
|
||||
"konachan": {
|
||||
"name": "Konachan",
|
||||
"url": "https://konachan.com",
|
||||
"api": "https://konachan.com/post.json",
|
||||
"url": "https://konachan.net",
|
||||
"api": "https://konachan.net/post.json",
|
||||
"description": Translation.tr("For desktop wallpapers | Good quality"),
|
||||
"mapFunc": (response) => {
|
||||
return response.map(item => {
|
||||
@@ -80,7 +80,7 @@ Singleton {
|
||||
}
|
||||
})
|
||||
},
|
||||
"tagSearchTemplate": "https://konachan.com/tag.json?order=count&name={{query}}*",
|
||||
"tagSearchTemplate": "https://konachan.net/tag.json?order=count&name={{query}}*",
|
||||
"tagMapFunc": (response) => {
|
||||
return response.map(item => {
|
||||
return {
|
||||
@@ -360,7 +360,7 @@ Singleton {
|
||||
|
||||
function makeRequest(tags, nsfw=false, limit=20, page=1) {
|
||||
var url = constructRequestUrl(tags, nsfw, limit, page)
|
||||
// console.log("[Booru] Making request to " + url)
|
||||
console.log("[Booru] Making request to " + url)
|
||||
|
||||
const newResponse = root.booruResponseDataComponent.createObject(null, {
|
||||
"provider": currentProvider,
|
||||
|
||||
Reference in New Issue
Block a user