Skip to content

Commit

Permalink
fix(image): update image reverse proxy
Browse files Browse the repository at this point in the history
- 修复 无代理下图片预览与下载错误
- 替换 pixiv.cat 为 pixiv.re
- 感谢站长持续付出
  • Loading branch information
txperl committed Oct 18, 2021
1 parent 134ca90 commit 4ebcfb7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/lib/core/biu.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@interRoot.bind("biu", "LIB_CORE")
class core_module_biu(interRoot):
def __init__(self):
self.ver = 201010
self.ver = 201020
self.lowestConfVer = 5
self.place = "local"
self.sysPlc = platform.system()
Expand Down Expand Up @@ -401,7 +401,7 @@ def __setImageHost(self):
if self.sets["biu"]["download"]["imageHost"] != "":
self.pximgURL = self.sets["biu"]["download"]["imageHost"]
if self.apiType == "byPassSni":
self.pximgURL = "https://i.pixiv.cat"
self.pximgURL = "https://i.pixiv.re"

def __clear(self):
if os.name == "nt":
Expand Down
3 changes: 2 additions & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,5 @@ biu:
# 留空则程序自动判断
# 参考如下:
# https://i.pximg.net 官方图片服务器(需代理)
# https://i.pixiv.cat 第三方反代图片服务器(无需代理)
# https://i.pixiv.cat 第三方反代图片服务器(需代理)
# https://i.pixiv.re 第三方反代图片服务器(无需代理)
8 changes: 4 additions & 4 deletions usr/templates/multiverse/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h2>搜索</h2>
<div class="inner split">
<div>
<section>
<h2>[email protected].1</h2>
<h2>[email protected].2</h2>
<p>一款不错的 Pixiv 搜索<b>辅助</b>工具。<br>基于 [email protected](+) 构建。</p>
</section>
<section>
Expand Down Expand Up @@ -187,7 +187,7 @@ <h2>其他</h2>
'#settingsIsAllSort': ['pixivbiu_funIsAllSort', 'off', '更多排序'],
'#settingsSortMode': ['pixivbiu_sortMode', '0', '排序模式'],
'#settingsSearchMode': ['pixivbiu_searchMode', 'tag', '搜索模式'],
'#settingsRvrProxyUrl': ['pixivbiu_RvrProxyUrl', 'https://i.pixiv.cat', '图片反代地址'],
'#settingsRvrProxyUrl': ['pixivbiu_RvrProxyUrl', 'https://i.pixiv.re', '图片反代地址'],
};

$(document).ready(function () {
Expand Down Expand Up @@ -354,7 +354,7 @@ <h2>其他</h2>
}
li += '<a target="_blank" href="https://www.pixiv.net/users/' + data[0]['author']['id'] + '"><d class="tooltip" title="打开画师 Pixiv 主页">Pixiv</d></a>';
li += '<a target="_blank" href=".?code=%40u%3d' + data[0]['author']['id'] + '%20-f"><op class="tooltip" title="获取 TA 的关注列表">关注列表</op></a>';
rstHtml += '<article class="thumb"><a class="imageBtn"><img src="' + data[0]['all']['user']['profile_image_urls']['medium'].replace('i.pximg.net', 'i.pixiv.cat') + '" alt="" /></a><h2>画师@' + data[0]['author']['name'] + '</h2><section class="thumbAction">' + li + '</section></article>';
rstHtml += '<article class="thumb"><a class="imageBtn"><img src="' + data[0]['all']['user']['profile_image_urls']['medium'].replace('i.pximg.net', 'i.pixiv.re') + '" alt="" /></a><h2>画师@' + data[0]['author']['name'] + '</h2><section class="thumbAction">' + li + '</section></article>';
}

// 用户列表整理
Expand All @@ -366,7 +366,7 @@ <h2>其他</h2>
li = '<a id="follow_' + data[i]['id'] + '" href="javascript: doFollow(' + data[i]['id'] + ', \'add\');"><b class="tooltip" title="关注"><hicon>💗</hicon></b></a>';
}
li += '<a target="_blank" href=".?code=%40u%3d' + data[i]['id'] + '%20-i"><d class="tooltip" title="获取 TA 的作品">🔍作品</d></a>';
rstHtml += '<article class="thumb"><a class="imageBtn"><img src="' + data[i]['profile_image_urls']['medium'].replace('i.pximg.net', 'i.pixiv.cat') + '" alt="" /></a><h2>' + data[i]['name'] + '</h2><section class="thumbAction">' + li + '</section></article>';
rstHtml += '<article class="thumb"><a class="imageBtn"><img src="' + data[i]['profile_image_urls']['medium'].replace('i.pximg.net', 'i.pixiv.re') + '" alt="" /></a><h2>' + data[i]['name'] + '</h2><section class="thumbAction">' + li + '</section></article>';
}

// 通用作品整理
Expand Down

0 comments on commit 4ebcfb7

Please sign in to comment.