I found a valid key from internet and wrote a test code like this:
--------------------------
.....
headers = {
# 测试必须用老版本的UA标识,否则会失败
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)' +
' Chrome/70.0.3538.110 Safari/537.36',
'Referer': 'https://www.douban.com'
}
the code worked, then i downloaded source code of calibre and replaced key in calibre\ebooks\metadata\douban.py, generated douban.pyo and replaced it into pylib.zip of current version in my computer, but it didn't work. I didn't read calibre source code carefully and completely, maybe should i also change request headers in calibre douban plugin?
Anather solution is i send this key to you, but i don't know if there will be a legal problem to use this key in calibre.
I found a valid key from internet and wrote a test code like this: ------- ------- ----- 70.0.3538. 110 Safari/537.36', /www.douban. com'
-------
.....
headers = {
# 测试必须用老版本的UA标识,否则会失败
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)' +
' Chrome/
'Referer': 'https:/
}
# 从网上找的别人的apikey my_key_ xxxx'
url = douban_base_url_ofc + 'isbn/' + isbn + '?apikey=
log.debug( "url:{} ".format( url)) ------- ------- -----
item = DoubanItem()
...
-------
the code worked, then i downloaded source code of calibre and replaced key in calibre\ ebooks\ metadata\ douban. py, generated douban.pyo and replaced it into pylib.zip of current version in my computer, but it didn't work. I didn't read calibre source code carefully and completely, maybe should i also change request headers in calibre douban plugin?
Anather solution is i send this key to you, but i don't know if there will be a legal problem to use this key in calibre.