Don't show unknown sources
This commit is contained in:
parent
ed167eb37c
commit
380896a0ce
@ -1,6 +1,9 @@
|
||||
use okhttp, types, json, functional
|
||||
|
||||
URL = "https://danbooru.donmai.us/posts"
|
||||
|
||||
class DanbooruApi {
|
||||
|
||||
def DanbooruApi(auth) {
|
||||
this.headers = {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0"
|
||||
@ -11,7 +14,7 @@ class DanbooruApi {
|
||||
}
|
||||
|
||||
def getPost(id) {
|
||||
url = "https://danbooru.donmai.us/posts/" + id + ".json"
|
||||
url = URL + "/" + id + ".json"
|
||||
response = okhttp.request()
|
||||
.headers(this.headers)
|
||||
.url(url)
|
||||
@ -27,7 +30,7 @@ class DanbooruApi {
|
||||
}
|
||||
|
||||
def getPosts(params) {
|
||||
url = "https://danbooru.donmai.us/posts.json" + params
|
||||
url = URL + ".json" + params
|
||||
response = okhttp.request()
|
||||
.headers(this.headers)
|
||||
.url(url)
|
||||
@ -104,7 +107,7 @@ class Post {
|
||||
if pixivId {
|
||||
return "https://www.pixiv.net/en/artworks/" + pixivId
|
||||
}
|
||||
return src
|
||||
return URL + "/" + this.post.id
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user