Skip to content

Commit

Permalink
Support sns-img-al.xhscdn.com (#1363)
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Nov 13, 2024
1 parent 251773d commit 17b1cbe
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
19 changes: 17 additions & 2 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34138,8 +34138,6 @@ var $$IMU_EXPORT$$;
//(domain_nosub === "mafengwo.net" && domain.match(/^p[0-9]*(?:-[a-z]+)\./)) ||
// http://mplive-1253454074.image.myqcloud.com/mplive_dev/imgZmFkNWY0Y2ItNDFkOS00ZTNlLWE3ZmEtZmE4YTA2MGI1NjM0.jpg?imageView2/1/w/400/h/225
(domain_nosub === "myqcloud.com" && domain.match(/image\.myqcloud\.com/)) ||
// https://ci.xiaohongshu.com/751cccf1-a34a-57fd-ac5e-438265582359?imageMogr2/thumbnail/640x640/format/jpg/quality/92/auto-orient/strip
domain === "ci.xiaohongshu.com" ||
// http://pic.qianye88.com/0c4b3bc07a69b2ed260d3b17e15ff4f2.jpeg?imageMogr2/thumbnail/x300/quality/90!
domain === "pic.qianye88.com" ||
// http://imgboys1.yohobuy.com/spidercms/2018/01/27/01/0127fc0ca0f50496e5235ebc742ff0e056.jpeg?imageView2/2/w/240/q/75|imageslim
Expand Down Expand Up @@ -34235,6 +34233,23 @@ var $$IMU_EXPORT$$;
};
}

if (domain === "ci.xiaohongshu.com" ||
// thanks to Froktime on github for reporting: https://github.com/qsniyg/maxurl/issues/1363
// https://sns-img-al.xhscdn.com/55aecc9b-df03-0ef1-a602-1d126e78035b?imageView2/2/w/1080/format/jpg
// https://sns-img-al.xhscdn.com/55aecc9b-df03-0ef1-a602-1d126e78035b
domain === "sns-img-al.xhscdn.com") {
// https://ci.xiaohongshu.com/751cccf1-a34a-57fd-ac5e-438265582359?imageMogr2/thumbnail/640x640/format/jpg/quality/92/auto-orient/strip
return {
url: src.replace(/\?.*$/, ""),
headers: {
Referer: ""
},
referer_ok: {
same_domain: true
}
};
}

if (domain_nowww === "dailyherald.com") {
// http://www.dailyherald.com/storyimage/DA/20140418/news/140418160/AR/0/AR-140418160.jpg&updated=201404182313&MaxW=800&maxH=800&noborder
newsrc = src.replace(/[?&].*$/, "");
Expand Down
18 changes: 16 additions & 2 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -31273,8 +31273,6 @@ var $$IMU_EXPORT$$;
//(domain_nosub === "mafengwo.net" && domain.match(/^p[0-9]*(?:-[a-z]+)\./)) ||
// http://mplive-1253454074.image.myqcloud.com/mplive_dev/imgZmFkNWY0Y2ItNDFkOS00ZTNlLWE3ZmEtZmE4YTA2MGI1NjM0.jpg?imageView2/1/w/400/h/225
(domain_nosub === "myqcloud.com" && domain.match(/image\.myqcloud\.com/)) ||
// https://ci.xiaohongshu.com/751cccf1-a34a-57fd-ac5e-438265582359?imageMogr2/thumbnail/640x640/format/jpg/quality/92/auto-orient/strip
domain === "ci.xiaohongshu.com" ||
// http://pic.qianye88.com/0c4b3bc07a69b2ed260d3b17e15ff4f2.jpeg?imageMogr2/thumbnail/x300/quality/90!
domain === "pic.qianye88.com" ||
// http://imgboys1.yohobuy.com/spidercms/2018/01/27/01/0127fc0ca0f50496e5235ebc742ff0e056.jpeg?imageView2/2/w/240/q/75|imageslim
Expand Down Expand Up @@ -31366,6 +31364,22 @@ var $$IMU_EXPORT$$;
head_wrong_contenttype: true
};
}
if (domain === "ci.xiaohongshu.com" ||
// thanks to Froktime on github for reporting: https://github.com/qsniyg/maxurl/issues/1363
// https://sns-img-al.xhscdn.com/55aecc9b-df03-0ef1-a602-1d126e78035b?imageView2/2/w/1080/format/jpg
// https://sns-img-al.xhscdn.com/55aecc9b-df03-0ef1-a602-1d126e78035b
domain === "sns-img-al.xhscdn.com") {
// https://ci.xiaohongshu.com/751cccf1-a34a-57fd-ac5e-438265582359?imageMogr2/thumbnail/640x640/format/jpg/quality/92/auto-orient/strip
return {
url: src.replace(/\?.*$/, ""),
headers: {
Referer: ""
},
referer_ok: {
same_domain: true
}
};
}
if (domain_nowww === "dailyherald.com") {
// http://www.dailyherald.com/storyimage/DA/20140418/news/140418160/AR/0/AR-140418160.jpg&updated=201404182313&MaxW=800&maxH=800&noborder
newsrc = src.replace(/[?&].*$/, "");
Expand Down

0 comments on commit 17b1cbe

Please sign in to comment.