Greasy Fork is available in English.
Show IMDb ratings on Douban, and vice versa
< Feedback on MoreMovieRatings
前几天omdb受到了一些攻击挂掉了,现在自动跳转http可能只是临时防范措施,估计过两天就好了
Attention Users!
02/04/17 - Error 503/The service is unavailable! I KNOW! I've been working throughout the night trying to track down the bot/script/attack causing this issue, it's not normal activity as someone decided it was a good idea to open over 50+ concurrent connections and spam 300+ million requests an hour. Unfortunately the majority of features available to me to prevent these sorts of attacks are browser security checks (which are currently enabled so you can read this message) this is only temporary as I'm aware it breaks the majority of API implementations. Sorry for the inconvenience and I'll be working nonstop to get this resolved ASAP.
直接用XMLHttpRequest
受到同源政策限制了,把原来的getJSON
函数改成用GM内置的
function getJSON(url, callback) {
GM_xmlhttpRequest({
method: 'GET',
url: url,
onload: function(response) {
if (response.status >= 200 && response.status < 400)
callback(JSON.parse(response.responseText));
else
console.log('Error getting ' + url + ': ' + response.statusText);
}
});
}
声明部分加上
// @connect www.omdbapi.com
我的意思是——直接访问imdb抓取内容慢则慢点,但是数据更新更为及时,反正用GM_xmlhttpRequest也不怕跨域
咦,咋变叉叉了?
我暂时改用GM_xmlhttpRequest了,如果以后OMDb API又支持https了我再改回来
今天突然发现omdbapi自动跳转http了
这样最新版chrome上访问https://www.omdbapi.com 就变成不安全内容而直接被阻止了,不知道是我这边网络的原因还是普遍现象。JayXon大大能否改成直接访问imdb抓取内容或者给个选择项?