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
|
mkdir -p ~/Pictures/Wallpapers
|
||||||
page=$((1 + RANDOM % 1000));
|
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);
|
link=$(echo "$response" | jq '.[0].file_url' -r);
|
||||||
ext=$(echo "$link" | awk -F. '{print $NF}')
|
ext=$(echo "$link" | awk -F. '{print $NF}')
|
||||||
downloadPath="$HOME/Pictures/Wallpapers/konachan_random_image.$ext"
|
downloadPath="$HOME/Pictures/Wallpapers/konachan_random_image.$ext"
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ Singleton {
|
|||||||
},
|
},
|
||||||
"konachan": {
|
"konachan": {
|
||||||
"name": "Konachan",
|
"name": "Konachan",
|
||||||
"url": "https://konachan.com",
|
"url": "https://konachan.net",
|
||||||
"api": "https://konachan.com/post.json",
|
"api": "https://konachan.net/post.json",
|
||||||
"description": Translation.tr("For desktop wallpapers | Good quality"),
|
"description": Translation.tr("For desktop wallpapers | Good quality"),
|
||||||
"mapFunc": (response) => {
|
"mapFunc": (response) => {
|
||||||
return response.map(item => {
|
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) => {
|
"tagMapFunc": (response) => {
|
||||||
return response.map(item => {
|
return response.map(item => {
|
||||||
return {
|
return {
|
||||||
@@ -360,7 +360,7 @@ Singleton {
|
|||||||
|
|
||||||
function makeRequest(tags, nsfw=false, limit=20, page=1) {
|
function makeRequest(tags, nsfw=false, limit=20, page=1) {
|
||||||
var url = constructRequestUrl(tags, nsfw, limit, page)
|
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, {
|
const newResponse = root.booruResponseDataComponent.createObject(null, {
|
||||||
"provider": currentProvider,
|
"provider": currentProvider,
|
||||||
|
|||||||
Reference in New Issue
Block a user