mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
优化油猴脚本
This commit is contained in:
@@ -156,7 +156,7 @@ var i = 1;
|
||||
async function getSite() {
|
||||
return new Promise((resolve, reject) => {
|
||||
GM_xmlhttpRequest({
|
||||
url: `${ptools}${path}?url=${document.location.origin + '/'}&token=${token}`,
|
||||
url: `${ptools}${path}?url=${document.location.host + '/'}&token=${token}`,
|
||||
method: "GET",
|
||||
responseType: "json",
|
||||
onload: function (response) {
|
||||
|
||||
@@ -1232,7 +1232,7 @@ def monkey_to_ptools(request):
|
||||
msg='Token认证失败!'
|
||||
).to_dict(), safe=False)
|
||||
logger.info(url)
|
||||
site_list = Site.objects.filter(url=url)
|
||||
site_list = Site.objects.filter(url__contains=url)
|
||||
if len(site_list) == 1:
|
||||
site = site_list.first()
|
||||
# logger.info(f'{(datetime.now() - site.mysite.updated_at).seconds / 3600}')
|
||||
|
||||
Reference in New Issue
Block a user