mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-24 18:47:23 +00:00
fixed douban api not working in some cases
This commit is contained in:
parent
f44574af67
commit
338ca61cf9
@ -24,17 +24,14 @@ $(document).ready(function () {
|
||||
return this.replace(new RegExp(s1, "gm"), s2);
|
||||
}
|
||||
|
||||
$.ajaxSetup({
|
||||
type: "GET",
|
||||
dataType: "jsonp",
|
||||
jsonp: 'callback',
|
||||
});
|
||||
|
||||
gg_search_book = function (title) {
|
||||
title = title.replaceAll(/\s+/, '+');
|
||||
var url = google + gg_search + '?q=' + title;
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "GET",
|
||||
dataType: "jsonp",
|
||||
jsonp: 'callback',
|
||||
success: function (data) {
|
||||
gg_results = data.items;
|
||||
},
|
||||
@ -89,6 +86,9 @@ $(document).ready(function () {
|
||||
var url = douban + db_search + '?q=' + title + '&fields=all&count=10';
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "GET",
|
||||
dataType: "jsonp",
|
||||
jsonp: 'callback',
|
||||
success: function (data) {
|
||||
db_results = data.books;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user