From 10f80823dc2cdb86fa56d15c39cc6e864d297e10 Mon Sep 17 00:00:00 2001 From: goose Date: Tue, 7 Jan 2020 12:44:07 +0800 Subject: [PATCH 0001/1191] add --- surge.js | 1 - 1 file changed, 1 deletion(-) diff --git a/surge.js b/surge.js index b53d20f49..e69de29bb 100644 --- a/surge.js +++ b/surge.js @@ -1 +0,0 @@ -console.log(body) \ No newline at end of file From d0be24ace21fc0debac2a3ca8c8f2845e1d12c59 Mon Sep 17 00:00:00 2001 From: 0x1 <12595948+yichahucha@users.noreply.github.com> Date: Tue, 7 Jan 2020 12:45:31 +0800 Subject: [PATCH 0002/1191] Delete surge.js --- surge.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 surge.js diff --git a/surge.js b/surge.js deleted file mode 100644 index e69de29bb..000000000 From ae488f852300c86844f22d91ed58e3ca0ceb302f Mon Sep 17 00:00:00 2001 From: goose Date: Tue, 7 Jan 2020 13:29:51 +0800 Subject: [PATCH 0003/1191] add --- README.md | 94 +++++++++ cron_daily.js | 20 ++ jd_price.js | 212 ++++++++++++++++++++ nf_rating.js | 525 ++++++++++++++++++++++++++++++++++++++++++++++++++ tb_price.js | 205 ++++++++++++++++++++ tool.js | 109 +++++++++++ wb_ad.js | 183 ++++++++++++++++++ wb_launch.js | 27 +++ 8 files changed, 1375 insertions(+) create mode 100644 README.md create mode 100644 cron_daily.js create mode 100644 jd_price.js create mode 100644 nf_rating.js create mode 100644 tb_price.js create mode 100644 tool.js create mode 100644 wb_ad.js create mode 100644 wb_launch.js diff --git a/README.md b/README.md new file mode 100644 index 000000000..3e77acf60 --- /dev/null +++ b/README.md @@ -0,0 +1,94 @@ +## Surge + +Remove Weibo ads, promotion and recommend +``` +[Script] +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +[MITM] +hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com +``` + +Display Netflix TV series and movie's IMDb ratings, Douban ratings, rotten tomato and country/region +``` +[Script] +http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/netflix_ratings.js +http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +[MITM] +hostname = ios.prod.ftl.netflix.com +``` + +Display commodity historical price + +JD +``` +[Script] +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +[MITM] +hostname = api.m.jd.com +``` + +taobao (beta) +``` +[Rule] +# 注意优先级(建议放在第一条) +# 这两条规则可以最大程度缩小匹配的 IP 范围,减少干扰其他应用,不一定适用所有人,可以自己抓包调节 +IP-CIDR, 203.119.144.0/23, REJECT, no-resolve +IP-CIDR, 203.119.175.0/24, REJECT, no-resolve +# 目前这条规则匹配的是部分阿里云 IP 段,其他使用这些阿里云 IP 的应用可能会有问题,谨慎使用 +# IP-CIDR, 203.119.128.0/18, REJECT, no-resolve +[Script] +http-response ^https://trade-acs.m.taobao.com/gw/mtop.taobao.detail.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +[MITM] +hostname = trade-acs.m.taobao.com +``` + +Daily work check-in reminder +``` +[Script] +cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/surge/master/cron_daily.js +``` + +## Quan-X + +Remove Weibo ads, promotion and recommend +``` +[rewrite_local] +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body wb_ad.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body wb_launch.js +[mitm] +hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com +``` + +Display Netflix TV series and movie's IMDb ratings, Douban ratings, rotten tomato and country/region +``` +[rewrite_local] +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url request-header languages=(.+?)&(.+)&path=%5B%22videos%22%2C%(\d+)%22%2C%22summary%22%5D request-header languages=en-US&$2&path=%5B%22videos%22%2C%$3%22%2C%22summary%22%5D&path=%5B%22videos%22%2C%$3%22%2C%22details%22%5D +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body nf_rating.js +[mitm] +hostname = ios.prod.ftl.netflix.com +``` + +Display commodity historical price + +JD +``` +[rewrite_local] +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js +[mitm] +hostname = api.m.jd.com +``` +taobao (beta) +``` +[filter_local] +# 注意优先级(建议放在第一条) +# 这两条规则可以最大程度缩小匹配的 IP 范围,减少干扰其他应用,不一定适用所有人,可以自己抓包调节 +ip-cidr, 203.119.144.0/23, reject, no-resolve +ip-cidr, 203.119.175.0/24, reject, no-resolve +# 目前这条规则匹配的是部分阿里云 IP 段,其他使用这些阿里云 IP 的应用可能会有问题,谨慎使用 +# ip-cidr, 203.119.128.0/18, reject, no-resolve +[rewrite_local] +^https://trade-acs.m.taobao.com/gw/mtop.taobao.detail.getdetail url script-response-body tb_price.js +[mitm] +hostname = trade-acs.m.taobao.com +``` diff --git a/cron_daily.js b/cron_daily.js new file mode 100644 index 000000000..5fedd7e9b --- /dev/null +++ b/cron_daily.js @@ -0,0 +1,20 @@ +/* +README:https://github.com/yichahucha/surge/tree/master +每日打卡提醒(corn "0 9,18 * * 1-5" 周一到周五,早九晚六)+ 每日壹句(有道词典)+ 跳转钉钉打卡页面(下拉通知点击链接) +*/ +$httpClient.get('https://dict.youdao.com/infoline/style/cardList?mode=publish&client=mobile&style=daily&size=2', function (error, response, data) { + let obj = JSON.parse(data); + let date = new Date(); + let isAM = date.getHours() < 12 ? true : false + let title = 'Clock' + (isAM ? ' in' : ' out') + (isAM ? ' ☀️' : ' 🌙'); + let subtitle = ''; + let content = 'dingtalk://dingtalkclient/page/link?url=https://attend.dingtalk.com/attend/index.html'; + if (!error) { + if (obj && obj.length > 1) { + let yi = obj[1]; + content = yi.title + '\n' + yi.summary + '\n\n' + content; + } + } + $notification.post(title, subtitle, content); + $done(); +}); diff --git a/jd_price.js b/jd_price.js new file mode 100644 index 000000000..cc0056976 --- /dev/null +++ b/jd_price.js @@ -0,0 +1,212 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "serverConfig"; +const path2 = "wareBusiness"; +const console_log = false; +const url = $request.url; +const body = $response.body; +const isSurge = typeof $httpClient != "undefined" +const isQuanX = typeof $task != "undefined" + +if (url.indexOf(path1) != -1) { + let obj = JSON.parse(body); + delete obj.serverConfig.httpdns; + delete obj.serverConfig.dnsvip; + delete obj.serverConfig.dnsvip_v6; + $done({ body: JSON.stringify(obj) }); + if (console_log) $notify("JD", "", "httpdns closed"); +} + +if (url.indexOf(path2) != -1) { + let obj = JSON.parse(body); + const floors = obj.floors; + const commodity_info = floors[floors.length - 1]; + const shareUrl = commodity_info.data.property.shareUrl; + request_history_price(shareUrl, function (data) { + if (data) { + const lowerword = adword_obj(); + lowerword.data.ad.textColor = "#fe0000"; + let bestIndex = 0; + for (let index = 0; index < floors.length; index++) { + const element = floors[index]; + if (element.mId == lowerword.mId) { + bestIndex = index + 1; + break; + } else { + if (element.sortId > lowerword.sortId) { + bestIndex = index; + break; + } + } + } + if (data.ok == 1 && data.single) { + const price_msgs = history_price_msg(data.single) + const historyword = adword_obj(); + lowerword.data.ad.adword = price_msgs[0]; + historyword.data.ad.adword = price_msgs[1]; + historyword.data.ad.textColor = "#FE9900"; + floors.insert(bestIndex, lowerword); + floors.insert(bestIndex + 1, historyword); + } + if (data.ok == 0 && data.msg.length > 0) { + lowerword.data.ad.adword = "⚠️ " + data.msg; + floors.insert(bestIndex, lowerword); + } + $done({ body: JSON.stringify(obj) }); + } else { + $done({ body }); + } + }) +} + +function history_price_msg(data) { + const rex_match = /\[.*?\]/g; + const rex_exec = /\[(.*),(.*),"(.*)"\]/; + const lower = data.lowerPriceyh; + const lower_date = changeDateFormat(data.lowerDateyh); + const lower_msg = "‼️ 历史最低到手价: ¥" + String(lower) + " " + lower_date + const curret_msg = (data.currentPriceStatus ? " 当前价格" + data.currentPriceStatus : "") + " (仅供参考)"; + const lower_price_msg = lower_msg + curret_msg; + const riqi = "日期: "; + const jiage = "价格: "; + const youhui = "活动: "; + const title_msg = "〽️ 历史价格走势"; + const title_table_msg = riqi + get_blank_space(25 - riqi.length) + jiage + get_blank_space(25 - jiage.length) + youhui; + let history_price_msg = ""; + let start_date = ""; + let end_date = ""; + let date_range_msg = `(最近一年)`; + let list = data.jiagequshiyh.match(rex_match); + list = list.reverse().slice(0, 365); + list.forEach((item, index) => { + if (item.length > 0) { + const result = rex_exec.exec(item); + const dateUTC = new Date(eval(result[1])); + const date = dateUTC.format("yyyy-MM-dd"); + if (index == 0) { + end_date = date; + } + if (index == list.length - 1) { + start_date = date; + } + let price = result[2]; + price = "¥" + String(parseFloat(price)); + if (date == lower_date) { + price += "❗️" + } + const sale = result[3]; + const msg = date + get_blank_space(20 - date.length) + price + get_blank_space(15 - price.length) + sale + "\n"; + history_price_msg += msg; + } + }); + // date_range_msg = `(${start_date} ~ ${end_date})`; + const price_msg = title_msg + " " + date_range_msg + "\n\n" + title_table_msg + "\n" + history_price_msg; + return [lower_price_msg, price_msg]; +} + +function request_history_price(share_url, callback) { + const options = { + url: "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", + headers: { + "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" + }, + body: "methodName=getBiJiaInfo_wxsmall&p_url=" + encodeURIComponent(share_url) + } + if (isSurge) { + $httpClient.post(options, function (error, response, data) { + if (!error) { + callback(JSON.parse(data)); + if (console_log) console.log("Data:\n" + data); + } else { + callback(null, null); + if (console_log) console.log("Error:\n" + error); + } + }) + } + if (isQuanX) { + options["method"] = "POST" + $task.fetch(options).then(response => { + callback(JSON.parse(response.body)); + if (console_log) console.log("Data:\n" + response.body); + }, reason => { + callback(null, null); + if (console_log) console.log("Error:\n" + reason.error); + }) + } +} + +function changeDateFormat(cellval) { + const date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10)); + const month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; + const currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); + return date.getFullYear() + "-" + month + "-" + currentDate; +} + +function get_blank_space(length) { + let blank = ""; + for (let index = 0; index < length; index++) { + blank += " "; + } + return blank; +} + +function adword_obj() { + return { + "bId": "eCustom_flo_199", + "cf": { + "bgc": "#ffffff", + "spl": "empty" + }, + "data": { + "ad": { + "adword": "", + "textColor": "#8C8C8C", + "color": "#f23030", + "newALContent": true, + "hasFold": true, + "class": "com.jd.app.server.warecoresoa.domain.AdWordInfo.AdWordInfo", + "adLinkContent": "", + "adLink": "" + } + }, + "mId": "bpAdword", + "refId": "eAdword_0000000028", + "sortId": 13 + } +} + +Array.prototype.insert = function (index, item) { + this.splice(index, 0, item); +}; + +Date.prototype.format = function (fmt) { + var o = { + "y+": this.getFullYear(), + "M+": this.getMonth() + 1, + "d+": this.getDate(), + "h+": this.getHours(), + "m+": this.getMinutes(), + "s+": this.getSeconds(), + "q+": Math.floor((this.getMonth() + 3) / 3), + "S+": this.getMilliseconds() + }; + for (var k in o) { + if (new RegExp("(" + k + ")").test(fmt)) { + if (k == "y+") { + fmt = fmt.replace(RegExp.$1, ("" + o[k]).substr(4 - RegExp.$1.length)); + } + else if (k == "S+") { + var lens = RegExp.$1.length; + lens = lens == 1 ? 3 : lens; + fmt = fmt.replace(RegExp.$1, ("00" + o[k]).substr(("" + o[k]).length - 1, lens)); + } + else { + fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + } + } + } + return fmt; +} diff --git a/nf_rating.js b/nf_rating.js new file mode 100644 index 000000000..ffe9341cf --- /dev/null +++ b/nf_rating.js @@ -0,0 +1,525 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const $tool = (() => { + const isSurge = typeof $httpClient != "undefined" + const isQuanX = typeof $task != "undefined" + const notify = (title, subtitle, message) => { + if (isQuanX) $notify(title, subtitle, message) + if (isSurge) $notification.post(title, subtitle, message) + } + const setCache = (value, key) => { + if (isQuanX) return $prefs.setValueForKey(value, key) + if (isSurge) return $persistentStore.write(value, key) + } + const getCache = (key) => { + if (isQuanX) return $prefs.valueForKey(key) + if (isSurge) return $persistentStore.read(key) + } + const GET = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "GET" + $task.fetch(options).then(response => { + response["status"] = response.statusCode + callback(null, response, response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) $httpClient.get(options, callback) + } + const POST = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "POST" + $task.fetch(options).then(response => { + response["status"] = response.statusCode + callback(null, response, response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) $httpClient.post(options, callback) + } + return { isQuanX, isSurge, notify, setCache, getCache, GET, POST } +})(); + +const consoleLog = false; +const imdbApikeyCacheKey = "IMDbApikey"; +const netflixTitleCacheKey = "NetflixTitle"; + +if ($request.headers && $tool.isSurge) { + let url = $request.url; + const urlDecode = decodeURIComponent(url); + const videos = urlDecode.match(/"videos","(\d+)"/); + const videoID = videos[1]; + const map = getTitleMap(); + const title = map[videoID]; + const isEnglish = url.match(/languages=en/) ? true : false; + if (!title && !isEnglish) { + const currentSummary = urlDecode.match(/\["videos","(\d+)","current","summary"\]/); + url = url.replace("&path=" + encodeURIComponent(currentSummary[0]), ""); + url = url.replace(/&languages=(.*?)&/, "&languages=en-US&"); + } + url += "&path=" + encodeURIComponent(`[${videos[0]},"details"]`); + $done({ url }); +} else { + var IMDbApikeys = IMDbApikeys(); + var IMDbApikey = $tool.getCache(imdbApikeyCacheKey); + if (!IMDbApikey) updateIMDbApikey(); + let obj = JSON.parse($response.body); + if (consoleLog) console.log("Netflix Original Body:\n" + $response.body); + const videoID = obj.paths[0][1]; + const video = obj.value.videos[videoID]; + const map = getTitleMap(); + let title = map[videoID]; + if (!title) { + title = video.summary.title; + setTitleMap(videoID, title, map); + } + let year = null; + let type = video.summary.type; + if (type == "movie") { + year = video.details.releaseYear; + } else if (type == "show") { + type = "series"; + } + delete video.details; + const requestRatings = async () => { + const IMDb = await requestIMDbRating(title, year, type); + const Douban = await requestDoubanRating(IMDb.id); + const IMDbrating = IMDb.msg.rating; + const tomatoes = IMDb.msg.tomatoes; + const country = IMDb.msg.country; + const doubanRating = Douban.rating; + const message = `${country}\n${IMDbrating}\n${doubanRating}${tomatoes.length > 0 ? "\n" + tomatoes + "\n" : "\n"}`; + return message; + } + let msg = ""; + requestRatings() + .then(message => msg = message) + .catch(error => msg = error + "\n") + .finally(() => { + let summary = obj.value.videos[videoID].summary; + summary["supplementalMessage"] = `${msg}${summary && summary.supplementalMessage ? "\n" + summary.supplementalMessage : ""}`; + if (consoleLog) console.log("Netflix Modified Body:\n" + JSON.stringify(obj)); + $done({ body: JSON.stringify(obj) }); + }); +} + +function getTitleMap() { + const map = $tool.getCache(netflixTitleCacheKey); + return map ? JSON.parse(map) : {}; +} + +function setTitleMap(id, title, map) { + map[id] = title; + $tool.setCache(JSON.stringify(map), netflixTitleCacheKey); +} + +function requestDoubanRating(imdbId) { + return new Promise(function (resolve, reject) { + const url = "https://api.douban.com/v2/movie/imdb/" + imdbId + "?apikey=0df993c66c0c636e29ecbb5344252a4a"; + if (consoleLog) console.log("Netflix Douban Rating URL:\n" + url); + $tool.GET(url, function (error, response, data) { + if (!error) { + if (consoleLog) console.log("Netflix Douban Rating response:\n" + JSON.stringify(response)); + if (consoleLog) console.log("Netflix Douban Rating Data:\n" + data); + if (response.status == 200) { + const obj = JSON.parse(data); + const rating = get_douban_rating_message(obj); + resolve({ rating }); + } else { + resolve({ rating: "Douban: " + errorTip().noData }); + } + } else { + if (consoleLog) console.log("Netflix Douban Rating Error:\n" + error); + resolve({ rating: "Douban: " + errorTip().error }); + } + }); + }); +} + +function requestIMDbRating(title, year, type) { + return new Promise(function (resolve, reject) { + let url = "https://www.omdbapi.com/?t=" + encodeURI(title) + "&apikey=" + IMDbApikey; + if (year) url += "&y=" + year; + if (type) url += "&type=" + type; + if (consoleLog) console.log("Netflix IMDb Rating URL:\n" + url); + $tool.GET(url, function (error, response, data) { + if (!error) { + if (consoleLog) console.log("Netflix IMDb Rating response:\n" + JSON.stringify(response)); + if (consoleLog) console.log("Netflix IMDb Rating Data:\n" + data); + if (response.status == 200) { + const obj = JSON.parse(data); + if (obj.Response != "False") { + const id = obj.imdbID; + const msg = get_IMDb_message(obj); + resolve({ id, msg }); + } else { + reject(errorTip().noData); + } + } else if (response.status == 401) { + if (IMDbApikeys.length > 1) { + updateIMDbApikey(); + requestIMDbRating(title, year, type); + } else { + reject(errorTip().noData); + } + } else { + reject(errorTip().noData); + } + } else { + if (consoleLog) console.log("Netflix IMDb Rating Error:\n" + error); + reject(errorTip().error); + } + }); + }); +} + +function updateIMDbApikey() { + if (IMDbApikey) IMDbApikeys.splice(IMDbApikeys.indexOf(IMDbApikey), 1); + const index = Math.floor(Math.random() * IMDbApikeys.length); + IMDbApikey = IMDbApikeys[index]; + $tool.setCache(IMDbApikey, imdbApikeyCacheKey); +} + +function get_IMDb_message(data) { + let rating_message = "IMDb: ⭐️ N/A"; + let tomatoes_message = ""; + let country_message = ""; + let ratings = data.Ratings; + if (ratings.length > 0) { + const imdb_source = ratings[0]["Source"]; + if (imdb_source == "Internet Movie Database") { + const imdb_votes = data.imdbVotes; + const imdb_rating = ratings[0]["Value"]; + rating_message = "IMDb: ⭐️ " + imdb_rating + " " + "" + imdb_votes; + if (data.Type == "movie") { + if (ratings.length > 1) { + const source = ratings[1]["Source"]; + if (source == "Rotten Tomatoes") { + const tomatoes = ratings[1]["Value"]; + tomatoes_message = "Tomatoes: 🍅 " + tomatoes; + } + } + } + } + } + country_message = get_country_message(data.Country); + return { rating: rating_message, tomatoes: tomatoes_message, country: country_message } +} + +function get_douban_rating_message(data) { + const average = data.rating.average; + const numRaters = data.rating.numRaters; + const rating_message = `Douban: ⭐️ ${average.length > 0 ? average + "/10" : "N/A"} ${numRaters == 0 ? "" : parseFloat(numRaters).toLocaleString()}`; + return rating_message; +} + +function get_country_message(data) { + const country = data; + const countrys = country.split(", "); + let emoji_country = ""; + countrys.forEach(item => { + emoji_country += countryEmoji(item) + " " + item + ", "; + }); + return emoji_country.slice(0, -2); +} + +function errorTip() { + return { noData: "⭐️ N/A", error: "❌ N/A" } +} + +function IMDbApikeys() { + const apikeys = [ + "PlzBanMe", "4e89234e", + "f75e0253", "d8bb2d6b", + "ae64ce8d", "7218d678", + "b2650e38", "8c4a29ab", + "9bd135c2", "953dbabe", + "1a66ef12", "3e7ea721", + "457fc4ff", "d2131426", + "9cc1a9b7", "e53c2c11", + "f6dfce0e", "b9db622f", + "e6bde2b9", "d324dbab", + "d7904fa3", "aeaf88b9"]; + return apikeys; +} + +function countryEmoji(name) { + const emojiMap = { + "Chequered": "🏁", + "Triangular": "🚩", + "Crossed": "🎌", + "Black": "🏴", + "White": "🏳", + "Rainbow": "🏳️‍🌈", + "Pirate": "🏴‍☠️", + "Ascension Island": "🇦🇨", + "Andorra": "🇦🇩", + "United Arab Emirates": "🇦🇪", + "Afghanistan": "🇦🇫", + "Antigua & Barbuda": "🇦🇬", + "Anguilla": "🇦🇮", + "Albania": "🇦🇱", + "Armenia": "🇦🇲", + "Angola": "🇦🇴", + "Antarctica": "🇦🇶", + "Argentina": "🇦🇷", + "American Samoa": "🇦🇸", + "Austria": "🇦🇹", + "Australia": "🇦🇺", + "Aruba": "🇦🇼", + "Åland Islands": "🇦🇽", + "Azerbaijan": "🇦🇿", + "Bosnia & Herzegovina": "🇧🇦", + "Barbados": "🇧🇧", + "Bangladesh": "🇧🇩", + "Belgium": "🇧🇪", + "Burkina Faso": "🇧🇫", + "Bulgaria": "🇧🇬", + "Bahrain": "🇧🇭", + "Burundi": "🇧🇮", + "Benin": "🇧🇯", + "St. Barthélemy": "🇧🇱", + "Bermuda": "🇧🇲", + "Brunei": "🇧🇳", + "Bolivia": "🇧🇴", + "Caribbean Netherlands": "🇧🇶", + "Brazil": "🇧🇷", + "Bahamas": "🇧🇸", + "Bhutan": "🇧🇹", + "Bouvet Island": "🇧🇻", + "Botswana": "🇧🇼", + "Belarus": "🇧🇾", + "Belize": "🇧🇿", + "Canada": "🇨🇦", + "Cocos (Keeling) Islands": "🇨🇨", + "Congo - Kinshasa": "🇨🇩", + "Congo": "🇨🇩", + "Central African Republic": "🇨🇫", + "Congo - Brazzaville": "🇨🇬", + "Switzerland": "🇨🇭", + "Côte d’Ivoire": "🇨🇮", + "Cook Islands": "🇨🇰", + "Chile": "🇨🇱", + "Cameroon": "🇨🇲", + "China": "🇨🇳", + "Colombia": "🇨🇴", + "Clipperton Island": "🇨🇵", + "Costa Rica": "🇨🇷", + "Cuba": "🇨🇺", + "Cape Verde": "🇨🇻", + "Curaçao": "🇨🇼", + "Christmas Island": "🇨🇽", + "Cyprus": "🇨🇾", + "Czechia": "🇨🇿", + "Czech Republic": "🇨🇿", + "Germany": "🇩🇪", + "Diego Garcia": "🇩🇬", + "Djibouti": "🇩🇯", + "Denmark": "🇩🇰", + "Dominica": "🇩🇲", + "Dominican Republic": "🇩🇴", + "Algeria": "🇩🇿", + "Ceuta & Melilla": "🇪🇦", + "Ecuador": "🇪🇨", + "Estonia": "🇪🇪", + "Egypt": "🇪🇬", + "Western Sahara": "🇪🇭", + "Eritrea": "🇪🇷", + "Spain": "🇪🇸", + "Ethiopia": "🇪🇹", + "European Union": "🇪🇺", + "Finland": "🇫🇮", + "Fiji": "🇫🇯", + "Falkland Islands": "🇫🇰", + "Micronesia": "🇫🇲", + "Faroe Islands": "🇫🇴", + "France": "🇫🇷", + "Gabon": "🇬🇦", + "United Kingdom": "🇬🇧", + "UK": "🇬🇧", + "Grenada": "🇬🇩", + "Georgia": "🇬🇪", + "French Guiana": "🇬🇫", + "Guernsey": "🇬🇬", + "Ghana": "🇬🇭", + "Gibraltar": "🇬🇮", + "Greenland": "🇬🇱", + "Gambia": "🇬🇲", + "Guinea": "🇬🇳", + "Guadeloupe": "🇬🇵", + "Equatorial Guinea": "🇬🇶", + "Greece": "🇬🇷", + "South Georgia & South Sandwich Is lands": "🇬🇸", + "Guatemala": "🇬🇹", + "Guam": "🇬🇺", + "Guinea-Bissau": "🇬🇼", + "Guyana": "🇬🇾", + "Hong Kong SAR China": "🇭🇰", + "Hong Kong": "🇭🇰", + "Heard & McDonald Islands": "🇭🇲", + "Honduras": "🇭🇳", + "Croatia": "🇭🇷", + "Haiti": "🇭🇹", + "Hungary": "🇭🇺", + "Canary Islands": "🇮🇨", + "Indonesia": "🇮🇩", + "Ireland": "🇮🇪", + "Israel": "🇮🇱", + "Isle of Man": "🇮🇲", + "India": "🇮🇳", + "British Indian Ocean Territory": "🇮🇴", + "Iraq": "🇮🇶", + "Iran": "🇮🇷", + "Iceland": "🇮🇸", + "Italy": "🇮🇹", + "Jersey": "🇯🇪", + "Jamaica": "🇯🇲", + "Jordan": "🇯🇴", + "Japan": "🇯🇵", + "Kenya": "🇰🇪", + "Kyrgyzstan": "🇰🇬", + "Cambodia": "🇰🇭", + "Kiribati": "🇰🇮", + "Comoros": "🇰🇲", + "St. Kitts & Nevis": "🇰🇳", + "North Korea": "🇰🇵", + "South Korea": "🇰🇷", + "Kuwait": "🇰🇼", + "Cayman Islands": "🇰🇾", + "Kazakhstan": "🇰🇿", + "Laos": "🇱🇦", + "Lebanon": "🇱🇧", + "St. Lucia": "🇱🇨", + "Liechtenstein": "🇱🇮", + "Sri Lanka": "🇱🇰", + "Liberia": "🇱🇷", + "Lesotho": "🇱🇸", + "Lithuania": "🇱🇹", + "Luxembourg": "🇱🇺", + "Latvia": "🇱🇻", + "Libya": "🇱🇾", + "Morocco": "🇲🇦", + "Monaco": "🇲🇨", + "Moldova": "🇲🇩", + "Montenegro": "🇲🇪", + "St. Martin": "🇲🇫", + "Madagascar": "🇲🇬", + "Marshall Islands": "🇲🇭", + "North Macedonia": "🇲🇰", + "Mali": "🇲🇱", + "Myanmar (Burma)": "🇲🇲", + "Mongolia": "🇲🇳", + "Macau Sar China": "🇲🇴", + "Northern Mariana Islands": "🇲🇵", + "Martinique": "🇲🇶", + "Mauritania": "🇲🇷", + "Montserrat": "🇲🇸", + "Malta": "🇲🇹", + "Mauritius": "🇲🇺", + "Maldives": "🇲🇻", + "Malawi": "🇲🇼", + "Mexico": "🇲🇽", + "Malaysia": "🇲🇾", + "Mozambique": "🇲🇿", + "Namibia": "🇳🇦", + "New Caledonia": "🇳🇨", + "Niger": "🇳🇪", + "Norfolk Island": "🇳🇫", + "Nigeria": "🇳🇬", + "Nicaragua": "🇳🇮", + "Netherlands": "🇳🇱", + "Norway": "🇳🇴", + "Nepal": "🇳🇵", + "Nauru": "🇳🇷", + "Niue": "🇳🇺", + "New Zealand": "🇳🇿", + "Oman": "🇴🇲", + "Panama": "🇵🇦", + "Peru": "🇵🇪", + "French Polynesia": "🇵🇫", + "Papua New Guinea": "🇵🇬", + "Philippines": "🇵🇭", + "Pakistan": "🇵🇰", + "Poland": "🇵🇱", + "St. Pierre & Miquelon": "🇵🇲", + "Pitcairn Islands": "🇵🇳", + "Puerto Rico": "🇵🇷", + "Palestinian Territories": "🇵🇸", + "Portugal": "🇵🇹", + "Palau": "🇵🇼", + "Paraguay": "🇵🇾", + "Qatar": "🇶🇦", + "Réunion": "🇷🇪", + "Romania": "🇷🇴", + "Serbia": "🇷🇸", + "Russia": "🇷🇺", + "Rwanda": "🇷🇼", + "Saudi Arabia": "🇸🇦", + "Solomon Islands": "🇸🇧", + "Seychelles": "🇸🇨", + "Sudan": "🇸🇩", + "Sweden": "🇸🇪", + "Singapore": "🇸🇬", + "St. Helena": "🇸🇭", + "Slovenia": "🇸🇮", + "Svalbard & Jan Mayen": "🇸🇯", + "Slovakia": "🇸🇰", + "Sierra Leone": "🇸🇱", + "San Marino": "🇸🇲", + "Senegal": "🇸🇳", + "Somalia": "🇸🇴", + "Suriname": "🇸🇷", + "South Sudan": "🇸🇸", + "São Tomé & Príncipe": "🇸🇹", + "El Salvador": "🇸🇻", + "Sint Maarten": "🇸🇽", + "Syria": "🇸🇾", + "Swaziland": "🇸🇿", + "Tristan Da Cunha": "🇹🇦", + "Turks & Caicos Islands": "🇹🇨", + "Chad": "🇹🇩", + "French Southern Territories": "🇹🇫", + "Togo": "🇹🇬", + "Thailand": "🇹🇭", + "Tajikistan": "🇹🇯", + "Tokelau": "🇹🇰", + "Timor-Leste": "🇹🇱", + "Turkmenistan": "🇹🇲", + "Tunisia": "🇹🇳", + "Tonga": "🇹🇴", + "Turkey": "🇹🇷", + "Trinidad & Tobago": "🇹🇹", + "Tuvalu": "🇹🇻", + "Taiwan": "🇨🇳", + "Tanzania": "🇹🇿", + "Ukraine": "🇺🇦", + "Uganda": "🇺🇬", + "U.S. Outlying Islands": "🇺🇲", + "United Nations": "🇺🇳", + "United States": "🇺🇸", + "USA": "🇺🇸", + "Uruguay": "🇺🇾", + "Uzbekistan": "🇺🇿", + "Vatican City": "🇻🇦", + "St. Vincent & Grenadines": "🇻🇨", + "Venezuela": "🇻🇪", + "British Virgin Islands": "🇻🇬", + "U.S. Virgin Islands": "🇻🇮", + "Vietnam": "🇻🇳", + "Vanuatu": "🇻🇺", + "Wallis & Futuna": "🇼🇫", + "Samoa": "🇼🇸", + "Kosovo": "🇽🇰", + "Yemen": "🇾🇪", + "Mayotte": "🇾🇹", + "South Africa": "🇿🇦", + "Zambia": "🇿🇲", + "Zimbabwe": "🇿🇼", + "England": "🏴󠁧󠁢󠁥󠁮󠁧󠁿", + "Scotland": "🏴󠁧󠁢󠁳󠁣󠁴󠁿", + "Wales": "🏴󠁧󠁢󠁷󠁬󠁳󠁿", + } + return emojiMap[name] ? emojiMap[name] : emojiMap["Chequered"]; +} diff --git a/tb_price.js b/tb_price.js new file mode 100644 index 000000000..92f5cc091 --- /dev/null +++ b/tb_price.js @@ -0,0 +1,205 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const consoleLog = false +const url = $request.url +const body = $response.body +const isSurge = typeof $httpClient != "undefined" +const isQuanX = typeof $task != "undefined" + +if (true) { + let obj = JSON.parse(body) + let apiStack = obj.data.apiStack[0] + let value = JSON.parse(apiStack.value) + if (value.global) { + let tradeConsumerProtection = value.global.data.tradeConsumerProtection + if (!tradeConsumerProtection) { + value.global.data["tradeConsumerProtection"] = customTradeConsumerProtection() + } + tradeConsumerProtection = value.global.data.tradeConsumerProtection + let service = tradeConsumerProtection.tradeConsumerService.service + let nonService = tradeConsumerProtection.tradeConsumerService.nonService + + let item = obj.data.item + let shareUrl = `https://item.taobao.com/item.htm?id=${item.itemId}` + + requestPrice(shareUrl, function (data) { + if (data) { + let historyItem = customItem() + if (data.ok == 1 && data.single) { + const lower = lowerMsgs(data.single) + const result = historyItems(data.single) + const tbitems = result[1] + service.items = service.items.concat(nonService.items) + historyItem.desc = lower[0] + historyItem.title = lower[1] + service.items.unshift(historyItem) + nonService.title = "价格走势" + nonService.items = tbitems + } + if (data.ok == 0 && data.msg.length > 0) { + historyItem.desc = data.msg + service.items.push(historyItem) + } + apiStack.value = JSON.stringify(value) + $done({ body: JSON.stringify(obj) }) + } else { + $done({ body }) + } + }) + } else { + $done({ body }) + } +} + +function requestPrice(shareUrl, callback) { + let options = { + url: "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", + headers: { + "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" + }, + body: "methodName=getBiJiaInfo_wxsmall&p_url=" + encodeURIComponent(shareUrl) + } + if (isSurge) { + $httpClient.post(options, function (error, response, data) { + if (!error) { + callback(JSON.parse(data)); + if (consoleLog) console.log("Data:\n" + data); + } else { + callback(null, null); + if (consoleLog) console.log("Error:\n" + error); + } + }) + } + if (isQuanX) { + options["method"] = "POST" + $task.fetch(options).then(response => { + callback(JSON.parse(response.body)); + if (consoleLog) console.log("Data:\n" + response.body); + }, reason => { + callback(null, null); + if (consoleLog) console.log("Error:\n" + reason.error); + }) + } +} + +function lowerMsgs(data) { + const lower = data.lowerPriceyh + const lowerDate = dateFormat(data.lowerDateyh) + const lowerMsg = "历史最低到手价: ¥" + String(lower) + " " + lowerDate + const curret_msg = (data.currentPriceStatus ? " 当前价格" + data.currentPriceStatus : "") + " (仅供参考)" + const lower1 = lowerMsg + curret_msg + const lower2 = "历史最低¥" + String(lower) + return [lower1, lower2] +} + +function historyItems(data) { + const rexMatch = /\[.*?\]/g; + const rexExec = /\[(.*),(.*),"(.*)"\]/; + const list = data.jiagequshiyh.match(rexMatch); + let tbitems = []; + let startDate = ""; + let endDate = ""; + list.reverse().forEach((item, index) => { + if (item.length > 0) { + const result = rexExec.exec(item); + const dateUTC = new Date(eval(result[1])); + const date = dateUTC.format("yyyy-MM-dd"); + if (index == 0) { + endDate = date; + } + if (index == list.length - 1) { + startDate = date; + } + let price = result[2]; + price = "¥" + String(parseFloat(price)); + const msg = date + getSpace(50 - date.length) + price; + tbitem = { + icon: "https://s2.ax1x.com/2020/01/03/lU2AYD.png", + title: msg + } + tbitems.push(tbitem); + } + }); + const dateMsg = `(${startDate} ~ ${endDate})`; + return [dateMsg, tbitems]; +} + +function dateFormat(cellval) { + const date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10)); + const month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; + const currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); + return date.getFullYear() + "-" + month + "-" + currentDate; +} + +function getSpace(length) { + let blank = ""; + for (let index = 0; index < length; index++) { + blank += " "; + } + return blank; +} + +function customItem() { + return { + icon: "https://s2.ax1x.com/2020/01/03/lU2Pw6.png", + title: "历史价格", + desc: "" + } +} + +function customTradeConsumerProtection() { + return { + "tradeConsumerService": { + "service": { + "items": [ + ], + "icon": "", + "title": "基础服务" + }, + "nonService": { + "items": [ + ], + "title": "其他" + } + }, + "passValue": "all", + "url": "https://h5.m.taobao.com/app/detailsubpage/consumer/index.js", + "type": "0" + } +} + +Array.prototype.insert = function (index, item) { + this.splice(index, 0, item); +}; + +Date.prototype.format = function (fmt) { + var o = { + "y+": this.getFullYear(), + "M+": this.getMonth() + 1, + "d+": this.getDate(), + "h+": this.getHours(), + "m+": this.getMinutes(), + "s+": this.getSeconds(), + "q+": Math.floor((this.getMonth() + 3) / 3), + "S+": this.getMilliseconds() + }; + for (var k in o) { + if (new RegExp("(" + k + ")").test(fmt)) { + if (k == "y+") { + fmt = fmt.replace(RegExp.$1, ("" + o[k]).substr(4 - RegExp.$1.length)); + } + else if (k == "S+") { + var lens = RegExp.$1.length; + lens = lens == 1 ? 3 : lens; + fmt = fmt.replace(RegExp.$1, ("00" + o[k]).substr(("" + o[k]).length - 1, lens)); + } + else { + fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + } + } + } + return fmt; +} diff --git a/tool.js b/tool.js new file mode 100644 index 000000000..4c9898034 --- /dev/null +++ b/tool.js @@ -0,0 +1,109 @@ +const $tool = tool() + +$tool.notify("title", "subtitle", "body") +$tool.setCache("value", "key") +$tool.getCache("key") + +$tool.get("http://www.baidu.com", function (error, response, data) { + console.log(error) + console.log(response)// response.status response.headers + console.log(data) +}) + +const request = { + url: "https://www.baidu.com", + body: "{}" + //... +} +$tool.post(request, function (error, response, data) { + console.log(error) + console.log(response)// response.status response.headers + console.log(data) +}) + +function tool() { + const isSurge = typeof $httpClient != "undefined" + const isQuanX = typeof $task != "undefined" + const notify = (title, subtitle, message) => { + if (isQuanX) $notify(title, subtitle, message) + if (isSurge) $notification.post(title, subtitle, message) + } + const setCache = (value, key) => { + if (isQuanX) return $prefs.setValueForKey(value, key) + if (isSurge) return $persistentStore.write(value, key) + } + const getCache = (key) => { + if (isQuanX) return $prefs.valueForKey(key) + if (isSurge) return $persistentStore.read(key) + } + const get = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "GET" + $task.fetch(options).then(response => { + response["status"] = response.statusCode + callback(null, response, response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) $httpClient.get(options, callback) + } + const post = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "POST" + $task.fetch(options).then(response => { + response["status"] = response.statusCode + callback(null, response, response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) $httpClient.post(options, callback) + } + return { isQuanX, isSurge, notify, setCache, getCache, get, post } +} + +/*function tool() { + const isSurge = typeof $httpClient != "undefined" + const isQuanX = typeof $task != "undefined" + const notify = (() => { + const post = (title, subtitle, message) => { + if (isQuanX) $notify(title, subtitle, message) + if (isSurge) $notification.post(title, subtitle, message) + } + return { post } + })() + const cache = (() => { + const set = (value, key) => { + if (isQuanX) return $prefs.setValueForKey(value, key) + if (isSurge) return $persistentStore.write(value, key) + } + const get = (key) => { + if (isQuanX) return $prefs.valueForKey(key) + if (isSurge) return $persistentStore.read(key) + } + return { set, get } + })() + const request = (() => { + const get = (options, callback) => { + if (typeof options == "string") options = { url: options } + options["method"] = "GET" + $task.fetch(options).then(response => { + response["status"] = response.statusCode + callback(null, response, response.body) + }, reason => callback(reason.error, null, null)) + if (isSurge) $httpClient.get(options, callback) + } + const post = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "POST" + $task.fetch(options).then(response => { + response["status"] = response.statusCode + callback(null, response, response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) $httpClient.post(options, callback) + } + return { get, post } + })() + return { isQuanX, isSurge, notify, cache, request } +}*/ diff --git a/wb_ad.js b/wb_ad.js new file mode 100644 index 000000000..a510c655e --- /dev/null +++ b/wb_ad.js @@ -0,0 +1,183 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; + +const url = $request.url; +var body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} + +if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} + +if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} + +if (url.indexOf(path5) != -1 || + url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} + +if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} + +if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} + +if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} + +if (url.indexOf(path11) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} + +if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if (is_timeline_likerecommend(element.title)) statuses.splice(i, 1); + if (is_timeline_ad(element)) statuses.splice(i, 1); + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + let type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); + } else if (card_type && card_type == 118) { + card_group.splice(i, 1); + } else if (card_type && card_type == 42) { + if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { + cards.splice(j, 1); + break; + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return (promotiontype || mblogtype) ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} diff --git a/wb_launch.js b/wb_launch.js new file mode 100644 index 000000000..6e2a613dd --- /dev/null +++ b/wb_launch.js @@ -0,0 +1,27 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/interface/sdk/sdkad.php"; +const path2 = "/wbapplua/wbpullad.lua"; + +const url = $request.url; +var body = $response.body; + +if (url.indexOf(path1) != -1) { + let re = /\{.*\}/; + body = body.match(re); + var obj = JSON.parse(body); + if (obj.background_delay_display_time) obj.background_delay_display_time = 60*60*24*365; + if (obj.show_push_splash_ad) obj.show_push_splash_ad = false; + if (obj.ads) obj.ads = []; + body = JSON.stringify(obj) + 'OK'; +} + +if (url.indexOf(path2) != -1) { + var obj = JSON.parse(body); + if (obj.cached_ad && obj.cached_ad.ads) obj.cached_ad.ads = []; + body = JSON.stringify(obj); +} + +$done({body}); From c8adf8027f4dc5c7aec8b89bbf101b3f00a8ee44 Mon Sep 17 00:00:00 2001 From: goose <12595948+yichahucha@users.noreply.github.com> Date: Tue, 7 Jan 2020 14:46:57 +0800 Subject: [PATCH 0004/1191] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3e77acf60..9ba18f288 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,8 @@ taobao (beta) # 这两条规则可以最大程度缩小匹配的 IP 范围,减少干扰其他应用,不一定适用所有人,可以自己抓包调节 IP-CIDR, 203.119.144.0/23, REJECT, no-resolve IP-CIDR, 203.119.175.0/24, REJECT, no-resolve -# 目前这条规则匹配的是部分阿里云 IP 段,其他使用这些阿里云 IP 的应用可能会有问题,谨慎使用 -# IP-CIDR, 203.119.128.0/18, REJECT, no-resolve +# 新增一条规则,不能用的把这条也加上试试 +IP-CIDR, 106.11.162.0/24, REJECT, no-resolve [Script] http-response ^https://trade-acs.m.taobao.com/gw/mtop.taobao.detail.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] @@ -85,8 +85,8 @@ taobao (beta) # 这两条规则可以最大程度缩小匹配的 IP 范围,减少干扰其他应用,不一定适用所有人,可以自己抓包调节 ip-cidr, 203.119.144.0/23, reject, no-resolve ip-cidr, 203.119.175.0/24, reject, no-resolve -# 目前这条规则匹配的是部分阿里云 IP 段,其他使用这些阿里云 IP 的应用可能会有问题,谨慎使用 -# ip-cidr, 203.119.128.0/18, reject, no-resolve +# 新增一条规则,不能用的把这条也加上试试 +ip-cidr, 106.11.162.0/24, reject, no-resolve [rewrite_local] ^https://trade-acs.m.taobao.com/gw/mtop.taobao.detail.getdetail url script-response-body tb_price.js [mitm] From 2b6f10420eea598616527e815ec89a98fe49263d Mon Sep 17 00:00:00 2001 From: goose Date: Tue, 7 Jan 2020 21:03:08 +0800 Subject: [PATCH 0005/1191] tb done --- README.md | 22 ++---- tb_price.js | 192 +++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 173 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 9ba18f288..583c0cd15 100644 --- a/README.md +++ b/README.md @@ -30,17 +30,10 @@ hostname = api.m.jd.com taobao (beta) ``` -[Rule] -# 注意优先级(建议放在第一条) -# 这两条规则可以最大程度缩小匹配的 IP 范围,减少干扰其他应用,不一定适用所有人,可以自己抓包调节 -IP-CIDR, 203.119.144.0/23, REJECT, no-resolve -IP-CIDR, 203.119.175.0/24, REJECT, no-resolve -# 新增一条规则,不能用的把这条也加上试试 -IP-CIDR, 106.11.162.0/24, REJECT, no-resolve [Script] -http-response ^https://trade-acs.m.taobao.com/gw/mtop.taobao.detail.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-response https?:\/\/(trade-acs\.m\.taobao\.com|.+)(\/amdc\/mobileDispatch|\/gw\/mtop\.taobao\.detail\.getdetail) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] -hostname = trade-acs.m.taobao.com +hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` Daily work check-in reminder @@ -80,15 +73,8 @@ hostname = api.m.jd.com ``` taobao (beta) ``` -[filter_local] -# 注意优先级(建议放在第一条) -# 这两条规则可以最大程度缩小匹配的 IP 范围,减少干扰其他应用,不一定适用所有人,可以自己抓包调节 -ip-cidr, 203.119.144.0/23, reject, no-resolve -ip-cidr, 203.119.175.0/24, reject, no-resolve -# 新增一条规则,不能用的把这条也加上试试 -ip-cidr, 106.11.162.0/24, reject, no-resolve [rewrite_local] -^https://trade-acs.m.taobao.com/gw/mtop.taobao.detail.getdetail url script-response-body tb_price.js +https?:\/\/(trade-acs\.m\.taobao\.com|.+)(\/amdc\/mobileDispatch|\/gw\/mtop\.taobao\.detail\.getdetail) url script-response-body tb_price.js [mitm] -hostname = trade-acs.m.taobao.com +hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` diff --git a/tb_price.js b/tb_price.js index 92f5cc091..97f551c10 100644 --- a/tb_price.js +++ b/tb_price.js @@ -2,13 +2,32 @@ README:https://github.com/yichahucha/surge/tree/master */ +const $tool = tool() +const $base64 = new Base64() const consoleLog = false const url = $request.url const body = $response.body -const isSurge = typeof $httpClient != "undefined" -const isQuanX = typeof $task != "undefined" +const path1 = "/amdc/mobileDispatch" +const path2 = "/gw/mtop.taobao.detail.getdetail" -if (true) { +if (url.indexOf(path1) != -1) { + let obj = JSON.parse($base64.decode(body)) + let dns = obj.dns + if (dns && dns.length > 0) { + let i = dns.length; + while (i--) { + const element = dns[i]; + let host = "trade-acs.m.taobao.com" + if (element.host == host) { + dns.splice(i, 1); + } + } + } + $done({ body: $base64.encode(JSON.stringify(obj)) }) +} + +if (url.indexOf(path2) != -1) { + const body = $response.body let obj = JSON.parse(body) let apiStack = obj.data.apiStack[0] let value = JSON.parse(apiStack.value) @@ -62,27 +81,15 @@ function requestPrice(shareUrl, callback) { }, body: "methodName=getBiJiaInfo_wxsmall&p_url=" + encodeURIComponent(shareUrl) } - if (isSurge) { - $httpClient.post(options, function (error, response, data) { - if (!error) { - callback(JSON.parse(data)); - if (consoleLog) console.log("Data:\n" + data); - } else { - callback(null, null); - if (consoleLog) console.log("Error:\n" + error); - } - }) - } - if (isQuanX) { - options["method"] = "POST" - $task.fetch(options).then(response => { - callback(JSON.parse(response.body)); - if (consoleLog) console.log("Data:\n" + response.body); - }, reason => { + $tool.post(options, function (error, response, data) { + if (!error) { + callback(JSON.parse(data)); + if (consoleLog) console.log("Data:\n" + data); + } else { callback(null, null); - if (consoleLog) console.log("Error:\n" + reason.error); - }) - } + if (consoleLog) console.log("Error:\n" + error); + } + }) } function lowerMsgs(data) { @@ -203,3 +210,142 @@ Date.prototype.format = function (fmt) { } return fmt; } + +function tool() { + const isSurge = typeof $httpClient != "undefined" + const isQuanX = typeof $task != "undefined" + const notify = (title, subtitle, message) => { + if (isQuanX) $notify(title, subtitle, message) + if (isSurge) $notification.post(title, subtitle, message) + } + const setCache = (value, key) => { + if (isQuanX) return $prefs.setValueForKey(value, key) + if (isSurge) return $persistentStore.write(value, key) + } + const getCache = (key) => { + if (isQuanX) return $prefs.valueForKey(key) + if (isSurge) return $persistentStore.read(key) + } + const get = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "GET" + $task.fetch(options).then(response => { + response["status"] = response.statusCode + callback(null, response, response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) $httpClient.get(options, callback) + } + const post = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "POST" + $task.fetch(options).then(response => { + response["status"] = response.statusCode + callback(null, response, response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) $httpClient.post(options, callback) + } + return { isQuanX, isSurge, notify, setCache, getCache, get, post } +} + +function Base64() { + // private property + _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + // public method for encoding + this.encode = function (input) { + var output = ""; + var chr1, chr2, chr3, enc1, enc2, enc3, enc4; + var i = 0; + input = _utf8_encode(input); + while (i < input.length) { + chr1 = input.charCodeAt(i++); + chr2 = input.charCodeAt(i++); + chr3 = input.charCodeAt(i++); + enc1 = chr1 >> 2; + enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); + enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); + enc4 = chr3 & 63; + if (isNaN(chr2)) { + enc3 = enc4 = 64; + } else if (isNaN(chr3)) { + enc4 = 64; + } + output = output + + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + + _keyStr.charAt(enc3) + _keyStr.charAt(enc4); + } + return output; + } + // public method for decoding + this.decode = function (input) { + var output = ""; + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0; + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); + while (i < input.length) { + enc1 = _keyStr.indexOf(input.charAt(i++)); + enc2 = _keyStr.indexOf(input.charAt(i++)); + enc3 = _keyStr.indexOf(input.charAt(i++)); + enc4 = _keyStr.indexOf(input.charAt(i++)); + chr1 = (enc1 << 2) | (enc2 >> 4); + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); + chr3 = ((enc3 & 3) << 6) | enc4; + output = output + String.fromCharCode(chr1); + if (enc3 != 64) { + output = output + String.fromCharCode(chr2); + } + if (enc4 != 64) { + output = output + String.fromCharCode(chr3); + } + } + output = _utf8_decode(output); + return output; + } + // private method for UTF-8 encoding + _utf8_encode = function (string) { + string = string.replace(/\r\n/g, "\n"); + var utftext = ""; + for (var n = 0; n < string.length; n++) { + var c = string.charCodeAt(n); + if (c < 128) { + utftext += String.fromCharCode(c); + } else if ((c > 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + + } + return utftext; + } + // private method for UTF-8 decoding + _utf8_decode = function (utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + while (i < utftext.length) { + c = utftext.charCodeAt(i); + if (c < 128) { + string += String.fromCharCode(c); + i++; + } else if ((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i + 1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } else { + c2 = utftext.charCodeAt(i + 1); + c3 = utftext.charCodeAt(i + 2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + } + return string; + } +} \ No newline at end of file From 4c0223158f7f41e76734036cc54efe28fa535170 Mon Sep 17 00:00:00 2001 From: goose Date: Tue, 7 Jan 2020 21:04:03 +0800 Subject: [PATCH 0006/1191] fix --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 583c0cd15..b137d48dd 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ taobao (beta) [Script] http-response https?:\/\/(trade-acs\.m\.taobao\.com|.+)(\/amdc\/mobileDispatch|\/gw\/mtop\.taobao\.detail\.getdetail) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] -hostname = trade-acs.m.taobao.com,amdc.m.taobao.com +hostname = trade-acs.m.taobao.com, amdc.m.taobao.com ``` Daily work check-in reminder @@ -76,5 +76,5 @@ taobao (beta) [rewrite_local] https?:\/\/(trade-acs\.m\.taobao\.com|.+)(\/amdc\/mobileDispatch|\/gw\/mtop\.taobao\.detail\.getdetail) url script-response-body tb_price.js [mitm] -hostname = trade-acs.m.taobao.com,amdc.m.taobao.com +hostname = trade-acs.m.taobao.com, amdc.m.taobao.com ``` From ba5543b7299c8ffac0e948aae5f739c17b7c9688 Mon Sep 17 00:00:00 2001 From: goose Date: Tue, 7 Jan 2020 22:18:18 +0800 Subject: [PATCH 0007/1191] fix --- README.md | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b137d48dd..9ba18f288 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,17 @@ hostname = api.m.jd.com taobao (beta) ``` +[Rule] +# 注意优先级(建议放在第一条) +# 这两条规则可以最大程度缩小匹配的 IP 范围,减少干扰其他应用,不一定适用所有人,可以自己抓包调节 +IP-CIDR, 203.119.144.0/23, REJECT, no-resolve +IP-CIDR, 203.119.175.0/24, REJECT, no-resolve +# 新增一条规则,不能用的把这条也加上试试 +IP-CIDR, 106.11.162.0/24, REJECT, no-resolve [Script] -http-response https?:\/\/(trade-acs\.m\.taobao\.com|.+)(\/amdc\/mobileDispatch|\/gw\/mtop\.taobao\.detail\.getdetail) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-response ^https://trade-acs.m.taobao.com/gw/mtop.taobao.detail.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] -hostname = trade-acs.m.taobao.com, amdc.m.taobao.com +hostname = trade-acs.m.taobao.com ``` Daily work check-in reminder @@ -73,8 +80,15 @@ hostname = api.m.jd.com ``` taobao (beta) ``` +[filter_local] +# 注意优先级(建议放在第一条) +# 这两条规则可以最大程度缩小匹配的 IP 范围,减少干扰其他应用,不一定适用所有人,可以自己抓包调节 +ip-cidr, 203.119.144.0/23, reject, no-resolve +ip-cidr, 203.119.175.0/24, reject, no-resolve +# 新增一条规则,不能用的把这条也加上试试 +ip-cidr, 106.11.162.0/24, reject, no-resolve [rewrite_local] -https?:\/\/(trade-acs\.m\.taobao\.com|.+)(\/amdc\/mobileDispatch|\/gw\/mtop\.taobao\.detail\.getdetail) url script-response-body tb_price.js +^https://trade-acs.m.taobao.com/gw/mtop.taobao.detail.getdetail url script-response-body tb_price.js [mitm] -hostname = trade-acs.m.taobao.com, amdc.m.taobao.com +hostname = trade-acs.m.taobao.com ``` From 5432000e25c2b0e23ba8c4f8e8efd496bdc56250 Mon Sep 17 00:00:00 2001 From: goose <12595948+yichahucha@users.noreply.github.com> Date: Wed, 8 Jan 2020 14:40:34 +0800 Subject: [PATCH 0008/1191] Update README.md --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9ba18f288..747dba862 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,14 @@ taobao (beta) ``` [Rule] # 注意优先级(建议放在第一条) -# 这两条规则可以最大程度缩小匹配的 IP 范围,减少干扰其他应用,不一定适用所有人,可以自己抓包调节 +# 使用规则屏蔽 IP,有可能误伤其他功能或者应用,可以自己抓包缩小 IP 范围 IP-CIDR, 203.119.144.0/23, REJECT, no-resolve IP-CIDR, 203.119.175.0/24, REJECT, no-resolve -# 新增一条规则,不能用的把这条也加上试试 IP-CIDR, 106.11.162.0/24, REJECT, no-resolve +IP-CIDR, 47.102.83.0/24, REJECT, no-resolve [Script] +# 使用脚本屏蔽 IP,不生效的需卸载重装,使用脚本就不需要写规则了,不保证稳定(beta) +http-response ^https?://amdc.m.taobao.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https://trade-acs.m.taobao.com/gw/mtop.taobao.detail.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] hostname = trade-acs.m.taobao.com @@ -82,12 +84,14 @@ taobao (beta) ``` [filter_local] # 注意优先级(建议放在第一条) -# 这两条规则可以最大程度缩小匹配的 IP 范围,减少干扰其他应用,不一定适用所有人,可以自己抓包调节 +# 使用规则屏蔽 IP,有可能误伤其他功能或者应用,可以自己抓包缩小 IP 范围 ip-cidr, 203.119.144.0/23, reject, no-resolve ip-cidr, 203.119.175.0/24, reject, no-resolve -# 新增一条规则,不能用的把这条也加上试试 ip-cidr, 106.11.162.0/24, reject, no-resolve +ip-cidr, 47.102.83.0/24, reject, no-resolve [rewrite_local] +# 使用脚本屏蔽 IP,不生效的需卸载重装,使用脚本就不需要写规则了,不保证稳定(beta) +^https?://amdc.m.taobao.com/amdc/mobileDispatch url script-response-body tb_price.js ^https://trade-acs.m.taobao.com/gw/mtop.taobao.detail.getdetail url script-response-body tb_price.js [mitm] hostname = trade-acs.m.taobao.com From cfd36489d750b611c864f2f9a5a63a7295e811c1 Mon Sep 17 00:00:00 2001 From: goose <12595948+yichahucha@users.noreply.github.com> Date: Wed, 8 Jan 2020 14:41:42 +0800 Subject: [PATCH 0009/1191] Update tb_price.js --- tb_price.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tb_price.js b/tb_price.js index 97f551c10..a6a354f0f 100644 --- a/tb_price.js +++ b/tb_price.js @@ -19,7 +19,8 @@ if (url.indexOf(path1) != -1) { const element = dns[i]; let host = "trade-acs.m.taobao.com" if (element.host == host) { - dns.splice(i, 1); + element.ips = [] + if (consoleLog) console.log(JSON.stringify(element)) } } } @@ -348,4 +349,4 @@ function Base64() { } return string; } -} \ No newline at end of file +} From 4241d5b78204ba9f694791771c03c3b464aadf7c Mon Sep 17 00:00:00 2001 From: goose <12595948+yichahucha@users.noreply.github.com> Date: Wed, 8 Jan 2020 14:44:16 +0800 Subject: [PATCH 0010/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 747dba862..2c10726df 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ IP-CIDR, 47.102.83.0/24, REJECT, no-resolve http-response ^https?://amdc.m.taobao.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https://trade-acs.m.taobao.com/gw/mtop.taobao.detail.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] -hostname = trade-acs.m.taobao.com +hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` Daily work check-in reminder @@ -94,5 +94,5 @@ ip-cidr, 47.102.83.0/24, reject, no-resolve ^https?://amdc.m.taobao.com/amdc/mobileDispatch url script-response-body tb_price.js ^https://trade-acs.m.taobao.com/gw/mtop.taobao.detail.getdetail url script-response-body tb_price.js [mitm] -hostname = trade-acs.m.taobao.com +hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` From f52d3aca3a3cb26e87e094fc4cac5b2de72b9f2e Mon Sep 17 00:00:00 2001 From: goose <12595948+yichahucha@users.noreply.github.com> Date: Wed, 8 Jan 2020 16:02:12 +0800 Subject: [PATCH 0011/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2c10726df..bbf7de8c5 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ IP-CIDR, 203.119.175.0/24, REJECT, no-resolve IP-CIDR, 106.11.162.0/24, REJECT, no-resolve IP-CIDR, 47.102.83.0/24, REJECT, no-resolve [Script] -# 使用脚本屏蔽 IP,不生效的需卸载重装,使用脚本就不需要写规则了,不保证稳定(beta) +# 使用脚本屏蔽 IP,不生效的需卸载重装,使用脚本就不需要写规则了(beta) http-response ^https?://amdc.m.taobao.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https://trade-acs.m.taobao.com/gw/mtop.taobao.detail.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] @@ -90,7 +90,7 @@ ip-cidr, 203.119.175.0/24, reject, no-resolve ip-cidr, 106.11.162.0/24, reject, no-resolve ip-cidr, 47.102.83.0/24, reject, no-resolve [rewrite_local] -# 使用脚本屏蔽 IP,不生效的需卸载重装,使用脚本就不需要写规则了,不保证稳定(beta) +# 使用脚本屏蔽 IP,不生效的需卸载重装,使用脚本就不需要写规则了(beta) ^https?://amdc.m.taobao.com/amdc/mobileDispatch url script-response-body tb_price.js ^https://trade-acs.m.taobao.com/gw/mtop.taobao.detail.getdetail url script-response-body tb_price.js [mitm] From 7e9c83343cdaa10b5460ce86056dcfb6b62c6955 Mon Sep 17 00:00:00 2001 From: goose <12595948+yichahucha@users.noreply.github.com> Date: Wed, 8 Jan 2020 16:24:20 +0800 Subject: [PATCH 0012/1191] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bbf7de8c5..4e6f1d123 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ IP-CIDR, 106.11.162.0/24, REJECT, no-resolve IP-CIDR, 47.102.83.0/24, REJECT, no-resolve [Script] # 使用脚本屏蔽 IP,不生效的需卸载重装,使用脚本就不需要写规则了(beta) -http-response ^https?://amdc.m.taobao.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -http-response ^https://trade-acs.m.taobao.com/gw/mtop.taobao.detail.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-response ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-response ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` @@ -91,8 +91,8 @@ ip-cidr, 106.11.162.0/24, reject, no-resolve ip-cidr, 47.102.83.0/24, reject, no-resolve [rewrite_local] # 使用脚本屏蔽 IP,不生效的需卸载重装,使用脚本就不需要写规则了(beta) -^https?://amdc.m.taobao.com/amdc/mobileDispatch url script-response-body tb_price.js -^https://trade-acs.m.taobao.com/gw/mtop.taobao.detail.getdetail url script-response-body tb_price.js +^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body tb_price.js +^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js [mitm] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` From 6afce27a3440af7fd5345bc5b8bf9652302851c3 Mon Sep 17 00:00:00 2001 From: goose <12595948+yichahucha@users.noreply.github.com> Date: Wed, 8 Jan 2020 18:12:33 +0800 Subject: [PATCH 0013/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4e6f1d123..0ca68fc24 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ IP-CIDR, 203.119.175.0/24, REJECT, no-resolve IP-CIDR, 106.11.162.0/24, REJECT, no-resolve IP-CIDR, 47.102.83.0/24, REJECT, no-resolve [Script] -# 使用脚本屏蔽 IP,不生效的需卸载重装,使用脚本就不需要写规则了(beta) +# 使用脚本屏蔽 IP,不生效的需卸载tb重装,使用这个脚本就不需要写规则了(beta) http-response ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] @@ -90,7 +90,7 @@ ip-cidr, 203.119.175.0/24, reject, no-resolve ip-cidr, 106.11.162.0/24, reject, no-resolve ip-cidr, 47.102.83.0/24, reject, no-resolve [rewrite_local] -# 使用脚本屏蔽 IP,不生效的需卸载重装,使用脚本就不需要写规则了(beta) +# 使用脚本屏蔽 IP,不生效的需卸载tb重装,使用这个脚本就不需要写规则了(beta) ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body tb_price.js ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js [mitm] From a85e4420aef7f80ffe8588d2f6e7c327d2847619 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 9 Jan 2020 12:16:15 +0800 Subject: [PATCH 0014/1191] optimize --- jd_price.js | 106 ++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 82 insertions(+), 24 deletions(-) diff --git a/jd_price.js b/jd_price.js index cc0056976..8b8d5684d 100644 --- a/jd_price.js +++ b/jd_price.js @@ -7,8 +7,7 @@ const path2 = "wareBusiness"; const console_log = false; const url = $request.url; const body = $response.body; -const isSurge = typeof $httpClient != "undefined" -const isQuanX = typeof $task != "undefined" +const $tool = tool(); if (url.indexOf(path1) != -1) { let obj = JSON.parse(body); @@ -16,7 +15,7 @@ if (url.indexOf(path1) != -1) { delete obj.serverConfig.dnsvip; delete obj.serverConfig.dnsvip_v6; $done({ body: JSON.stringify(obj) }); - if (console_log) $notify("JD", "", "httpdns closed"); + if (console_log) $tool.notify("JD", "", "httpdns closed"); } if (url.indexOf(path2) != -1) { @@ -115,27 +114,15 @@ function request_history_price(share_url, callback) { }, body: "methodName=getBiJiaInfo_wxsmall&p_url=" + encodeURIComponent(share_url) } - if (isSurge) { - $httpClient.post(options, function (error, response, data) { - if (!error) { - callback(JSON.parse(data)); - if (console_log) console.log("Data:\n" + data); - } else { - callback(null, null); - if (console_log) console.log("Error:\n" + error); - } - }) - } - if (isQuanX) { - options["method"] = "POST" - $task.fetch(options).then(response => { - callback(JSON.parse(response.body)); - if (console_log) console.log("Data:\n" + response.body); - }, reason => { + $tool.post(options, function (error, response, data) { + if (!error) { + callback(JSON.parse(data)); + if (console_log) console.log("Data:\n" + data); + } else { callback(null, null); - if (console_log) console.log("Error:\n" + reason.error); - }) - } + if (console_log) console.log("Error:\n" + error); + } + }) } function changeDateFormat(cellval) { @@ -178,6 +165,77 @@ function adword_obj() { } } +function tool() { + const isSurge = typeof $httpClient != "undefined" + const isQuanX = typeof $task != "undefined" + const node = (() => { + if (typeof require == "function") { + const request = require('request') + return ({ request }) + } else { + return (null) + } + })() + const notify = (title, subtitle, message) => { + if (isQuanX) $notify(title, subtitle, message) + if (isSurge) $notification.post(title, subtitle, message) + if (node) console.log(JSON.stringify({ title, subtitle, message })); + } + const setCache = (value, key) => { + if (isQuanX) return $prefs.setValueForKey(value, key) + if (isSurge) return $persistentStore.write(value, key) + } + const getCache = (key) => { + if (isQuanX) return $prefs.valueForKey(key) + if (isSurge) return $persistentStore.read(key) + } + const adapterStatus = (response) => { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } + return response + } + const get = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "GET" + $task.fetch(options).then(response => { + callback(null, adapterStatus(response), response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) $httpClient.get(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + if (node) { + node.request(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + } + const post = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "POST" + $task.fetch(options).then(response => { + callback(null, adapterStatus(response), response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) { + $httpClient.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + if (node) { + node.request.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + } + return { isQuanX, isSurge, notify, setCache, getCache, get, post } +} + Array.prototype.insert = function (index, item) { this.splice(index, 0, item); }; @@ -209,4 +267,4 @@ Date.prototype.format = function (fmt) { } } return fmt; -} +} \ No newline at end of file From 95b12785e07e482c85a66c0f20b42a1908af835b Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 9 Jan 2020 12:18:18 +0800 Subject: [PATCH 0015/1191] optimize --- nf_rating.js | 116 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 74 insertions(+), 42 deletions(-) diff --git a/nf_rating.js b/nf_rating.js index ffe9341cf..077a29ea9 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -2,46 +2,7 @@ README:https://github.com/yichahucha/surge/tree/master */ -const $tool = (() => { - const isSurge = typeof $httpClient != "undefined" - const isQuanX = typeof $task != "undefined" - const notify = (title, subtitle, message) => { - if (isQuanX) $notify(title, subtitle, message) - if (isSurge) $notification.post(title, subtitle, message) - } - const setCache = (value, key) => { - if (isQuanX) return $prefs.setValueForKey(value, key) - if (isSurge) return $persistentStore.write(value, key) - } - const getCache = (key) => { - if (isQuanX) return $prefs.valueForKey(key) - if (isSurge) return $persistentStore.read(key) - } - const GET = (options, callback) => { - if (isQuanX) { - if (typeof options == "string") options = { url: options } - options["method"] = "GET" - $task.fetch(options).then(response => { - response["status"] = response.statusCode - callback(null, response, response.body) - }, reason => callback(reason.error, null, null)) - } - if (isSurge) $httpClient.get(options, callback) - } - const POST = (options, callback) => { - if (isQuanX) { - if (typeof options == "string") options = { url: options } - options["method"] = "POST" - $task.fetch(options).then(response => { - response["status"] = response.statusCode - callback(null, response, response.body) - }, reason => callback(reason.error, null, null)) - } - if (isSurge) $httpClient.post(options, callback) - } - return { isQuanX, isSurge, notify, setCache, getCache, GET, POST } -})(); - +const $tool = tool() const consoleLog = false; const imdbApikeyCacheKey = "IMDbApikey"; const netflixTitleCacheKey = "NetflixTitle"; @@ -119,7 +80,7 @@ function requestDoubanRating(imdbId) { return new Promise(function (resolve, reject) { const url = "https://api.douban.com/v2/movie/imdb/" + imdbId + "?apikey=0df993c66c0c636e29ecbb5344252a4a"; if (consoleLog) console.log("Netflix Douban Rating URL:\n" + url); - $tool.GET(url, function (error, response, data) { + $tool.get(url, function (error, response, data) { if (!error) { if (consoleLog) console.log("Netflix Douban Rating response:\n" + JSON.stringify(response)); if (consoleLog) console.log("Netflix Douban Rating Data:\n" + data); @@ -144,7 +105,7 @@ function requestIMDbRating(title, year, type) { if (year) url += "&y=" + year; if (type) url += "&type=" + type; if (consoleLog) console.log("Netflix IMDb Rating URL:\n" + url); - $tool.GET(url, function (error, response, data) { + $tool.get(url, function (error, response, data) { if (!error) { if (consoleLog) console.log("Netflix IMDb Rating response:\n" + JSON.stringify(response)); if (consoleLog) console.log("Netflix IMDb Rating Data:\n" + data); @@ -523,3 +484,74 @@ function countryEmoji(name) { } return emojiMap[name] ? emojiMap[name] : emojiMap["Chequered"]; } + +function tool() { + const isSurge = typeof $httpClient != "undefined" + const isQuanX = typeof $task != "undefined" + const node = (() => { + if (typeof require == "function") { + const request = require('request') + return ({ request }) + } else { + return (null) + } + })() + const notify = (title, subtitle, message) => { + if (isQuanX) $notify(title, subtitle, message) + if (isSurge) $notification.post(title, subtitle, message) + if (node) console.log(JSON.stringify({ title, subtitle, message })); + } + const setCache = (value, key) => { + if (isQuanX) return $prefs.setValueForKey(value, key) + if (isSurge) return $persistentStore.write(value, key) + } + const getCache = (key) => { + if (isQuanX) return $prefs.valueForKey(key) + if (isSurge) return $persistentStore.read(key) + } + const adapterStatus = (response) => { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } + return response + } + const get = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "GET" + $task.fetch(options).then(response => { + callback(null, adapterStatus(response), response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) $httpClient.get(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + if (node) { + node.request(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + } + const post = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "POST" + $task.fetch(options).then(response => { + callback(null, adapterStatus(response), response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) { + $httpClient.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + if (node) { + node.request.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + } + return { isQuanX, isSurge, notify, setCache, getCache, get, post } +} \ No newline at end of file From 238cc71633ccd6e094b4e38faa700cf2cacc6bc3 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 9 Jan 2020 12:19:19 +0800 Subject: [PATCH 0016/1191] optimize --- tool.js | 132 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 65 insertions(+), 67 deletions(-) diff --git a/tool.js b/tool.js index 4c9898034..842146ed5 100644 --- a/tool.js +++ b/tool.js @@ -1,32 +1,55 @@ -const $tool = tool() +// 统一 Surge、QuanX、Node 相关脚本 API, 方便开发、调试 +// 包括 Node(request 模块)、Surge($httpClient,$notification,$persistentStore 模块)、QuanX($task,$notify,$prefs 模块) -$tool.notify("title", "subtitle", "body") +const $tool = tool() +// notify +$tool.notify("title", "subtitle", "message") +// cache $tool.setCache("value", "key") $tool.getCache("key") - -$tool.get("http://www.baidu.com", function (error, response, data) { - console.log(error) - console.log(response)// response.status response.headers - console.log(data) +// get +$tool.get("http://www.baidu.com", function (error, response, body) { + // response.status response.statusCode response.headers + if (!error) { + if (response.statusCode == 200) { + console.log(body) + } + } else { + console.log(error) + } }) - +// post const request = { url: "https://www.baidu.com", - body: "{}" + body: "" //... } -$tool.post(request, function (error, response, data) { - console.log(error) - console.log(response)// response.status response.headers - console.log(data) +$tool.post(request, function (error, response, body) { + // response.status response.statusCode response.headers + if (!error) { + if (response.statusCode == 200) { + console.log(body) + } + } else { + console.log(error) + } }) function tool() { const isSurge = typeof $httpClient != "undefined" const isQuanX = typeof $task != "undefined" + const node = (() => { + if (typeof require == "function") { + const request = require('request') + return ({ request }) + } else { + return (null) + } + })() const notify = (title, subtitle, message) => { if (isQuanX) $notify(title, subtitle, message) if (isSurge) $notification.post(title, subtitle, message) + if (node) console.log(JSON.stringify({ title, subtitle, message })); } const setCache = (value, key) => { if (isQuanX) return $prefs.setValueForKey(value, key) @@ -36,74 +59,49 @@ function tool() { if (isQuanX) return $prefs.valueForKey(key) if (isSurge) return $persistentStore.read(key) } + const adapterStatus = (response) => { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } + return response + } const get = (options, callback) => { if (isQuanX) { if (typeof options == "string") options = { url: options } options["method"] = "GET" $task.fetch(options).then(response => { - response["status"] = response.statusCode - callback(null, response, response.body) + callback(null, adapterStatus(response), response.body) }, reason => callback(reason.error, null, null)) } - if (isSurge) $httpClient.get(options, callback) + if (isSurge) $httpClient.get(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + if (node) { + node.request(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } } const post = (options, callback) => { if (isQuanX) { if (typeof options == "string") options = { url: options } options["method"] = "POST" $task.fetch(options).then(response => { - response["status"] = response.statusCode - callback(null, response, response.body) + callback(null, adapterStatus(response), response.body) }, reason => callback(reason.error, null, null)) } - if (isSurge) $httpClient.post(options, callback) - } - return { isQuanX, isSurge, notify, setCache, getCache, get, post } -} - -/*function tool() { - const isSurge = typeof $httpClient != "undefined" - const isQuanX = typeof $task != "undefined" - const notify = (() => { - const post = (title, subtitle, message) => { - if (isQuanX) $notify(title, subtitle, message) - if (isSurge) $notification.post(title, subtitle, message) - } - return { post } - })() - const cache = (() => { - const set = (value, key) => { - if (isQuanX) return $prefs.setValueForKey(value, key) - if (isSurge) return $persistentStore.write(value, key) + if (isSurge) { + $httpClient.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) } - const get = (key) => { - if (isQuanX) return $prefs.valueForKey(key) - if (isSurge) return $persistentStore.read(key) + if (node) { + node.request.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) } - return { set, get } - })() - const request = (() => { - const get = (options, callback) => { - if (typeof options == "string") options = { url: options } - options["method"] = "GET" - $task.fetch(options).then(response => { - response["status"] = response.statusCode - callback(null, response, response.body) - }, reason => callback(reason.error, null, null)) - if (isSurge) $httpClient.get(options, callback) - } - const post = (options, callback) => { - if (isQuanX) { - if (typeof options == "string") options = { url: options } - options["method"] = "POST" - $task.fetch(options).then(response => { - response["status"] = response.statusCode - callback(null, response, response.body) - }, reason => callback(reason.error, null, null)) - } - if (isSurge) $httpClient.post(options, callback) - } - return { get, post } - })() - return { isQuanX, isSurge, notify, cache, request } -}*/ + } + return { isQuanX, isSurge, notify, setCache, getCache, get, post } +} \ No newline at end of file From f37cbacb8d5925cad5447e388674c18d7ed84a8e Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 9 Jan 2020 16:00:48 +0800 Subject: [PATCH 0017/1191] nf adpots to qx --- README.md | 2 +- nf_rating.js | 5 +++-- tool.js | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0ca68fc24..cc6977d0d 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com Display Netflix TV series and movie's IMDb ratings, Douban ratings, rotten tomato and country/region ``` [rewrite_local] -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url request-header languages=(.+?)&(.+)&path=%5B%22videos%22%2C%(\d+)%22%2C%22summary%22%5D request-header languages=en-US&$2&path=%5B%22videos%22%2C%$3%22%2C%22summary%22%5D&path=%5B%22videos%22%2C%$3%22%2C%22details%22%5D +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header nf_rating.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body nf_rating.js [mitm] hostname = ios.prod.ftl.netflix.com diff --git a/nf_rating.js b/nf_rating.js index 077a29ea9..f0da1c179 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -7,7 +7,7 @@ const consoleLog = false; const imdbApikeyCacheKey = "IMDbApikey"; const netflixTitleCacheKey = "NetflixTitle"; -if ($request.headers && $tool.isSurge) { +if (!$tool.isResponse) { let url = $request.url; const urlDecode = decodeURIComponent(url); const videos = urlDecode.match(/"videos","(\d+)"/); @@ -486,6 +486,7 @@ function countryEmoji(name) { } function tool() { + const isResponse = typeof $response != "undefined" const isSurge = typeof $httpClient != "undefined" const isQuanX = typeof $task != "undefined" const node = (() => { @@ -553,5 +554,5 @@ function tool() { }) } } - return { isQuanX, isSurge, notify, setCache, getCache, get, post } + return { isResponse, isQuanX, isSurge, notify, setCache, getCache, get, post } } \ No newline at end of file diff --git a/tool.js b/tool.js index 842146ed5..f813293b1 100644 --- a/tool.js +++ b/tool.js @@ -38,6 +38,7 @@ $tool.post(request, function (error, response, body) { function tool() { const isSurge = typeof $httpClient != "undefined" const isQuanX = typeof $task != "undefined" + const isResponse = typeof $response != "undefined" const node = (() => { if (typeof require == "function") { const request = require('request') @@ -103,5 +104,5 @@ function tool() { }) } } - return { isQuanX, isSurge, notify, setCache, getCache, get, post } + return { isQuanX, isSurge, isResponse, notify, setCache, getCache, get, post } } \ No newline at end of file From f2314472c006a227240a823dba15ee0f47285851 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 9 Jan 2020 16:00:48 +0800 Subject: [PATCH 0018/1191] nf adapts to qx --- README.md | 2 +- nf_rating.js | 5 +++-- tool.js | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0ca68fc24..cc6977d0d 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com Display Netflix TV series and movie's IMDb ratings, Douban ratings, rotten tomato and country/region ``` [rewrite_local] -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url request-header languages=(.+?)&(.+)&path=%5B%22videos%22%2C%(\d+)%22%2C%22summary%22%5D request-header languages=en-US&$2&path=%5B%22videos%22%2C%$3%22%2C%22summary%22%5D&path=%5B%22videos%22%2C%$3%22%2C%22details%22%5D +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header nf_rating.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body nf_rating.js [mitm] hostname = ios.prod.ftl.netflix.com diff --git a/nf_rating.js b/nf_rating.js index 077a29ea9..f0da1c179 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -7,7 +7,7 @@ const consoleLog = false; const imdbApikeyCacheKey = "IMDbApikey"; const netflixTitleCacheKey = "NetflixTitle"; -if ($request.headers && $tool.isSurge) { +if (!$tool.isResponse) { let url = $request.url; const urlDecode = decodeURIComponent(url); const videos = urlDecode.match(/"videos","(\d+)"/); @@ -486,6 +486,7 @@ function countryEmoji(name) { } function tool() { + const isResponse = typeof $response != "undefined" const isSurge = typeof $httpClient != "undefined" const isQuanX = typeof $task != "undefined" const node = (() => { @@ -553,5 +554,5 @@ function tool() { }) } } - return { isQuanX, isSurge, notify, setCache, getCache, get, post } + return { isResponse, isQuanX, isSurge, notify, setCache, getCache, get, post } } \ No newline at end of file diff --git a/tool.js b/tool.js index 842146ed5..f813293b1 100644 --- a/tool.js +++ b/tool.js @@ -38,6 +38,7 @@ $tool.post(request, function (error, response, body) { function tool() { const isSurge = typeof $httpClient != "undefined" const isQuanX = typeof $task != "undefined" + const isResponse = typeof $response != "undefined" const node = (() => { if (typeof require == "function") { const request = require('request') @@ -103,5 +104,5 @@ function tool() { }) } } - return { isQuanX, isSurge, notify, setCache, getCache, get, post } + return { isQuanX, isSurge, isResponse, notify, setCache, getCache, get, post } } \ No newline at end of file From 590ace7d0569cf3360c7ab00ca45a94acf4d7708 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 9 Jan 2020 16:07:38 +0800 Subject: [PATCH 0019/1191] nf fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cc6977d0d..682095180 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com Display Netflix TV series and movie's IMDb ratings, Douban ratings, rotten tomato and country/region ``` [Script] -http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/netflix_ratings.js +http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js [MITM] hostname = ios.prod.ftl.netflix.com From e2524a598c75e1c35d3177b4741fef16470782bd Mon Sep 17 00:00:00 2001 From: goose Date: Sun, 2 Feb 2020 21:04:11 +0800 Subject: [PATCH 0020/1191] fix --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 682095180..944d8dadc 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ IP-CIDR, 203.119.175.0/24, REJECT, no-resolve IP-CIDR, 106.11.162.0/24, REJECT, no-resolve IP-CIDR, 47.102.83.0/24, REJECT, no-resolve [Script] -# 使用脚本屏蔽 IP,不生效的需卸载tb重装,使用这个脚本就不需要写规则了(beta) +# 使用脚本屏蔽 IP,不生效的卸载 tb 重装试试,使用这个脚本就不用写规则了(beta) http-response ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] @@ -85,14 +85,15 @@ taobao (beta) [filter_local] # 注意优先级(建议放在第一条) # 使用规则屏蔽 IP,有可能误伤其他功能或者应用,可以自己抓包缩小 IP 范围 -ip-cidr, 203.119.144.0/23, reject, no-resolve -ip-cidr, 203.119.175.0/24, reject, no-resolve -ip-cidr, 106.11.162.0/24, reject, no-resolve -ip-cidr, 47.102.83.0/24, reject, no-resolve +ip-cidr, 203.119.144.0/23, reject +ip-cidr, 203.119.175.0/24, reject +ip-cidr, 106.11.162.0/24, reject +ip-cidr, 47.102.83.0/24, reject [rewrite_local] -# 使用脚本屏蔽 IP,不生效的需卸载tb重装,使用这个脚本就不需要写规则了(beta) +# 使用脚本屏蔽 IP,不生效的卸载 tb 重装试试,使用这个脚本就不用写规则了(beta) ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body tb_price.js ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js [mitm] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` +Group:[t.me/scriptgroup](http://t.me/scriptgroup) From 217ad43d44c4ed4f58978008fea2637d1c63e987 Mon Sep 17 00:00:00 2001 From: goose Date: Sun, 2 Feb 2020 21:31:23 +0800 Subject: [PATCH 0021/1191] fix --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 944d8dadc..dbabc4d40 100644 --- a/README.md +++ b/README.md @@ -96,4 +96,5 @@ ip-cidr, 47.102.83.0/24, reject [mitm] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` -Group:[t.me/scriptgroup](http://t.me/scriptgroup) + +[Group](http://t.me/scriptgroup) From 784c075fa742cf0303d3379706c39e92784cd13c Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Wed, 5 Feb 2020 17:06:20 +0800 Subject: [PATCH 0022/1191] Update README.md --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index dbabc4d40..f0855c1f6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ ## Surge - Remove Weibo ads, promotion and recommend ``` [Script] @@ -28,7 +27,7 @@ http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness hostname = api.m.jd.com ``` -taobao (beta) +taobao ``` [Rule] # 注意优先级(建议放在第一条) @@ -38,7 +37,7 @@ IP-CIDR, 203.119.175.0/24, REJECT, no-resolve IP-CIDR, 106.11.162.0/24, REJECT, no-resolve IP-CIDR, 47.102.83.0/24, REJECT, no-resolve [Script] -# 使用脚本屏蔽 IP,不生效的卸载 tb 重装试试,使用这个脚本就不用写规则了(beta) +# 使用脚本屏蔽 IP,不生效或者失效需要卸载 tb 重装,使用脚本不需要写规则 http-response ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] @@ -80,7 +79,7 @@ JD [mitm] hostname = api.m.jd.com ``` -taobao (beta) +taobao ``` [filter_local] # 注意优先级(建议放在第一条) @@ -90,11 +89,11 @@ ip-cidr, 203.119.175.0/24, reject ip-cidr, 106.11.162.0/24, reject ip-cidr, 47.102.83.0/24, reject [rewrite_local] -# 使用脚本屏蔽 IP,不生效的卸载 tb 重装试试,使用这个脚本就不用写规则了(beta) +# 使用脚本屏蔽 IP,不生效或者失效需要卸载 tb 重装,使用脚本不需要写规则 ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body tb_price.js ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js [mitm] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` -[Group](http://t.me/scriptgroup) +[Issue Group](http://t.me/scriptgroup) From 72011f0428c020f208757c8b5d2bb221af7e4e41 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Wed, 5 Feb 2020 17:55:44 +0800 Subject: [PATCH 0023/1191] Update tool.js --- tool.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tool.js b/tool.js index f813293b1..f4a5abe4b 100644 --- a/tool.js +++ b/tool.js @@ -5,8 +5,8 @@ const $tool = tool() // notify $tool.notify("title", "subtitle", "message") // cache -$tool.setCache("value", "key") -$tool.getCache("key") +$tool.write("value", "key") +$tool.read("key") // get $tool.get("http://www.baidu.com", function (error, response, body) { // response.status response.statusCode response.headers @@ -52,11 +52,11 @@ function tool() { if (isSurge) $notification.post(title, subtitle, message) if (node) console.log(JSON.stringify({ title, subtitle, message })); } - const setCache = (value, key) => { + const write = (value, key) => { if (isQuanX) return $prefs.setValueForKey(value, key) if (isSurge) return $persistentStore.write(value, key) } - const getCache = (key) => { + const read = (key) => { if (isQuanX) return $prefs.valueForKey(key) if (isSurge) return $persistentStore.read(key) } @@ -104,5 +104,5 @@ function tool() { }) } } - return { isQuanX, isSurge, isResponse, notify, setCache, getCache, get, post } -} \ No newline at end of file + return { isQuanX, isSurge, isResponse, notify, write, read, get, post } +} From c7dd9ee046ac77c06fedb3da122ea020985c0832 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Wed, 5 Feb 2020 23:10:33 +0800 Subject: [PATCH 0024/1191] Update README.md --- README.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f0855c1f6..bbaf9937a 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,7 @@ http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22vid hostname = ios.prod.ftl.netflix.com ``` -Display commodity historical price - -JD +Display JD historical price ``` [Script] http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js @@ -27,7 +25,7 @@ http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness hostname = api.m.jd.com ``` -taobao +Display taobao historical price ``` [Rule] # 注意优先级(建议放在第一条) @@ -70,16 +68,15 @@ Display Netflix TV series and movie's IMDb ratings, Douban ratings, rotten tomat hostname = ios.prod.ftl.netflix.com ``` -Display commodity historical price - -JD +Display JD historical price ``` [rewrite_local] ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js [mitm] hostname = api.m.jd.com ``` -taobao + +Display taobao historical price ``` [filter_local] # 注意优先级(建议放在第一条) From ecafc4db4a0ea3600a7126d6df06514778e345e4 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Wed, 5 Feb 2020 23:24:37 +0800 Subject: [PATCH 0025/1191] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bbaf9937a..825d507e0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## Surge -Remove Weibo ads, promotion and recommend +Remove weibo ads ``` [Script] http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js @@ -8,7 +8,7 @@ http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/w hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` -Display Netflix TV series and movie's IMDb ratings, Douban ratings, rotten tomato and country/region +Display netflix ratings(IMDb、douaban) ``` [Script] http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js @@ -17,7 +17,7 @@ http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22vid hostname = ios.prod.ftl.netflix.com ``` -Display JD historical price +Display jd historical price ``` [Script] http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js @@ -50,7 +50,7 @@ cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/s ## Quan-X -Remove Weibo ads, promotion and recommend +Remove weibo ads ``` [rewrite_local] ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body wb_ad.js @@ -59,7 +59,7 @@ Remove Weibo ads, promotion and recommend hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` -Display Netflix TV series and movie's IMDb ratings, Douban ratings, rotten tomato and country/region +Display netflix ratings(IMDb、douaban) ``` [rewrite_local] ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header nf_rating.js @@ -68,7 +68,7 @@ Display Netflix TV series and movie's IMDb ratings, Douban ratings, rotten tomat hostname = ios.prod.ftl.netflix.com ``` -Display JD historical price +Display jd historical price ``` [rewrite_local] ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js From 245a4c876430b5a8cd1827a86ef18f6b0b15088c Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Wed, 5 Feb 2020 23:27:11 +0800 Subject: [PATCH 0026/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 825d507e0..be91ab449 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Surge +# Surge Remove weibo ads ``` [Script] @@ -48,7 +48,7 @@ Daily work check-in reminder cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/surge/master/cron_daily.js ``` -## Quan-X +# Quan-X Remove weibo ads ``` From 3895c47beb9b64436bb9cc130f4b58985f9e272b Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Wed, 5 Feb 2020 23:28:36 +0800 Subject: [PATCH 0027/1191] Update nf_rating.js --- nf_rating.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_rating.js b/nf_rating.js index f0da1c179..55fe5eb3a 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -555,4 +555,4 @@ function tool() { } } return { isResponse, isQuanX, isSurge, notify, setCache, getCache, get, post } -} \ No newline at end of file +} From 6225eb7792fd40e4973919c8ab39a45e81b5f9b3 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Wed, 5 Feb 2020 23:29:11 +0800 Subject: [PATCH 0028/1191] Update nf_rating.js From 8d1765d9ba6b5ebb8f4d25242856bbeb451c7f88 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Thu, 6 Feb 2020 00:07:16 +0800 Subject: [PATCH 0029/1191] Update and rename cron_daily.js to check_in.js --- check_in.js | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++ cron_daily.js | 20 -------------- 2 files changed, 75 insertions(+), 20 deletions(-) create mode 100644 check_in.js delete mode 100644 cron_daily.js diff --git a/check_in.js b/check_in.js new file mode 100644 index 000000000..7ac241ac3 --- /dev/null +++ b/check_in.js @@ -0,0 +1,75 @@ +/* +README:https://github.com/yichahucha/surge/tree/master +每日打卡提醒(corn "0 9,18 * * 1-5" 周一到周五,早九晚六)+ 每日壹句(有道词典)+ 跳转钉钉打卡页面(下拉通知点击链接) +*/ + +const $tool = new tool() +$tool.get('https://dict.youdao.com/infoline/style/cardList?mode=publish&client=mobile&style=daily&size=2', function (error, response, data) { + let obj = JSON.parse(data); + let date = new Date(); + let isAM = date.getHours() < 12 ? true : false; + let title = 'Clock' + (isAM ? ' in' : ' out') + (isAM ? ' ☀️' : ' 🌙'); + let subtitle = ''; + let content = 'dingtalk://dingtalkclient/page/link?url=https://attend.dingtalk.com/attend/index.html'; + if (!error) { + if (obj && obj.length > 1) { + let yi = obj[1]; + content = yi.title + '\n' + yi.summary + '\n\n' + content; + } + } + $tool.notify(title, subtitle, content); + $done(); +}) + +function tool() { + this.isSurge = typeof $httpClient != "undefined" + this.isQuanX = typeof $task != "undefined" + this.isResponse = typeof $response != "undefined" + const node = (() => { + if (typeof require == "function") { + const request = require('request') + return ({ request }) + } else { + return (null) + } + })() + this.notify = (title, subtitle, message) => { + if (this.isQuanX) $notify(title, subtitle, message) + if (this.isSurge) $notification.post(title, subtitle, message) + if (node) console.log(JSON.stringify({ title, subtitle, message })); + } + this.write = (value, key) => { + if (this.isQuanX) return $prefs.setValueForKey(value, key) + if (this.isSurge) return $persistentStore.write(value, key) + } + this.read = (key) => { + if (this.isQuanX) return $prefs.valueForKey(key) + if (this.isSurge) return $persistentStore.read(key) + } + const adapterStatus = (response) => { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } + return response + } + this.get = (options, callback) => { + if (this.isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "GET" + $task.fetch(options).then(response => { callback(null, adapterStatus(response), response.body) }, reason => callback(reason.error, null, null)) + } + if (this.isSurge) $httpClient.get(options, (error, response, body) => { callback(error, adapterStatus(response), body) }) + if (node) node.request(options, (error, response, body) => { callback(error, adapterStatus(response), body) }) + } + this.post = (options, callback) => { + if (this.isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "POST" + $task.fetch(options).then(response => { callback(null, adapterStatus(response), response.body) }, reason => callback(reason.error, null, null)) + } + if (this.isSurge) $httpClient.post(options, (error, response, body) => { callback(error, adapterStatus(response), body) }) + if (node) node.request.post(options, (error, response, body) => { callback(error, adapterStatus(response), body) }) + } +} diff --git a/cron_daily.js b/cron_daily.js deleted file mode 100644 index 5fedd7e9b..000000000 --- a/cron_daily.js +++ /dev/null @@ -1,20 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master -每日打卡提醒(corn "0 9,18 * * 1-5" 周一到周五,早九晚六)+ 每日壹句(有道词典)+ 跳转钉钉打卡页面(下拉通知点击链接) -*/ -$httpClient.get('https://dict.youdao.com/infoline/style/cardList?mode=publish&client=mobile&style=daily&size=2', function (error, response, data) { - let obj = JSON.parse(data); - let date = new Date(); - let isAM = date.getHours() < 12 ? true : false - let title = 'Clock' + (isAM ? ' in' : ' out') + (isAM ? ' ☀️' : ' 🌙'); - let subtitle = ''; - let content = 'dingtalk://dingtalkclient/page/link?url=https://attend.dingtalk.com/attend/index.html'; - if (!error) { - if (obj && obj.length > 1) { - let yi = obj[1]; - content = yi.title + '\n' + yi.summary + '\n\n' + content; - } - } - $notification.post(title, subtitle, content); - $done(); -}); From f7706fbdda3b76ea25c803fc54209d13ced40f43 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Thu, 6 Feb 2020 00:24:01 +0800 Subject: [PATCH 0030/1191] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index be91ab449..dc03e9b8e 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ hostname = trade-acs.m.taobao.com,amdc.m.taobao.com Daily work check-in reminder ``` [Script] -cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/surge/master/cron_daily.js +cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/surge/master/check_in.js ``` # Quan-X @@ -93,4 +93,10 @@ ip-cidr, 47.102.83.0/24, reject hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` +Daily work check-in reminder +``` +[task_local] +0 9,18 * * 1-5 check_in.js +``` + [Issue Group](http://t.me/scriptgroup) From c6aef64704e5632727d5f3b80bf8d51eae050408 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Thu, 6 Feb 2020 18:40:52 +0800 Subject: [PATCH 0031/1191] Update jd_price.js --- jd_price.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/jd_price.js b/jd_price.js index 8b8d5684d..c4dc8d6b8 100644 --- a/jd_price.js +++ b/jd_price.js @@ -11,11 +11,8 @@ const $tool = tool(); if (url.indexOf(path1) != -1) { let obj = JSON.parse(body); - delete obj.serverConfig.httpdns; - delete obj.serverConfig.dnsvip; - delete obj.serverConfig.dnsvip_v6; + obj.serverConfig.httpdns = "0"; $done({ body: JSON.stringify(obj) }); - if (console_log) $tool.notify("JD", "", "httpdns closed"); } if (url.indexOf(path2) != -1) { @@ -267,4 +264,4 @@ Date.prototype.format = function (fmt) { } } return fmt; -} \ No newline at end of file +} From fc0bf4882a6995929ffa2c8814a77facf9dc4c32 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Thu, 6 Feb 2020 18:56:34 +0800 Subject: [PATCH 0032/1191] Update jd_price.js --- jd_price.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jd_price.js b/jd_price.js index c4dc8d6b8..dc23d17ee 100644 --- a/jd_price.js +++ b/jd_price.js @@ -12,6 +12,8 @@ const $tool = tool(); if (url.indexOf(path1) != -1) { let obj = JSON.parse(body); obj.serverConfig.httpdns = "0"; + obj.serverConfig.dnsvip = ""; + obj.serverConfig.dnsvip_v6 = ""; $done({ body: JSON.stringify(obj) }); } From 2ffa33eae7571fafd7e16a535a55796178526aa9 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Thu, 6 Feb 2020 19:17:09 +0800 Subject: [PATCH 0033/1191] Update jd_price.js --- jd_price.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jd_price.js b/jd_price.js index dc23d17ee..ab3b45e17 100644 --- a/jd_price.js +++ b/jd_price.js @@ -11,9 +11,9 @@ const $tool = tool(); if (url.indexOf(path1) != -1) { let obj = JSON.parse(body); - obj.serverConfig.httpdns = "0"; - obj.serverConfig.dnsvip = ""; - obj.serverConfig.dnsvip_v6 = ""; + delete obj.serverConfig.httpdns; + delete obj.serverConfig.dnsvip; + delete obj.serverConfig.dnsvip_v6; $done({ body: JSON.stringify(obj) }); } From c31e9e5cd299dac20c585211f0a5c41fe6ed8bbc Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Thu, 6 Feb 2020 19:36:04 +0800 Subject: [PATCH 0034/1191] Update jd_price.js --- jd_price.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/jd_price.js b/jd_price.js index ab3b45e17..d9437c798 100644 --- a/jd_price.js +++ b/jd_price.js @@ -12,8 +12,6 @@ const $tool = tool(); if (url.indexOf(path1) != -1) { let obj = JSON.parse(body); delete obj.serverConfig.httpdns; - delete obj.serverConfig.dnsvip; - delete obj.serverConfig.dnsvip_v6; $done({ body: JSON.stringify(obj) }); } From 9d0c6e8cb6e2d822ec0bf2dd074f21660ab4b531 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Thu, 6 Feb 2020 22:56:07 +0800 Subject: [PATCH 0035/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dc03e9b8e..72b863a52 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[Issue Group](http://t.me/scriptgroup) + # Surge Remove weibo ads ``` @@ -98,5 +100,3 @@ Daily work check-in reminder [task_local] 0 9,18 * * 1-5 check_in.js ``` - -[Issue Group](http://t.me/scriptgroup) From 4dd89d0b33e8ba08f2fd5e5e83ca79c1255ff362 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sun, 9 Feb 2020 22:53:42 +0800 Subject: [PATCH 0036/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 72b863a52..4c25363f7 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ IP-CIDR, 203.119.175.0/24, REJECT, no-resolve IP-CIDR, 106.11.162.0/24, REJECT, no-resolve IP-CIDR, 47.102.83.0/24, REJECT, no-resolve [Script] -# 使用脚本屏蔽 IP,不生效或者失效需要卸载 tb 重装,使用脚本不需要写规则 +# 使用脚本屏蔽 IP,不生效的或失效的卸载 tb 重装,规则和脚本(第一个脚本)二选一即可 http-response ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] @@ -88,7 +88,7 @@ ip-cidr, 203.119.175.0/24, reject ip-cidr, 106.11.162.0/24, reject ip-cidr, 47.102.83.0/24, reject [rewrite_local] -# 使用脚本屏蔽 IP,不生效或者失效需要卸载 tb 重装,使用脚本不需要写规则 +# 使用脚本屏蔽 IP,不生效的或失效的卸载 tb 重装,规则和脚本(第一个脚本)二选一即可 ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body tb_price.js ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js [mitm] From 4072767c2c4d3608afff71b1bea343083e6ee331 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sun, 9 Feb 2020 22:54:40 +0800 Subject: [PATCH 0037/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4c25363f7..bf3f93fe4 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ IP-CIDR, 203.119.175.0/24, REJECT, no-resolve IP-CIDR, 106.11.162.0/24, REJECT, no-resolve IP-CIDR, 47.102.83.0/24, REJECT, no-resolve [Script] -# 使用脚本屏蔽 IP,不生效的或失效的卸载 tb 重装,规则和脚本(第一个脚本)二选一即可 +# 使用脚本屏蔽 IP,不生效的或失效的卸载 tb 重装,规则和脚本(第一条脚本)二选一即可 http-response ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] @@ -88,7 +88,7 @@ ip-cidr, 203.119.175.0/24, reject ip-cidr, 106.11.162.0/24, reject ip-cidr, 47.102.83.0/24, reject [rewrite_local] -# 使用脚本屏蔽 IP,不生效的或失效的卸载 tb 重装,规则和脚本(第一个脚本)二选一即可 +# 使用脚本屏蔽 IP,不生效的或失效的卸载 tb 重装,规则和脚本(第一条脚本)二选一即可 ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body tb_price.js ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js [mitm] From bce1fb6e28beea7672efbf3224209383fe8abcac Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sun, 9 Feb 2020 23:05:35 +0800 Subject: [PATCH 0038/1191] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bf3f93fe4..3588432ed 100644 --- a/README.md +++ b/README.md @@ -30,14 +30,14 @@ hostname = api.m.jd.com Display taobao historical price ``` [Rule] -# 注意优先级(建议放在第一条) +# 注意规则优先级(建议放在第一条) # 使用规则屏蔽 IP,有可能误伤其他功能或者应用,可以自己抓包缩小 IP 范围 IP-CIDR, 203.119.144.0/23, REJECT, no-resolve IP-CIDR, 203.119.175.0/24, REJECT, no-resolve IP-CIDR, 106.11.162.0/24, REJECT, no-resolve IP-CIDR, 47.102.83.0/24, REJECT, no-resolve [Script] -# 使用脚本屏蔽 IP,不生效的或失效的卸载 tb 重装,规则和脚本(第一条脚本)二选一即可 +# 使用脚本屏蔽 IP(第一条脚本),不生效或失效的卸载 tb 重装,规则和脚本(第一条脚本)二选一 http-response ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] @@ -81,14 +81,14 @@ hostname = api.m.jd.com Display taobao historical price ``` [filter_local] -# 注意优先级(建议放在第一条) +# 注意规则优先级(建议放在第一条) # 使用规则屏蔽 IP,有可能误伤其他功能或者应用,可以自己抓包缩小 IP 范围 ip-cidr, 203.119.144.0/23, reject ip-cidr, 203.119.175.0/24, reject ip-cidr, 106.11.162.0/24, reject ip-cidr, 47.102.83.0/24, reject [rewrite_local] -# 使用脚本屏蔽 IP,不生效的或失效的卸载 tb 重装,规则和脚本(第一条脚本)二选一即可 +# 使用脚本屏蔽 IP(第一条脚本),不生效或失效的卸载 tb 重装,规则和脚本(第一条脚本)二选一 ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body tb_price.js ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js [mitm] From f56b519499038661c52c96ac54a99e99a0df5045 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Mon, 10 Feb 2020 18:31:26 +0800 Subject: [PATCH 0039/1191] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3588432ed..573f46d2d 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ hostname = ios.prod.ftl.netflix.com Display jd historical price ``` +# 使用 surge 不生效或失效的检查一下有没有这条神机的复写,有的话删除试试 +# ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=(start|queryMaterialAdverts) - reject [Script] http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js [MITM] From 663a183ec7054ba9c4db6751fbfdf7f3b9c2eb56 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Mon, 10 Feb 2020 18:40:17 +0800 Subject: [PATCH 0040/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 573f46d2d..dfbe90268 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ hostname = ios.prod.ftl.netflix.com Display jd historical price ``` -# 使用 surge 不生效或失效的检查一下有没有这条神机的复写,有的话删除试试 +# 使用 surge 不生效或失效的检查一下有没有这条神机的复写,删除试试 # ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=(start|queryMaterialAdverts) - reject [Script] http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js From c2ecabd6405b0a03721587b7746deba9b9f1d21c Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Mon, 10 Feb 2020 21:00:17 +0800 Subject: [PATCH 0041/1191] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dfbe90268..fc0d29656 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,8 @@ hostname = ios.prod.ftl.netflix.com Display jd historical price ``` -# 使用 surge 不生效或失效的检查一下有没有这条神机的复写,删除试试 +# 使用不生效或失效的检查一下有没有这两条复写,如果有删除试试 +# ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=start - reject # ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=(start|queryMaterialAdverts) - reject [Script] http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js From 64103098823c7d57fd39134e4ec1151e55a0b226 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Mon, 10 Feb 2020 21:00:54 +0800 Subject: [PATCH 0042/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fc0d29656..011060eeb 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ hostname = ios.prod.ftl.netflix.com Display jd historical price ``` -# 使用不生效或失效的检查一下有没有这两条复写,如果有删除试试 +# 使用不生效或失效的检查一下配置有没有这两条复写,如果有删除试试 # ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=start - reject # ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=(start|queryMaterialAdverts) - reject [Script] From ce699c42d7d742cad6aba8a98cd09c927384759f Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Tue, 11 Feb 2020 12:00:26 +0800 Subject: [PATCH 0043/1191] Update README.md --- README.md | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 011060eeb..db1d9ec71 100644 --- a/README.md +++ b/README.md @@ -30,17 +30,23 @@ http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness hostname = api.m.jd.com ``` -Display taobao historical price +Display taobao historical price(提供两种方式,根据需求二选一) ``` +# 使用规则屏蔽指定 IP 段,有可能误伤其他功能或者应用,可以自己抓包缩小 IP 范围,随时生效 [Rule] -# 注意规则优先级(建议放在第一条) -# 使用规则屏蔽 IP,有可能误伤其他功能或者应用,可以自己抓包缩小 IP 范围 IP-CIDR, 203.119.144.0/23, REJECT, no-resolve IP-CIDR, 203.119.175.0/24, REJECT, no-resolve IP-CIDR, 106.11.162.0/24, REJECT, no-resolve IP-CIDR, 47.102.83.0/24, REJECT, no-resolve [Script] -# 使用脚本屏蔽 IP(第一条脚本),不生效或失效的卸载 tb 重装,规则和脚本(第一条脚本)二选一 +http-response ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +[MITM] +hostname = trade-acs.m.taobao.com,amdc.m.taobao.com +``` + +``` +# 使用脚本删除对应 IP,注意不开脚本进淘宝会失效,不生效或失效的需要卸载 tb 重装 +[Script] http-response ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] @@ -81,17 +87,23 @@ Display jd historical price hostname = api.m.jd.com ``` -Display taobao historical price +Display taobao historical price(提供两种方式,根据需求二选一) ``` +# 使用规则屏蔽指定 IP 段,有可能误伤其他功能或者应用,可以自己抓包缩小 IP 范围,随时生效 [filter_local] -# 注意规则优先级(建议放在第一条) -# 使用规则屏蔽 IP,有可能误伤其他功能或者应用,可以自己抓包缩小 IP 范围 ip-cidr, 203.119.144.0/23, reject ip-cidr, 203.119.175.0/24, reject ip-cidr, 106.11.162.0/24, reject ip-cidr, 47.102.83.0/24, reject [rewrite_local] -# 使用脚本屏蔽 IP(第一条脚本),不生效或失效的卸载 tb 重装,规则和脚本(第一条脚本)二选一 +^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js +[mitm] +hostname = trade-acs.m.taobao.com,amdc.m.taobao.com +``` + +``` +# 使用脚本删除对应 IP,注意不开脚本进淘宝会失效,不生效或失效的需要卸载 tb 重装 +[rewrite_local] ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body tb_price.js ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js [mitm] From 7f928b1a860f53e26349243d1784fa0811404347 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Tue, 11 Feb 2020 14:18:30 +0800 Subject: [PATCH 0044/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index db1d9ec71..7cdc32119 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` ``` -# 使用脚本删除对应 IP,注意不开脚本进淘宝会失效,不生效或失效的需要卸载 tb 重装 +# 使用脚本删除对应 IP,注意不开脚本进 tb 会失效,不生效或失效的需要卸载 tb 重装 [Script] http-response ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js @@ -102,7 +102,7 @@ hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` ``` -# 使用脚本删除对应 IP,注意不开脚本进淘宝会失效,不生效或失效的需要卸载 tb 重装 +# 使用脚本删除对应 IP,注意不开脚本进 tb 会失效,不生效或失效的需要卸载 tb 重装 [rewrite_local] ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body tb_price.js ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js From 07ddd922f1ecfc301d6c07ac5e0d3e11790008e6 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Tue, 11 Feb 2020 15:41:25 +0800 Subject: [PATCH 0045/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7cdc32119..6a4f59766 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` ``` -# 使用脚本删除对应 IP,注意不开脚本进 tb 会失效,不生效或失效的需要卸载 tb 重装 +# 使用脚本删除对应 IP,不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [Script] http-response ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js @@ -102,7 +102,7 @@ hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` ``` -# 使用脚本删除对应 IP,注意不开脚本进 tb 会失效,不生效或失效的需要卸载 tb 重装 +# 使用脚本删除对应 IP,不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [rewrite_local] ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body tb_price.js ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js From 8659b96a4f2f631bd59297179727570108caf98e Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Fri, 14 Feb 2020 10:31:26 +0800 Subject: [PATCH 0046/1191] Update tool.js --- tool.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tool.js b/tool.js index f4a5abe4b..35c66821f 100644 --- a/tool.js +++ b/tool.js @@ -61,10 +61,12 @@ function tool() { if (isSurge) return $persistentStore.read(key) } const adapterStatus = (response) => { - if (response.status) { - response["statusCode"] = response.status - } else if (response.statusCode) { - response["status"] = response.statusCode + if (response) { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } } return response } From ff3b5039e31ab67e9d86abe99985c51cb37c08f6 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Fri, 14 Feb 2020 10:35:18 +0800 Subject: [PATCH 0047/1191] Update jd_price.js --- jd_price.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/jd_price.js b/jd_price.js index d9437c798..5d62cd359 100644 --- a/jd_price.js +++ b/jd_price.js @@ -165,6 +165,7 @@ function adword_obj() { function tool() { const isSurge = typeof $httpClient != "undefined" const isQuanX = typeof $task != "undefined" + const isResponse = typeof $response != "undefined" const node = (() => { if (typeof require == "function") { const request = require('request') @@ -178,19 +179,21 @@ function tool() { if (isSurge) $notification.post(title, subtitle, message) if (node) console.log(JSON.stringify({ title, subtitle, message })); } - const setCache = (value, key) => { + const write = (value, key) => { if (isQuanX) return $prefs.setValueForKey(value, key) if (isSurge) return $persistentStore.write(value, key) } - const getCache = (key) => { + const read = (key) => { if (isQuanX) return $prefs.valueForKey(key) if (isSurge) return $persistentStore.read(key) } const adapterStatus = (response) => { - if (response.status) { - response["statusCode"] = response.status - } else if (response.statusCode) { - response["status"] = response.statusCode + if (response) { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } } return response } @@ -230,7 +233,7 @@ function tool() { }) } } - return { isQuanX, isSurge, notify, setCache, getCache, get, post } + return { isQuanX, isSurge, isResponse, notify, write, read, get, post } } Array.prototype.insert = function (index, item) { From 6a4b5b93558aafe3c087f9e818c6a0ade9aa8048 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Fri, 14 Feb 2020 10:36:43 +0800 Subject: [PATCH 0048/1191] Update tb_price.js --- tb_price.js | 52 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 9 deletions(-) diff --git a/tb_price.js b/tb_price.js index a6a354f0f..887fb8c79 100644 --- a/tb_price.js +++ b/tb_price.js @@ -215,41 +215,75 @@ Date.prototype.format = function (fmt) { function tool() { const isSurge = typeof $httpClient != "undefined" const isQuanX = typeof $task != "undefined" + const isResponse = typeof $response != "undefined" + const node = (() => { + if (typeof require == "function") { + const request = require('request') + return ({ request }) + } else { + return (null) + } + })() const notify = (title, subtitle, message) => { if (isQuanX) $notify(title, subtitle, message) if (isSurge) $notification.post(title, subtitle, message) + if (node) console.log(JSON.stringify({ title, subtitle, message })); } - const setCache = (value, key) => { + const write = (value, key) => { if (isQuanX) return $prefs.setValueForKey(value, key) if (isSurge) return $persistentStore.write(value, key) } - const getCache = (key) => { + const read = (key) => { if (isQuanX) return $prefs.valueForKey(key) if (isSurge) return $persistentStore.read(key) } + const adapterStatus = (response) => { + if (response) { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } + } + return response + } const get = (options, callback) => { if (isQuanX) { if (typeof options == "string") options = { url: options } options["method"] = "GET" $task.fetch(options).then(response => { - response["status"] = response.statusCode - callback(null, response, response.body) + callback(null, adapterStatus(response), response.body) }, reason => callback(reason.error, null, null)) } - if (isSurge) $httpClient.get(options, callback) + if (isSurge) $httpClient.get(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + if (node) { + node.request(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } } const post = (options, callback) => { if (isQuanX) { if (typeof options == "string") options = { url: options } options["method"] = "POST" $task.fetch(options).then(response => { - response["status"] = response.statusCode - callback(null, response, response.body) + callback(null, adapterStatus(response), response.body) }, reason => callback(reason.error, null, null)) } - if (isSurge) $httpClient.post(options, callback) + if (isSurge) { + $httpClient.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + if (node) { + node.request.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } } - return { isQuanX, isSurge, notify, setCache, getCache, get, post } + return { isQuanX, isSurge, isResponse, notify, write, read, get, post } } function Base64() { From 8f4b2b7a5a67c28dfb0d8d31a79d62b7fce9f6d9 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Fri, 14 Feb 2020 10:41:51 +0800 Subject: [PATCH 0049/1191] Update nf_rating.js --- nf_rating.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/nf_rating.js b/nf_rating.js index 55fe5eb3a..bca45dc0b 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -24,7 +24,7 @@ if (!$tool.isResponse) { $done({ url }); } else { var IMDbApikeys = IMDbApikeys(); - var IMDbApikey = $tool.getCache(imdbApikeyCacheKey); + var IMDbApikey = $tool.read(imdbApikeyCacheKey); if (!IMDbApikey) updateIMDbApikey(); let obj = JSON.parse($response.body); if (consoleLog) console.log("Netflix Original Body:\n" + $response.body); @@ -67,13 +67,13 @@ if (!$tool.isResponse) { } function getTitleMap() { - const map = $tool.getCache(netflixTitleCacheKey); + const map = $tool.read(netflixTitleCacheKey); return map ? JSON.parse(map) : {}; } function setTitleMap(id, title, map) { map[id] = title; - $tool.setCache(JSON.stringify(map), netflixTitleCacheKey); + $tool.write(JSON.stringify(map), netflixTitleCacheKey); } function requestDoubanRating(imdbId) { @@ -140,7 +140,7 @@ function updateIMDbApikey() { if (IMDbApikey) IMDbApikeys.splice(IMDbApikeys.indexOf(IMDbApikey), 1); const index = Math.floor(Math.random() * IMDbApikeys.length); IMDbApikey = IMDbApikeys[index]; - $tool.setCache(IMDbApikey, imdbApikeyCacheKey); + $tool.write(IMDbApikey, imdbApikeyCacheKey); } function get_IMDb_message(data) { @@ -486,9 +486,9 @@ function countryEmoji(name) { } function tool() { - const isResponse = typeof $response != "undefined" const isSurge = typeof $httpClient != "undefined" const isQuanX = typeof $task != "undefined" + const isResponse = typeof $response != "undefined" const node = (() => { if (typeof require == "function") { const request = require('request') @@ -502,19 +502,21 @@ function tool() { if (isSurge) $notification.post(title, subtitle, message) if (node) console.log(JSON.stringify({ title, subtitle, message })); } - const setCache = (value, key) => { + const write = (value, key) => { if (isQuanX) return $prefs.setValueForKey(value, key) if (isSurge) return $persistentStore.write(value, key) } - const getCache = (key) => { + const read = (key) => { if (isQuanX) return $prefs.valueForKey(key) if (isSurge) return $persistentStore.read(key) } const adapterStatus = (response) => { - if (response.status) { - response["statusCode"] = response.status - } else if (response.statusCode) { - response["status"] = response.statusCode + if (response) { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } } return response } @@ -554,5 +556,5 @@ function tool() { }) } } - return { isResponse, isQuanX, isSurge, notify, setCache, getCache, get, post } + return { isQuanX, isSurge, isResponse, notify, write, read, get, post } } From cd04f44f03594b7e81f051207c20de23b0e53964 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Fri, 14 Feb 2020 10:44:43 +0800 Subject: [PATCH 0050/1191] Update check_in.js --- check_in.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/check_in.js b/check_in.js index 7ac241ac3..a68255315 100644 --- a/check_in.js +++ b/check_in.js @@ -47,10 +47,12 @@ function tool() { if (this.isSurge) return $persistentStore.read(key) } const adapterStatus = (response) => { - if (response.status) { - response["statusCode"] = response.status - } else if (response.statusCode) { - response["status"] = response.statusCode + if (response) { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } } return response } From a759db30c6b1a32a1e008a151cd3b98b33d0a9a0 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Fri, 14 Feb 2020 16:55:36 +0800 Subject: [PATCH 0051/1191] Create tb_price_lite.js --- tb_price_lite.js | 255 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 255 insertions(+) create mode 100644 tb_price_lite.js diff --git a/tb_price_lite.js b/tb_price_lite.js new file mode 100644 index 000000000..446ba3e15 --- /dev/null +++ b/tb_price_lite.js @@ -0,0 +1,255 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const $tool = tool() +const $base64 = new Base64() +const consoleLog = false +const url = $request.url +const body = $response.body +const path1 = "/amdc/mobileDispatch" +const path2 = "/gw/mtop.taobao.detail.getdetail" + +if (url.indexOf(path1) != -1) { + let obj = JSON.parse($base64.decode(body)) + let dns = obj.dns + if (dns && dns.length > 0) { + let i = dns.length; + while (i--) { + const element = dns[i]; + let host = "trade-acs.m.taobao.com" + if (element.host == host) { + element.ips = [] + if (consoleLog) console.log(JSON.stringify(element)) + } + } + } + $done({ body: $base64.encode(JSON.stringify(obj)) }) +} + +if (url.indexOf(path2) != -1) { + const body = $response.body + const obj = JSON.parse(body) + let item = obj.data.item + let shareUrl = `https://item.taobao.com/item.htm?id=${item.itemId}` + $done({ body }) + requestPrice(shareUrl, function (data) { + if (data) { + if (data.ok == 1 && data.single) { + const lower = lowerMsgs(data.single) + $tool.notify("", "", `${lower}\n\n👉 查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) + } + if (data.ok == 0 && data.msg.length > 0) { + $tool.notify("", "", `⚠️ ${data.msg}`) + } + } + }) +} + +function requestPrice(shareUrl, callback) { + let options = { + url: "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", + headers: { + "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" + }, + body: "methodName=getBiJiaInfo_wxsmall&p_url=" + encodeURIComponent(shareUrl) + } + $tool.post(options, function (error, response, data) { + if (!error) { + callback(JSON.parse(data)); + if (consoleLog) console.log("Data:\n" + data); + } else { + callback(null, null); + if (consoleLog) console.log("Error:\n" + error); + } + }) +} + +function lowerMsgs(data) { + const lower = data.lowerPriceyh + const lowerDate = dateFormat(data.lowerDateyh) + const lowerMsg = "〽️ 历史最低到手价: ¥" + String(lower) + " " + lowerDate + const curret_msg = (data.currentPriceStatus ? " 当前价格" + data.currentPriceStatus : "") + " (仅供参考)" + const lower1 = lowerMsg + curret_msg + return lower1 +} + +function dateFormat(cellval) { + const date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10)); + const month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; + const currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); + return date.getFullYear() + "-" + month + "-" + currentDate; +} + +Array.prototype.insert = function (index, item) { + this.splice(index, 0, item); +}; + +Date.prototype.format = function (fmt) { + var o = { + "y+": this.getFullYear(), + "M+": this.getMonth() + 1, + "d+": this.getDate(), + "h+": this.getHours(), + "m+": this.getMinutes(), + "s+": this.getSeconds(), + "q+": Math.floor((this.getMonth() + 3) / 3), + "S+": this.getMilliseconds() + }; + for (var k in o) { + if (new RegExp("(" + k + ")").test(fmt)) { + if (k == "y+") { + fmt = fmt.replace(RegExp.$1, ("" + o[k]).substr(4 - RegExp.$1.length)); + } + else if (k == "S+") { + var lens = RegExp.$1.length; + lens = lens == 1 ? 3 : lens; + fmt = fmt.replace(RegExp.$1, ("00" + o[k]).substr(("" + o[k]).length - 1, lens)); + } + else { + fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + } + } + } + return fmt; +} + +function tool() { + const isSurge = typeof $httpClient != "undefined" + const isQuanX = typeof $task != "undefined" + const notify = (title, subtitle, message) => { + if (isQuanX) $notify(title, subtitle, message) + if (isSurge) $notification.post(title, subtitle, message) + } + const setCache = (value, key) => { + if (isQuanX) return $prefs.setValueForKey(value, key) + if (isSurge) return $persistentStore.write(value, key) + } + const getCache = (key) => { + if (isQuanX) return $prefs.valueForKey(key) + if (isSurge) return $persistentStore.read(key) + } + const get = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "GET" + $task.fetch(options).then(response => { + response["status"] = response.statusCode + callback(null, response, response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) $httpClient.get(options, callback) + } + const post = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "POST" + $task.fetch(options).then(response => { + response["status"] = response.statusCode + callback(null, response, response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) $httpClient.post(options, callback) + } + return { isQuanX, isSurge, notify, setCache, getCache, get, post } +} + +function Base64() { + // private property + _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + // public method for encoding + this.encode = function (input) { + var output = ""; + var chr1, chr2, chr3, enc1, enc2, enc3, enc4; + var i = 0; + input = _utf8_encode(input); + while (i < input.length) { + chr1 = input.charCodeAt(i++); + chr2 = input.charCodeAt(i++); + chr3 = input.charCodeAt(i++); + enc1 = chr1 >> 2; + enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); + enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); + enc4 = chr3 & 63; + if (isNaN(chr2)) { + enc3 = enc4 = 64; + } else if (isNaN(chr3)) { + enc4 = 64; + } + output = output + + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + + _keyStr.charAt(enc3) + _keyStr.charAt(enc4); + } + return output; + } + // public method for decoding + this.decode = function (input) { + var output = ""; + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0; + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); + while (i < input.length) { + enc1 = _keyStr.indexOf(input.charAt(i++)); + enc2 = _keyStr.indexOf(input.charAt(i++)); + enc3 = _keyStr.indexOf(input.charAt(i++)); + enc4 = _keyStr.indexOf(input.charAt(i++)); + chr1 = (enc1 << 2) | (enc2 >> 4); + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); + chr3 = ((enc3 & 3) << 6) | enc4; + output = output + String.fromCharCode(chr1); + if (enc3 != 64) { + output = output + String.fromCharCode(chr2); + } + if (enc4 != 64) { + output = output + String.fromCharCode(chr3); + } + } + output = _utf8_decode(output); + return output; + } + // private method for UTF-8 encoding + _utf8_encode = function (string) { + string = string.replace(/\r\n/g, "\n"); + var utftext = ""; + for (var n = 0; n < string.length; n++) { + var c = string.charCodeAt(n); + if (c < 128) { + utftext += String.fromCharCode(c); + } else if ((c > 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + + } + return utftext; + } + // private method for UTF-8 decoding + _utf8_decode = function (utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + while (i < utftext.length) { + c = utftext.charCodeAt(i); + if (c < 128) { + string += String.fromCharCode(c); + i++; + } else if ((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i + 1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } else { + c2 = utftext.charCodeAt(i + 1); + c3 = utftext.charCodeAt(i + 2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + } + return string; + } +} From e7c51e626a81778664a40b979453e61f96c3a11c Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Fri, 14 Feb 2020 16:56:06 +0800 Subject: [PATCH 0052/1191] Create jd_price_lite.js --- jd_price_lite.js | 174 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 jd_price_lite.js diff --git a/jd_price_lite.js b/jd_price_lite.js new file mode 100644 index 000000000..7ae17abd1 --- /dev/null +++ b/jd_price_lite.js @@ -0,0 +1,174 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "serverConfig"; +const path2 = "wareBusiness"; +const log = false; +const url = $request.url; +const body = $response.body; +const $tool = tool(); + +if (url.indexOf(path1) != -1) { + let obj = JSON.parse(body); + delete obj.serverConfig.httpdns; + $done({ body: JSON.stringify(obj) }); +} + +if (url.indexOf(path2) != -1) { + let obj = JSON.parse(body); + const floors = obj.floors; + const commodity_info = floors[floors.length - 1]; + const shareUrl = commodity_info.data.property.shareUrl; + $done({ body }); + request_history_price(shareUrl, function (data) { + if (data) { + if (data.ok == 1 && data.single) { + const lower = history_price_msg(data.single) + $tool.notify("", "", `${lower}\n\n👉 查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) + } + if (data.ok == 0 && data.msg.length > 0) { + $tool.notify("", "", `⚠️ ${data.msg}`) + } + } + }) +} + +function history_price_msg(data) { + const lower = data.lowerPriceyh; + const lower_date = changeDateFormat(data.lowerDateyh); + const lower_msg = "〽️ 历史最低到手价: ¥" + String(lower) + " " + lower_date + const curret_msg = (data.currentPriceStatus ? " 当前价格" + data.currentPriceStatus : "") + " (仅供参考)"; + return lower_msg + curret_msg; +} + +function request_history_price(share_url, callback) { + const options = { + url: "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", + headers: { + "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" + }, + body: "methodName=getBiJiaInfo_wxsmall&p_url=" + encodeURIComponent(share_url) + } + $tool.post(options, function (error, response, data) { + if (!error) { + callback(JSON.parse(data)); + if (log) console.log("Data:\n" + data); + } else { + callback(null, null); + if (log) console.log("Error:\n" + error); + } + }) +} + +function changeDateFormat(cellval) { + const date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10)); + const month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; + const currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); + return date.getFullYear() + "-" + month + "-" + currentDate; +} + +function tool() { + const isSurge = typeof $httpClient != "undefined" + const isQuanX = typeof $task != "undefined" + const node = (() => { + if (typeof require == "function") { + const request = require('request') + return ({ request }) + } else { + return (null) + } + })() + const notify = (title, subtitle, message) => { + if (isQuanX) $notify(title, subtitle, message) + if (isSurge) $notification.post(title, subtitle, message) + if (node) console.log(JSON.stringify({ title, subtitle, message })); + } + const setCache = (value, key) => { + if (isQuanX) return $prefs.setValueForKey(value, key) + if (isSurge) return $persistentStore.write(value, key) + } + const getCache = (key) => { + if (isQuanX) return $prefs.valueForKey(key) + if (isSurge) return $persistentStore.read(key) + } + const adapterStatus = (response) => { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } + return response + } + const get = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "GET" + $task.fetch(options).then(response => { + callback(null, adapterStatus(response), response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) $httpClient.get(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + if (node) { + node.request(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + } + const post = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "POST" + $task.fetch(options).then(response => { + callback(null, adapterStatus(response), response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) { + $httpClient.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + if (node) { + node.request.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + } + return { isQuanX, isSurge, notify, setCache, getCache, get, post } +} + +Array.prototype.insert = function (index, item) { + this.splice(index, 0, item); +}; + +Date.prototype.format = function (fmt) { + var o = { + "y+": this.getFullYear(), + "M+": this.getMonth() + 1, + "d+": this.getDate(), + "h+": this.getHours(), + "m+": this.getMinutes(), + "s+": this.getSeconds(), + "q+": Math.floor((this.getMonth() + 3) / 3), + "S+": this.getMilliseconds() + }; + for (var k in o) { + if (new RegExp("(" + k + ")").test(fmt)) { + if (k == "y+") { + fmt = fmt.replace(RegExp.$1, ("" + o[k]).substr(4 - RegExp.$1.length)); + } + else if (k == "S+") { + var lens = RegExp.$1.length; + lens = lens == 1 ? 3 : lens; + fmt = fmt.replace(RegExp.$1, ("00" + o[k]).substr(("" + o[k]).length - 1, lens)); + } + else { + fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + } + } + } + return fmt; +} From de5578198d4a573b361dbe38f196c2235999d5c1 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Fri, 14 Feb 2020 22:02:43 +0800 Subject: [PATCH 0053/1191] Update tb_price.js --- tb_price.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tb_price.js b/tb_price.js index 887fb8c79..c946a9926 100644 --- a/tb_price.js +++ b/tb_price.js @@ -4,7 +4,7 @@ README:https://github.com/yichahucha/surge/tree/master const $tool = tool() const $base64 = new Base64() -const consoleLog = false +const consoleLog = true const url = $request.url const body = $response.body const path1 = "/amdc/mobileDispatch" @@ -106,11 +106,12 @@ function lowerMsgs(data) { function historyItems(data) { const rexMatch = /\[.*?\]/g; const rexExec = /\[(.*),(.*),"(.*)"\]/; - const list = data.jiagequshiyh.match(rexMatch); + let list = data.jiagequshiyh.match(rexMatch); let tbitems = []; let startDate = ""; let endDate = ""; - list.reverse().forEach((item, index) => { + list = list.reverse().slice(0, 365); + list.forEach((item, index) => { if (item.length > 0) { const result = rexExec.exec(item); const dateUTC = new Date(eval(result[1])); @@ -125,7 +126,7 @@ function historyItems(data) { price = "¥" + String(parseFloat(price)); const msg = date + getSpace(50 - date.length) + price; tbitem = { - icon: "https://s2.ax1x.com/2020/01/03/lU2AYD.png", + icon: "https://i.loli.net/2020/02/14/7cDhsIYpgbZL9ln.png", title: msg } tbitems.push(tbitem); @@ -152,7 +153,7 @@ function getSpace(length) { function customItem() { return { - icon: "https://s2.ax1x.com/2020/01/03/lU2Pw6.png", + icon: "https://i.loli.net/2020/02/14/wFb2rheIPnQxS1R.png", title: "历史价格", desc: "" } From ab886d2b372631f6afc28f1de9e3b8742d9a59c2 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Fri, 14 Feb 2020 22:03:23 +0800 Subject: [PATCH 0054/1191] Update tb_price.js --- tb_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price.js b/tb_price.js index c946a9926..d9c51be8f 100644 --- a/tb_price.js +++ b/tb_price.js @@ -4,7 +4,7 @@ README:https://github.com/yichahucha/surge/tree/master const $tool = tool() const $base64 = new Base64() -const consoleLog = true +const consoleLog = false const url = $request.url const body = $response.body const path1 = "/amdc/mobileDispatch" From 6fc8e0fe5d15140c7b6e81813f323230718b796f Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Fri, 14 Feb 2020 22:53:13 +0800 Subject: [PATCH 0055/1191] Update jd_price_lite.js --- jd_price_lite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index 7ae17abd1..9ea31cacd 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -16,11 +16,11 @@ if (url.indexOf(path1) != -1) { } if (url.indexOf(path2) != -1) { + $done({ body }); let obj = JSON.parse(body); const floors = obj.floors; const commodity_info = floors[floors.length - 1]; const shareUrl = commodity_info.data.property.shareUrl; - $done({ body }); request_history_price(shareUrl, function (data) { if (data) { if (data.ok == 1 && data.single) { From 06e913db42d1e77cdbd68f85305160cc2b07e0c6 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Fri, 14 Feb 2020 22:53:44 +0800 Subject: [PATCH 0056/1191] Update tb_price_lite.js --- tb_price_lite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index 446ba3e15..e111f931a 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -28,11 +28,11 @@ if (url.indexOf(path1) != -1) { } if (url.indexOf(path2) != -1) { + $done({ body }) const body = $response.body const obj = JSON.parse(body) let item = obj.data.item let shareUrl = `https://item.taobao.com/item.htm?id=${item.itemId}` - $done({ body }) requestPrice(shareUrl, function (data) { if (data) { if (data.ok == 1 && data.single) { From c067e295354b91297bec8ec86b95228065468baa Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Fri, 14 Feb 2020 23:00:20 +0800 Subject: [PATCH 0057/1191] Update tb_price_lite.js --- tb_price_lite.js | 1 - 1 file changed, 1 deletion(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index e111f931a..bfe3e08b1 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -29,7 +29,6 @@ if (url.indexOf(path1) != -1) { if (url.indexOf(path2) != -1) { $done({ body }) - const body = $response.body const obj = JSON.parse(body) let item = obj.data.item let shareUrl = `https://item.taobao.com/item.htm?id=${item.itemId}` From 4dbbde787d989af9bdd21cfaf43f09bf7a6cb5db Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sat, 15 Feb 2020 13:39:44 +0800 Subject: [PATCH 0058/1191] Update jd_price_lite.js --- jd_price_lite.js | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index 9ea31cacd..7818b77ba 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -24,8 +24,10 @@ if (url.indexOf(path2) != -1) { request_history_price(shareUrl, function (data) { if (data) { if (data.ok == 1 && data.single) { - const lower = history_price_msg(data.single) - $tool.notify("", "", `${lower}\n\n👉 查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) + const lower = lowerMsgs(data.single) + const detail = listPriceDetail(data.PriceRemark.ListPriceDetail) + const tip = data.PriceRemark.Tip + "(仅供参考)" + $tool.notify("", "", `${lower} ${tip}\n${detail}\n\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) } if (data.ok == 0 && data.msg.length > 0) { $tool.notify("", "", `⚠️ ${data.msg}`) @@ -34,12 +36,29 @@ if (url.indexOf(path2) != -1) { }) } -function history_price_msg(data) { - const lower = data.lowerPriceyh; - const lower_date = changeDateFormat(data.lowerDateyh); - const lower_msg = "〽️ 历史最低到手价: ¥" + String(lower) + " " + lower_date - const curret_msg = (data.currentPriceStatus ? " 当前价格" + data.currentPriceStatus : "") + " (仅供参考)"; - return lower_msg + curret_msg; +function lowerMsgs(data) { + const lower = data.lowerPriceyh + const lowerDate = dateFormat(data.lowerDateyh) + const lowerMsg = "〽️历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` + return lowerMsg +} + +function listPriceDetail(list) { + let listPriceDetail = "" + list.forEach((item, index) => { + if (index == 2) { + item.Name = "双十一价格" + } else if (index == 3) { + item.Name = "六一八价格" + } else if (index == 4) { + item.Name = "三十天最低" + } else if (index == 5) { + item.Name = "三十天平均" + } + const priceDetail = `${item.Name} ${item.Price} ${item.Date} ${item.Difference}` + listPriceDetail += `\n${priceDetail}` + }) + return listPriceDetail } function request_history_price(share_url, callback) { @@ -49,20 +68,20 @@ function request_history_price(share_url, callback) { "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" }, - body: "methodName=getBiJiaInfo_wxsmall&p_url=" + encodeURIComponent(share_url) + body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent("http://m.manmanbuy.com/redirect.aspx?webid=1&tourl=" + share_url) } $tool.post(options, function (error, response, data) { if (!error) { callback(JSON.parse(data)); - if (log) console.log("Data:\n" + data); + if (consolelog) console.log("Data:\n" + data); } else { callback(null, null); - if (log) console.log("Error:\n" + error); + if (consolelog) console.log("Error:\n" + error); } }) } -function changeDateFormat(cellval) { +function dateFormat(cellval) { const date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10)); const month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; const currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); From aa0cfbe89be8ec86762b3a52bef3af8bb609ea04 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sat, 15 Feb 2020 13:40:07 +0800 Subject: [PATCH 0059/1191] Update tb_price_lite.js --- tb_price_lite.js | 48 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index bfe3e08b1..fb3813d85 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -36,7 +36,9 @@ if (url.indexOf(path2) != -1) { if (data) { if (data.ok == 1 && data.single) { const lower = lowerMsgs(data.single) - $tool.notify("", "", `${lower}\n\n👉 查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) + const detail = listPriceDetail(data.PriceRemark.ListPriceDetail) + const tip = data.PriceRemark.Tip + "(仅供参考)" + $tool.notify("", "", `${lower} ${tip}\n${detail}\n\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) } if (data.ok == 0 && data.msg.length > 0) { $tool.notify("", "", `⚠️ ${data.msg}`) @@ -45,35 +47,51 @@ if (url.indexOf(path2) != -1) { }) } -function requestPrice(shareUrl, callback) { - let options = { +function lowerMsgs(data) { + const lower = data.lowerPriceyh + const lowerDate = dateFormat(data.lowerDateyh) + const lowerMsg = "〽️历史最低到手价:¥" + String(lower) + `(${lowerDate})` + return lowerMsg +} + +function listPriceDetail(list) { + let listPriceDetail = "" + list.forEach((item, index) => { + if (index == 2) { + item.Name = "双十一价格" + } else if (index == 3) { + item.Name = "六一八价格" + } else if (index == 4) { + item.Name = "三十天最低" + } else if (index == 5) { + item.Name = "三十天平均" + } + const priceDetail = `${item.Name} ${item.Price} ${item.Date} ${item.Difference}` + listPriceDetail += `\n${priceDetail}` + }) + return listPriceDetail +} + +function requestPrice(share_url, callback) { + const options = { url: "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", headers: { "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" }, - body: "methodName=getBiJiaInfo_wxsmall&p_url=" + encodeURIComponent(shareUrl) + body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent("http://m.manmanbuy.com/redirect.aspx?webid=1&tourl=" + share_url) } $tool.post(options, function (error, response, data) { if (!error) { callback(JSON.parse(data)); - if (consoleLog) console.log("Data:\n" + data); + if (consolelog) console.log("Data:\n" + data); } else { callback(null, null); - if (consoleLog) console.log("Error:\n" + error); + if (consolelog) console.log("Error:\n" + error); } }) } -function lowerMsgs(data) { - const lower = data.lowerPriceyh - const lowerDate = dateFormat(data.lowerDateyh) - const lowerMsg = "〽️ 历史最低到手价: ¥" + String(lower) + " " + lowerDate - const curret_msg = (data.currentPriceStatus ? " 当前价格" + data.currentPriceStatus : "") + " (仅供参考)" - const lower1 = lowerMsg + curret_msg - return lower1 -} - function dateFormat(cellval) { const date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10)); const month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; From a2a6bd74f3efd25b7379998396d34e7eb54770c3 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sat, 15 Feb 2020 13:43:34 +0800 Subject: [PATCH 0060/1191] Update jd_price_lite.js --- jd_price_lite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index 7818b77ba..66fd990cc 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -4,7 +4,7 @@ README:https://github.com/yichahucha/surge/tree/master const path1 = "serverConfig"; const path2 = "wareBusiness"; -const log = false; +const consolelog = false; const url = $request.url; const body = $response.body; const $tool = tool(); From 7883e6d8f1e3b6060d3cf9a1900d916d3a693c02 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sat, 15 Feb 2020 13:46:49 +0800 Subject: [PATCH 0061/1191] Update tb_price_lite.js From d9805691f79358638dc3e03e94e9ee1f5ab5594c Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sat, 15 Feb 2020 18:03:16 +0800 Subject: [PATCH 0062/1191] Update jd_price_lite.js --- jd_price_lite.js | 70 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 61 insertions(+), 9 deletions(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index 66fd990cc..d6fca808d 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -25,7 +25,7 @@ if (url.indexOf(path2) != -1) { if (data) { if (data.ok == 1 && data.single) { const lower = lowerMsgs(data.single) - const detail = listPriceDetail(data.PriceRemark.ListPriceDetail) + const detail = priceSummary(data) const tip = data.PriceRemark.Tip + "(仅供参考)" $tool.notify("", "", `${lower} ${tip}\n${detail}\n\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) } @@ -43,22 +43,74 @@ function lowerMsgs(data) { return lowerMsg } -function listPriceDetail(list) { - let listPriceDetail = "" - list.forEach((item, index) => { +function priceSummary(data) { + let summary = "" + let listPriceDetail = data.PriceRemark.ListPriceDetail + listPriceDetail.pop() + listPriceDetail.forEach((item, index) => { if (index == 2) { item.Name = "双十一价格" } else if (index == 3) { item.Name = "六一八价格" } else if (index == 4) { item.Name = "三十天最低" - } else if (index == 5) { - item.Name = "三十天平均" } - const priceDetail = `${item.Name} ${item.Price} ${item.Date} ${item.Difference}` - listPriceDetail += `\n${priceDetail}` + summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` }) - return listPriceDetail + historySummary(data.single).forEach((item) => { + summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` + }); + return summary +} + +function historySummary(single) { + const rexMatch = /\[.*?\]/g; + const rexExec = /\[(.*),(.*),"(.*)"\]/; + let currentPrice, lowest60, lowest180, lowest360 + let list = single.jiagequshiyh.match(rexMatch); + list = list.reverse().slice(0, 360); + list.forEach((item, index) => { + if (item.length > 0) { + const result = rexExec.exec(item); + const dateUTC = new Date(eval(result[1])); + const date = dateUTC.format("yyyy-MM-dd"); + let price = parseFloat(result[2]); + if (index == 0) { + currentPrice = price + lowest60 = { Name: "六十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest180 = { Name: "一百八最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest360 = { Name: "三百六最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + } + if (index < 60 && price < lowest60.price) { + lowest60.price = price + lowest60.Price = `¥${String(price)}` + lowest60.Date = date + lowest60.Difference = difference(currentPrice, price) + } + if (index < 180 && price < lowest180.price) { + lowest180.price = price + lowest180.Price = `¥${String(price)}` + lowest180.Date = date + lowest180.Difference = difference(currentPrice, price) + } + if (index < 360 && price < lowest360.price) { + lowest360.price = price + lowest360.Price = `¥${String(price)}` + lowest360.Date = date + lowest360.Difference = difference(currentPrice, price) + } + } + }); + return [lowest60, lowest180, lowest360]; +} + +function difference(currentPrice, price) { + let difference = currentPrice - price + if (difference == 0) { + return "-" + } else { + return `${difference > 0 ? "↑" : "↓"}${String(difference)}` + } } function request_history_price(share_url, callback) { From 264010fe2bab3d140f86c193a9e7cfff8c432984 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sat, 15 Feb 2020 18:06:51 +0800 Subject: [PATCH 0063/1191] Update tb_price_lite.js --- tb_price_lite.js | 70 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 61 insertions(+), 9 deletions(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index fb3813d85..362b5538f 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -36,7 +36,7 @@ if (url.indexOf(path2) != -1) { if (data) { if (data.ok == 1 && data.single) { const lower = lowerMsgs(data.single) - const detail = listPriceDetail(data.PriceRemark.ListPriceDetail) + const detail = priceSummary(data) const tip = data.PriceRemark.Tip + "(仅供参考)" $tool.notify("", "", `${lower} ${tip}\n${detail}\n\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) } @@ -54,22 +54,74 @@ function lowerMsgs(data) { return lowerMsg } -function listPriceDetail(list) { - let listPriceDetail = "" - list.forEach((item, index) => { +function priceSummary(data) { + let summary = "" + let listPriceDetail = data.PriceRemark.ListPriceDetail + listPriceDetail.pop() + listPriceDetail.forEach((item, index) => { if (index == 2) { item.Name = "双十一价格" } else if (index == 3) { item.Name = "六一八价格" } else if (index == 4) { item.Name = "三十天最低" - } else if (index == 5) { - item.Name = "三十天平均" } - const priceDetail = `${item.Name} ${item.Price} ${item.Date} ${item.Difference}` - listPriceDetail += `\n${priceDetail}` + summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` }) - return listPriceDetail + historySummary(data.single).forEach((item) => { + summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` + }); + return summary +} + +function historySummary(single) { + const rexMatch = /\[.*?\]/g; + const rexExec = /\[(.*),(.*),"(.*)"\]/; + let currentPrice, lowest60, lowest180, lowest360 + let list = single.jiagequshiyh.match(rexMatch); + list = list.reverse().slice(0, 360); + list.forEach((item, index) => { + if (item.length > 0) { + const result = rexExec.exec(item); + const dateUTC = new Date(eval(result[1])); + const date = dateUTC.format("yyyy-MM-dd"); + let price = parseFloat(result[2]); + if (index == 0) { + currentPrice = price + lowest60 = { Name: "六十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest180 = { Name: "一百八最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest360 = { Name: "三百六最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + } + if (index < 60 && price < lowest60.price) { + lowest60.price = price + lowest60.Price = `¥${String(price)}` + lowest60.Date = date + lowest60.Difference = difference(currentPrice, price) + } + if (index < 180 && price < lowest180.price) { + lowest180.price = price + lowest180.Price = `¥${String(price)}` + lowest180.Date = date + lowest180.Difference = difference(currentPrice, price) + } + if (index < 360 && price < lowest360.price) { + lowest360.price = price + lowest360.Price = `¥${String(price)}` + lowest360.Date = date + lowest360.Difference = difference(currentPrice, price) + } + } + }); + return [lowest60, lowest180, lowest360]; +} + +function difference(currentPrice, price) { + let difference = currentPrice - price + if (difference == 0) { + return "-" + } else { + return `${difference > 0 ? "↑" : "↓"}${String(difference)}` + } } function requestPrice(share_url, callback) { From 6aa4a451ae959b239943616936b0ef204f89799b Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sat, 15 Feb 2020 18:21:39 +0800 Subject: [PATCH 0064/1191] Update jd_price_lite.js --- jd_price_lite.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index d6fca808d..c5c70a0e5 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -105,7 +105,7 @@ function historySummary(single) { } function difference(currentPrice, price) { - let difference = currentPrice - price + let difference = strip(currentPrice - price) if (difference == 0) { return "-" } else { @@ -113,6 +113,10 @@ function difference(currentPrice, price) { } } +function strip(num, precision = 12) { + return +parseFloat(num.toPrecision(precision)); +} + function request_history_price(share_url, callback) { const options = { url: "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", From 304e68f668a041c144a1d1efb90aab0ec06d98ad Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sat, 15 Feb 2020 18:22:05 +0800 Subject: [PATCH 0065/1191] Update tb_price_lite.js --- tb_price_lite.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index 362b5538f..425edc674 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -116,7 +116,7 @@ function historySummary(single) { } function difference(currentPrice, price) { - let difference = currentPrice - price + let difference = strip(currentPrice - price) if (difference == 0) { return "-" } else { @@ -124,6 +124,10 @@ function difference(currentPrice, price) { } } +function strip(num, precision = 12) { + return +parseFloat(num.toPrecision(precision)); +} + function requestPrice(share_url, callback) { const options = { url: "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", From 67347c25dabb528a8af3e92006cc2f9fa92bddaa Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sat, 15 Feb 2020 18:55:18 +0800 Subject: [PATCH 0066/1191] Update jd_price.js --- jd_price.js | 130 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 78 insertions(+), 52 deletions(-) diff --git a/jd_price.js b/jd_price.js index 5d62cd359..543d2fab7 100644 --- a/jd_price.js +++ b/jd_price.js @@ -4,7 +4,7 @@ README:https://github.com/yichahucha/surge/tree/master const path1 = "serverConfig"; const path2 = "wareBusiness"; -const console_log = false; +const consolelog = false; const url = $request.url; const body = $response.body; const $tool = tool(); @@ -38,13 +38,11 @@ if (url.indexOf(path2) != -1) { } } if (data.ok == 1 && data.single) { - const price_msgs = history_price_msg(data.single) - const historyword = adword_obj(); - lowerword.data.ad.adword = price_msgs[0]; - historyword.data.ad.adword = price_msgs[1]; - historyword.data.ad.textColor = "#FE9900"; + const lower = lowerMsgs(data.single) + const detail = priceSummary(data) + const tip = data.PriceRemark.Tip + "(仅供参考)" + lowerword.data.ad.adword = `${lower} ${tip}\n${detail}`; floors.insert(bestIndex, lowerword); - floors.insert(bestIndex + 1, historyword); } if (data.ok == 0 && data.msg.length > 0) { lowerword.data.ad.adword = "⚠️ " + data.msg; @@ -57,49 +55,85 @@ if (url.indexOf(path2) != -1) { }) } -function history_price_msg(data) { - const rex_match = /\[.*?\]/g; - const rex_exec = /\[(.*),(.*),"(.*)"\]/; - const lower = data.lowerPriceyh; - const lower_date = changeDateFormat(data.lowerDateyh); - const lower_msg = "‼️ 历史最低到手价: ¥" + String(lower) + " " + lower_date - const curret_msg = (data.currentPriceStatus ? " 当前价格" + data.currentPriceStatus : "") + " (仅供参考)"; - const lower_price_msg = lower_msg + curret_msg; - const riqi = "日期: "; - const jiage = "价格: "; - const youhui = "活动: "; - const title_msg = "〽️ 历史价格走势"; - const title_table_msg = riqi + get_blank_space(25 - riqi.length) + jiage + get_blank_space(25 - jiage.length) + youhui; - let history_price_msg = ""; - let start_date = ""; - let end_date = ""; - let date_range_msg = `(最近一年)`; - let list = data.jiagequshiyh.match(rex_match); - list = list.reverse().slice(0, 365); +function lowerMsgs(data) { + const lower = data.lowerPriceyh + const lowerDate = dateFormat(data.lowerDateyh) + const lowerMsg = "〽️历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` + return lowerMsg +} + +function priceSummary(data) { + let summary = "" + let listPriceDetail = data.PriceRemark.ListPriceDetail + listPriceDetail.pop() + listPriceDetail.forEach((item, index) => { + if (index == 2) { + item.Name = "双十一价格" + } else if (index == 3) { + item.Name = "六一八价格" + } else if (index == 4) { + item.Name = "三十天最低" + } + summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` + }) + historySummary(data.single).forEach((item) => { + summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` + }); + return summary +} + +function historySummary(single) { + const rexMatch = /\[.*?\]/g; + const rexExec = /\[(.*),(.*),"(.*)"\]/; + let currentPrice, lowest60, lowest180, lowest360 + let list = single.jiagequshiyh.match(rexMatch); + list = list.reverse().slice(0, 360); list.forEach((item, index) => { if (item.length > 0) { - const result = rex_exec.exec(item); + const result = rexExec.exec(item); const dateUTC = new Date(eval(result[1])); const date = dateUTC.format("yyyy-MM-dd"); + let price = parseFloat(result[2]); if (index == 0) { - end_date = date; + currentPrice = price + lowest60 = { Name: "六十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest180 = { Name: "一百八最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest360 = { Name: "三百六最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + } + if (index < 60 && price <= lowest60.price) { + lowest60.price = price + lowest60.Price = `¥${String(price)}` + lowest60.Date = date + lowest60.Difference = difference(currentPrice, price) } - if (index == list.length - 1) { - start_date = date; + if (index < 180 && price <= lowest180.price) { + lowest180.price = price + lowest180.Price = `¥${String(price)}` + lowest180.Date = date + lowest180.Difference = difference(currentPrice, price) } - let price = result[2]; - price = "¥" + String(parseFloat(price)); - if (date == lower_date) { - price += "❗️" + if (index < 360 && price <= lowest360.price) { + lowest360.price = price + lowest360.Price = `¥${String(price)}` + lowest360.Date = date + lowest360.Difference = difference(currentPrice, price) } - const sale = result[3]; - const msg = date + get_blank_space(20 - date.length) + price + get_blank_space(15 - price.length) + sale + "\n"; - history_price_msg += msg; } }); - // date_range_msg = `(${start_date} ~ ${end_date})`; - const price_msg = title_msg + " " + date_range_msg + "\n\n" + title_table_msg + "\n" + history_price_msg; - return [lower_price_msg, price_msg]; + return [lowest60, lowest180, lowest360]; +} + +function difference(currentPrice, price) { + let difference = strip(currentPrice - price) + if (difference == 0) { + return "-" + } else { + return `${difference > 0 ? "↑" : "↓"}${String(difference)}` + } +} + +function strip(num, precision = 12) { + return +parseFloat(num.toPrecision(precision)); } function request_history_price(share_url, callback) { @@ -109,34 +143,26 @@ function request_history_price(share_url, callback) { "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" }, - body: "methodName=getBiJiaInfo_wxsmall&p_url=" + encodeURIComponent(share_url) + body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent("http://m.manmanbuy.com/redirect.aspx?webid=1&tourl=" + share_url) } $tool.post(options, function (error, response, data) { if (!error) { callback(JSON.parse(data)); - if (console_log) console.log("Data:\n" + data); + if (consolelog) console.log("Data:\n" + data); } else { callback(null, null); - if (console_log) console.log("Error:\n" + error); + if (consolelog) console.log("Error:\n" + error); } }) } -function changeDateFormat(cellval) { +function dateFormat(cellval) { const date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10)); const month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; const currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); return date.getFullYear() + "-" + month + "-" + currentDate; } -function get_blank_space(length) { - let blank = ""; - for (let index = 0; index < length; index++) { - blank += " "; - } - return blank; -} - function adword_obj() { return { "bId": "eCustom_flo_199", From 62ef81860c4dc0f873a846656ee6b0bf792d1c7d Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sat, 15 Feb 2020 18:57:21 +0800 Subject: [PATCH 0067/1191] Update jd_price_lite.js --- jd_price_lite.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index c5c70a0e5..553a3866c 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -81,19 +81,19 @@ function historySummary(single) { lowest180 = { Name: "一百八最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } lowest360 = { Name: "三百六最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } } - if (index < 60 && price < lowest60.price) { + if (index < 60 && price <= lowest60.price) { lowest60.price = price lowest60.Price = `¥${String(price)}` lowest60.Date = date lowest60.Difference = difference(currentPrice, price) } - if (index < 180 && price < lowest180.price) { + if (index < 180 && price <= lowest180.price) { lowest180.price = price lowest180.Price = `¥${String(price)}` lowest180.Date = date lowest180.Difference = difference(currentPrice, price) } - if (index < 360 && price < lowest360.price) { + if (index < 360 && price <= lowest360.price) { lowest360.price = price lowest360.Price = `¥${String(price)}` lowest360.Date = date From 71a1b481cfea330412b8da3b92a96ef51d022bfb Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sat, 15 Feb 2020 18:58:05 +0800 Subject: [PATCH 0068/1191] Update tb_price_lite.js --- tb_price_lite.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index 425edc674..d8fbedf05 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -92,19 +92,19 @@ function historySummary(single) { lowest180 = { Name: "一百八最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } lowest360 = { Name: "三百六最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } } - if (index < 60 && price < lowest60.price) { + if (index < 60 && price <= lowest60.price) { lowest60.price = price lowest60.Price = `¥${String(price)}` lowest60.Date = date lowest60.Difference = difference(currentPrice, price) } - if (index < 180 && price < lowest180.price) { + if (index < 180 && price <= lowest180.price) { lowest180.price = price lowest180.Price = `¥${String(price)}` lowest180.Date = date lowest180.Difference = difference(currentPrice, price) } - if (index < 360 && price < lowest360.price) { + if (index < 360 && price <= lowest360.price) { lowest360.price = price lowest360.Price = `¥${String(price)}` lowest360.Date = date From b564acc79ca1d39b4e6f28c28132e8138c0f3ee8 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sat, 15 Feb 2020 19:29:42 +0800 Subject: [PATCH 0069/1191] Update tb_price.js --- tb_price.js | 137 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 90 insertions(+), 47 deletions(-) diff --git a/tb_price.js b/tb_price.js index d9c51be8f..7abc7323b 100644 --- a/tb_price.js +++ b/tb_price.js @@ -49,13 +49,13 @@ if (url.indexOf(path2) != -1) { let historyItem = customItem() if (data.ok == 1 && data.single) { const lower = lowerMsgs(data.single) - const result = historyItems(data.single) - const tbitems = result[1] + const tbitems = priceSummary(data) + const tip = data.PriceRemark.Tip service.items = service.items.concat(nonService.items) - historyItem.desc = lower[0] + historyItem.desc = `${lower[0]} ${tip}` + "(仅供参考)" historyItem.title = lower[1] service.items.unshift(historyItem) - nonService.title = "价格走势" + nonService.title = "价格详情" nonService.items = tbitems } if (data.ok == 0 && data.msg.length > 0) { @@ -73,67 +73,110 @@ if (url.indexOf(path2) != -1) { } } -function requestPrice(shareUrl, callback) { - let options = { - url: "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", - headers: { - "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", - "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" - }, - body: "methodName=getBiJiaInfo_wxsmall&p_url=" + encodeURIComponent(shareUrl) - } - $tool.post(options, function (error, response, data) { - if (!error) { - callback(JSON.parse(data)); - if (consoleLog) console.log("Data:\n" + data); - } else { - callback(null, null); - if (consoleLog) console.log("Error:\n" + error); - } - }) -} - function lowerMsgs(data) { const lower = data.lowerPriceyh const lowerDate = dateFormat(data.lowerDateyh) - const lowerMsg = "历史最低到手价: ¥" + String(lower) + " " + lowerDate - const curret_msg = (data.currentPriceStatus ? " 当前价格" + data.currentPriceStatus : "") + " (仅供参考)" - const lower1 = lowerMsg + curret_msg - const lower2 = "历史最低¥" + String(lower) - return [lower1, lower2] + const lowerMsg = "最低到手价:¥" + String(lower) + `(${lowerDate})` + const lowerMsg1 = "历史最低¥" + String(lower) + return [lowerMsg, lowerMsg1] } -function historyItems(data) { +function priceSummary(data) { + let tbitems = [] + let summary = "" + let listPriceDetail = data.PriceRemark.ListPriceDetail + listPriceDetail.pop() + let list = listPriceDetail.concat(historySummary(data.single)) + list.forEach((item, index) => { + if (index == 2) { + item.Name = "双十一价格" + } else if (index == 3) { + item.Name = "六一八价格" + } else if (index == 4) { + item.Name = "三十天最低" + } + summary = `${item.Name}${getSpace(5)}${item.Price}${getSpace(5)}${item.Date}${getSpace(5)}${item.Difference}` + tbitem = { + icon: "https://i.loli.net/2020/02/14/7cDhsIYpgbZL9ln.png", + title: summary + } + tbitems.push(tbitem) + }) + return tbitems +} + +function historySummary(single) { const rexMatch = /\[.*?\]/g; const rexExec = /\[(.*),(.*),"(.*)"\]/; - let list = data.jiagequshiyh.match(rexMatch); - let tbitems = []; - let startDate = ""; - let endDate = ""; - list = list.reverse().slice(0, 365); + let currentPrice, lowest60, lowest180, lowest360 + let list = single.jiagequshiyh.match(rexMatch); + list = list.reverse().slice(0, 360); list.forEach((item, index) => { if (item.length > 0) { const result = rexExec.exec(item); const dateUTC = new Date(eval(result[1])); const date = dateUTC.format("yyyy-MM-dd"); + let price = parseFloat(result[2]); if (index == 0) { - endDate = date; + currentPrice = price + lowest60 = { Name: "六十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest180 = { Name: "一百八最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest360 = { Name: "三百六最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + } + if (index < 60 && price <= lowest60.price) { + lowest60.price = price + lowest60.Price = `¥${String(price)}` + lowest60.Date = date + lowest60.Difference = difference(currentPrice, price) } - if (index == list.length - 1) { - startDate = date; + if (index < 180 && price <= lowest180.price) { + lowest180.price = price + lowest180.Price = `¥${String(price)}` + lowest180.Date = date + lowest180.Difference = difference(currentPrice, price) } - let price = result[2]; - price = "¥" + String(parseFloat(price)); - const msg = date + getSpace(50 - date.length) + price; - tbitem = { - icon: "https://i.loli.net/2020/02/14/7cDhsIYpgbZL9ln.png", - title: msg + if (index < 360 && price <= lowest360.price) { + lowest360.price = price + lowest360.Price = `¥${String(price)}` + lowest360.Date = date + lowest360.Difference = difference(currentPrice, price) } - tbitems.push(tbitem); } }); - const dateMsg = `(${startDate} ~ ${endDate})`; - return [dateMsg, tbitems]; + return [lowest60, lowest180, lowest360]; +} + +function difference(currentPrice, price) { + let difference = strip(currentPrice - price) + if (difference == 0) { + return "-" + } else { + return `${difference > 0 ? "↑" : "↓"}${String(difference)}` + } +} + +function strip(num, precision = 12) { + return +parseFloat(num.toPrecision(precision)); +} + +function requestPrice(share_url, callback) { + const options = { + url: "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", + headers: { + "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" + }, + body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent("http://m.manmanbuy.com/redirect.aspx?webid=1&tourl=" + share_url) + } + $tool.post(options, function (error, response, data) { + if (!error) { + callback(JSON.parse(data)); + if (consolelog) console.log("Data:\n" + data); + } else { + callback(null, null); + if (consolelog) console.log("Error:\n" + error); + } + }) } function dateFormat(cellval) { From 3f075bce84d8a04335fff0c11c3d0d99b2dd284d Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sat, 15 Feb 2020 19:34:48 +0800 Subject: [PATCH 0070/1191] Update jd_price.js --- jd_price.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/jd_price.js b/jd_price.js index 543d2fab7..db7cd6d75 100644 --- a/jd_price.js +++ b/jd_price.js @@ -66,7 +66,8 @@ function priceSummary(data) { let summary = "" let listPriceDetail = data.PriceRemark.ListPriceDetail listPriceDetail.pop() - listPriceDetail.forEach((item, index) => { + let list = listPriceDetail.concat(historySummary(data.single)) + list.forEach((item, index) => { if (index == 2) { item.Name = "双十一价格" } else if (index == 3) { @@ -74,11 +75,8 @@ function priceSummary(data) { } else if (index == 4) { item.Name = "三十天最低" } - summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` + summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date}${getSpace(8)}${item.Difference}` }) - historySummary(data.single).forEach((item) => { - summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` - }); return summary } @@ -163,6 +161,14 @@ function dateFormat(cellval) { return date.getFullYear() + "-" + month + "-" + currentDate; } +function getSpace(length) { + let blank = ""; + for (let index = 0; index < length; index++) { + blank += " "; + } + return blank; +} + function adword_obj() { return { "bId": "eCustom_flo_199", From b8a3ca6a013f7beb028ead1d29e4daf691b264f0 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sat, 15 Feb 2020 19:40:18 +0800 Subject: [PATCH 0071/1191] Update jd_price_lite.js --- jd_price_lite.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index 553a3866c..e61aa138a 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -47,7 +47,8 @@ function priceSummary(data) { let summary = "" let listPriceDetail = data.PriceRemark.ListPriceDetail listPriceDetail.pop() - listPriceDetail.forEach((item, index) => { + let list = listPriceDetail.concat(historySummary(data.single)) + list.forEach((item, index) => { if (index == 2) { item.Name = "双十一价格" } else if (index == 3) { From f0a2756f284149dfed65d57ad4e7f169d2255d54 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sat, 15 Feb 2020 19:40:43 +0800 Subject: [PATCH 0072/1191] Update tb_price_lite.js --- tb_price_lite.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index d8fbedf05..2d694a742 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -58,7 +58,8 @@ function priceSummary(data) { let summary = "" let listPriceDetail = data.PriceRemark.ListPriceDetail listPriceDetail.pop() - listPriceDetail.forEach((item, index) => { + let list = listPriceDetail.concat(historySummary(data.single)) + list.forEach((item, index) => { if (index == 2) { item.Name = "双十一价格" } else if (index == 3) { @@ -68,9 +69,6 @@ function priceSummary(data) { } summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` }) - historySummary(data.single).forEach((item) => { - summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` - }); return summary } From 618b77c0b008009c1b58494e825d50265465c2a5 Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sat, 15 Feb 2020 19:41:44 +0800 Subject: [PATCH 0073/1191] Update jd_price_lite.js --- jd_price_lite.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index e61aa138a..ccbdf7b48 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -58,9 +58,6 @@ function priceSummary(data) { } summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` }) - historySummary(data.single).forEach((item) => { - summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` - }); return summary } From 3aa88f2a828faef51506acf4235ea362c8f28c30 Mon Sep 17 00:00:00 2001 From: goose Date: Sat, 15 Feb 2020 20:39:18 +0800 Subject: [PATCH 0074/1191] fix --- jd_price.js | 2 +- jd_price_lite.js | 2 +- tb_price.js | 2 +- tb_price_lite.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jd_price.js b/jd_price.js index db7cd6d75..e3d704773 100644 --- a/jd_price.js +++ b/jd_price.js @@ -141,7 +141,7 @@ function request_history_price(share_url, callback) { "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" }, - body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent("http://m.manmanbuy.com/redirect.aspx?webid=1&tourl=" + share_url) + body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent(share_url) } $tool.post(options, function (error, response, data) { if (!error) { diff --git a/jd_price_lite.js b/jd_price_lite.js index ccbdf7b48..401227b86 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -122,7 +122,7 @@ function request_history_price(share_url, callback) { "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" }, - body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent("http://m.manmanbuy.com/redirect.aspx?webid=1&tourl=" + share_url) + body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent(share_url) } $tool.post(options, function (error, response, data) { if (!error) { diff --git a/tb_price.js b/tb_price.js index 7abc7323b..78e722cbb 100644 --- a/tb_price.js +++ b/tb_price.js @@ -166,7 +166,7 @@ function requestPrice(share_url, callback) { "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" }, - body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent("http://m.manmanbuy.com/redirect.aspx?webid=1&tourl=" + share_url) + body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent(share_url) } $tool.post(options, function (error, response, data) { if (!error) { diff --git a/tb_price_lite.js b/tb_price_lite.js index 2d694a742..e863f135a 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -133,7 +133,7 @@ function requestPrice(share_url, callback) { "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" }, - body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent("http://m.manmanbuy.com/redirect.aspx?webid=1&tourl=" + share_url) + body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent(share_url) } $tool.post(options, function (error, response, data) { if (!error) { From db81d36788c401177bc7d753993d00741b6e1f3d Mon Sep 17 00:00:00 2001 From: goose Date: Sun, 16 Feb 2020 12:03:26 +0800 Subject: [PATCH 0075/1191] fix --- tb_price.js | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/tb_price.js b/tb_price.js index 78e722cbb..23184cf1a 100644 --- a/tb_price.js +++ b/tb_price.js @@ -46,21 +46,17 @@ if (url.indexOf(path2) != -1) { requestPrice(shareUrl, function (data) { if (data) { - let historyItem = customItem() if (data.ok == 1 && data.single) { const lower = lowerMsgs(data.single) const tbitems = priceSummary(data) const tip = data.PriceRemark.Tip service.items = service.items.concat(nonService.items) - historyItem.desc = `${lower[0]} ${tip}` + "(仅供参考)" - historyItem.title = lower[1] - service.items.unshift(historyItem) + service.items.unshift(customItem(lower[1], `${lower[0]} ${tip}` + "(仅供参考)")) nonService.title = "价格详情" nonService.items = tbitems } if (data.ok == 0 && data.msg.length > 0) { - historyItem.desc = data.msg - service.items.push(historyItem) + service.items.unshift(customItem("历史价格", data.msg)) } apiStack.value = JSON.stringify(value) $done({ body: JSON.stringify(obj) }) @@ -95,12 +91,8 @@ function priceSummary(data) { } else if (index == 4) { item.Name = "三十天最低" } - summary = `${item.Name}${getSpace(5)}${item.Price}${getSpace(5)}${item.Date}${getSpace(5)}${item.Difference}` - tbitem = { - icon: "https://i.loli.net/2020/02/14/7cDhsIYpgbZL9ln.png", - title: summary - } - tbitems.push(tbitem) + summary = `${item.Name}${getSpace(10)}${item.Price}${getSpace(10)}${item.Date}` + tbitems.push(customItem(summary)) }) return tbitems } @@ -194,11 +186,11 @@ function getSpace(length) { return blank; } -function customItem() { +function customItem(title, desc) { return { - icon: "https://i.loli.net/2020/02/14/wFb2rheIPnQxS1R.png", - title: "历史价格", - desc: "" + icon: "https://s2.ax1x.com/2020/02/16/3STeIJ.png", + title: title, + desc: desc } } From 417b1155de7b7c7e9e2c0f0a99040ab737340b5b Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sun, 16 Feb 2020 12:48:53 +0800 Subject: [PATCH 0076/1191] Update README.md --- README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 6a4f59766..2f8ce13a8 100644 --- a/README.md +++ b/README.md @@ -32,22 +32,22 @@ hostname = api.m.jd.com Display taobao historical price(提供两种方式,根据需求二选一) ``` -# 使用规则屏蔽指定 IP 段,有可能误伤其他功能或者应用,可以自己抓包缩小 IP 范围,随时生效 -[Rule] -IP-CIDR, 203.119.144.0/23, REJECT, no-resolve -IP-CIDR, 203.119.175.0/24, REJECT, no-resolve -IP-CIDR, 106.11.162.0/24, REJECT, no-resolve -IP-CIDR, 47.102.83.0/24, REJECT, no-resolve +# 使用脚本删除对应 IP,不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [Script] +http-response ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` ``` -# 使用脚本删除对应 IP,不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 +# 使用规则屏蔽指定 IP 段,有可能误伤其他功能或者应用,可以自己抓包缩小 IP 范围,随时生效 +[Rule] +IP-CIDR, 203.119.144.0/23, REJECT, no-resolve +IP-CIDR, 203.119.175.0/24, REJECT, no-resolve +IP-CIDR, 106.11.162.0/24, REJECT, no-resolve +IP-CIDR, 47.102.83.0/24, REJECT, no-resolve [Script] -http-response ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com @@ -89,22 +89,22 @@ hostname = api.m.jd.com Display taobao historical price(提供两种方式,根据需求二选一) ``` -# 使用规则屏蔽指定 IP 段,有可能误伤其他功能或者应用,可以自己抓包缩小 IP 范围,随时生效 -[filter_local] -ip-cidr, 203.119.144.0/23, reject -ip-cidr, 203.119.175.0/24, reject -ip-cidr, 106.11.162.0/24, reject -ip-cidr, 47.102.83.0/24, reject +# 使用脚本删除对应 IP,不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [rewrite_local] +^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body tb_price.js ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js [mitm] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` ``` -# 使用脚本删除对应 IP,不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 +# 使用规则屏蔽指定 IP 段,有可能误伤其他功能或者应用,可以自己抓包缩小 IP 范围,随时生效 +[filter_local] +ip-cidr, 203.119.144.0/23, reject +ip-cidr, 203.119.175.0/24, reject +ip-cidr, 106.11.162.0/24, reject +ip-cidr, 47.102.83.0/24, reject [rewrite_local] -^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body tb_price.js ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js [mitm] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com From c9b9ab958afd9d957c06a187dce1cbfb2a85704f Mon Sep 17 00:00:00 2001 From: bird <12595948+yichahucha@users.noreply.github.com> Date: Sun, 16 Feb 2020 18:13:36 +0800 Subject: [PATCH 0077/1191] Update wb_ad.js --- wb_ad.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/wb_ad.js b/wb_ad.js index a510c655e..ace0861ec 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -149,14 +149,16 @@ function filter_timeline_cards(cards) { while (i--) { let card_group_item = card_group[i]; let card_type = card_group_item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); - } else if (card_type && card_type == 118) { - card_group.splice(i, 1); - } else if (card_type && card_type == 42) { - if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { - cards.splice(j, 1); - break; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { + cards.splice(j, 1); + break; + } } } } From d941c9fcdde875001c1314b6665f3fd32546b27c Mon Sep 17 00:00:00 2001 From: goose Date: Tue, 18 Feb 2020 22:47:28 +0800 Subject: [PATCH 0078/1191] optimize --- check_in.js | 66 ++++++++++++++++++----------------- tb_price.js | 91 ++++++++++++++++++++---------------------------- tb_price_lite.js | 71 +++++++++++++++++++++++-------------- tool.js | 61 ++++++++++++++++++++++++++++++-- 4 files changed, 174 insertions(+), 115 deletions(-) diff --git a/check_in.js b/check_in.js index a68255315..00792d523 100644 --- a/check_in.js +++ b/check_in.js @@ -3,7 +3,7 @@ README:https://github.com/yichahucha/surge/tree/master 每日打卡提醒(corn "0 9,18 * * 1-5" 周一到周五,早九晚六)+ 每日壹句(有道词典)+ 跳转钉钉打卡页面(下拉通知点击链接) */ -const $tool = new tool() +const $tool = new Tool() $tool.get('https://dict.youdao.com/infoline/style/cardList?mode=publish&client=mobile&style=daily&size=2', function (error, response, data) { let obj = JSON.parse(data); let date = new Date(); @@ -21,11 +21,8 @@ $tool.get('https://dict.youdao.com/infoline/style/cardList?mode=publish&client=m $done(); }) -function tool() { - this.isSurge = typeof $httpClient != "undefined" - this.isQuanX = typeof $task != "undefined" - this.isResponse = typeof $response != "undefined" - const node = (() => { +function Tool() { + _node = (() => { if (typeof require == "function") { const request = require('request') return ({ request }) @@ -33,45 +30,50 @@ function tool() { return (null) } })() + _isSurge = typeof $httpClient != "undefined" + _isQuanX = typeof $task != "undefined" + this.isSurge = _isSurge + this.isQuanX = _isQuanX + this.isResponse = typeof $response != "undefined" this.notify = (title, subtitle, message) => { - if (this.isQuanX) $notify(title, subtitle, message) - if (this.isSurge) $notification.post(title, subtitle, message) - if (node) console.log(JSON.stringify({ title, subtitle, message })); + if (_isQuanX) $notify(title, subtitle, message) + if (_isSurge) $notification.post(title, subtitle, message) + if (_node) console.log(JSON.stringify({ title, subtitle, message })); } this.write = (value, key) => { - if (this.isQuanX) return $prefs.setValueForKey(value, key) - if (this.isSurge) return $persistentStore.write(value, key) + if (_isQuanX) return $prefs.setValueForKey(value, key) + if (_isSurge) return $persistentStore.write(value, key) } this.read = (key) => { - if (this.isQuanX) return $prefs.valueForKey(key) - if (this.isSurge) return $persistentStore.read(key) - } - const adapterStatus = (response) => { - if (response) { - if (response.status) { - response["statusCode"] = response.status - } else if (response.statusCode) { - response["status"] = response.statusCode - } - } - return response + if (_isQuanX) return $prefs.valueForKey(key) + if (_isSurge) return $persistentStore.read(key) } this.get = (options, callback) => { - if (this.isQuanX) { + if (_isQuanX) { if (typeof options == "string") options = { url: options } options["method"] = "GET" - $task.fetch(options).then(response => { callback(null, adapterStatus(response), response.body) }, reason => callback(reason.error, null, null)) + $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) } - if (this.isSurge) $httpClient.get(options, (error, response, body) => { callback(error, adapterStatus(response), body) }) - if (node) node.request(options, (error, response, body) => { callback(error, adapterStatus(response), body) }) + if (_isSurge) $httpClient.get(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request(options, (error, response, body) => { callback(error, _status(response), body) }) } this.post = (options, callback) => { - if (this.isQuanX) { + if (_isQuanX) { if (typeof options == "string") options = { url: options } options["method"] = "POST" - $task.fetch(options).then(response => { callback(null, adapterStatus(response), response.body) }, reason => callback(reason.error, null, null)) + $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) + } + if (_isSurge) $httpClient.post(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request.post(options, (error, response, body) => { callback(error, _status(response), body) }) + } + _status = (response) => { + if (response) { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } } - if (this.isSurge) $httpClient.post(options, (error, response, body) => { callback(error, adapterStatus(response), body) }) - if (node) node.request.post(options, (error, response, body) => { callback(error, adapterStatus(response), body) }) + return response } -} +} \ No newline at end of file diff --git a/tb_price.js b/tb_price.js index 23184cf1a..62d2e27f6 100644 --- a/tb_price.js +++ b/tb_price.js @@ -2,7 +2,7 @@ README:https://github.com/yichahucha/surge/tree/master */ -const $tool = tool() +const $tool = new Tool() const $base64 = new Base64() const consoleLog = false const url = $request.url @@ -248,11 +248,8 @@ Date.prototype.format = function (fmt) { return fmt; } -function tool() { - const isSurge = typeof $httpClient != "undefined" - const isQuanX = typeof $task != "undefined" - const isResponse = typeof $response != "undefined" - const node = (() => { +function Tool() { + _node = (() => { if (typeof require == "function") { const request = require('request') return ({ request }) @@ -260,66 +257,52 @@ function tool() { return (null) } })() - const notify = (title, subtitle, message) => { - if (isQuanX) $notify(title, subtitle, message) - if (isSurge) $notification.post(title, subtitle, message) - if (node) console.log(JSON.stringify({ title, subtitle, message })); + _isSurge = typeof $httpClient != "undefined" + _isQuanX = typeof $task != "undefined" + this.isSurge = _isSurge + this.isQuanX = _isQuanX + this.isResponse = typeof $response != "undefined" + this.notify = (title, subtitle, message) => { + if (_isQuanX) $notify(title, subtitle, message) + if (_isSurge) $notification.post(title, subtitle, message) + if (_node) console.log(JSON.stringify({ title, subtitle, message })); } - const write = (value, key) => { - if (isQuanX) return $prefs.setValueForKey(value, key) - if (isSurge) return $persistentStore.write(value, key) + this.write = (value, key) => { + if (_isQuanX) return $prefs.setValueForKey(value, key) + if (_isSurge) return $persistentStore.write(value, key) } - const read = (key) => { - if (isQuanX) return $prefs.valueForKey(key) - if (isSurge) return $persistentStore.read(key) + this.read = (key) => { + if (_isQuanX) return $prefs.valueForKey(key) + if (_isSurge) return $persistentStore.read(key) } - const adapterStatus = (response) => { - if (response) { - if (response.status) { - response["statusCode"] = response.status - } else if (response.statusCode) { - response["status"] = response.statusCode - } - } - return response - } - const get = (options, callback) => { - if (isQuanX) { + this.get = (options, callback) => { + if (_isQuanX) { if (typeof options == "string") options = { url: options } options["method"] = "GET" - $task.fetch(options).then(response => { - callback(null, adapterStatus(response), response.body) - }, reason => callback(reason.error, null, null)) - } - if (isSurge) $httpClient.get(options, (error, response, body) => { - callback(error, adapterStatus(response), body) - }) - if (node) { - node.request(options, (error, response, body) => { - callback(error, adapterStatus(response), body) - }) + $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) } + if (_isSurge) $httpClient.get(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request(options, (error, response, body) => { callback(error, _status(response), body) }) } - const post = (options, callback) => { - if (isQuanX) { + this.post = (options, callback) => { + if (_isQuanX) { if (typeof options == "string") options = { url: options } options["method"] = "POST" - $task.fetch(options).then(response => { - callback(null, adapterStatus(response), response.body) - }, reason => callback(reason.error, null, null)) - } - if (isSurge) { - $httpClient.post(options, (error, response, body) => { - callback(error, adapterStatus(response), body) - }) + $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) } - if (node) { - node.request.post(options, (error, response, body) => { - callback(error, adapterStatus(response), body) - }) + if (_isSurge) $httpClient.post(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request.post(options, (error, response, body) => { callback(error, _status(response), body) }) + } + _status = (response) => { + if (response) { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } } + return response } - return { isQuanX, isSurge, isResponse, notify, write, read, get, post } } function Base64() { diff --git a/tb_price_lite.js b/tb_price_lite.js index e863f135a..2d2f0c465 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -2,7 +2,7 @@ README:https://github.com/yichahucha/surge/tree/master */ -const $tool = tool() +const $tool = new Tool() const $base64 = new Base64() const consoleLog = false const url = $request.url @@ -186,44 +186,61 @@ Date.prototype.format = function (fmt) { return fmt; } -function tool() { - const isSurge = typeof $httpClient != "undefined" - const isQuanX = typeof $task != "undefined" - const notify = (title, subtitle, message) => { - if (isQuanX) $notify(title, subtitle, message) - if (isSurge) $notification.post(title, subtitle, message) +function Tool() { + _node = (() => { + if (typeof require == "function") { + const request = require('request') + return ({ request }) + } else { + return (null) + } + })() + _isSurge = typeof $httpClient != "undefined" + _isQuanX = typeof $task != "undefined" + this.isSurge = _isSurge + this.isQuanX = _isQuanX + this.isResponse = typeof $response != "undefined" + this.notify = (title, subtitle, message) => { + if (_isQuanX) $notify(title, subtitle, message) + if (_isSurge) $notification.post(title, subtitle, message) + if (_node) console.log(JSON.stringify({ title, subtitle, message })); } - const setCache = (value, key) => { - if (isQuanX) return $prefs.setValueForKey(value, key) - if (isSurge) return $persistentStore.write(value, key) + this.write = (value, key) => { + if (_isQuanX) return $prefs.setValueForKey(value, key) + if (_isSurge) return $persistentStore.write(value, key) } - const getCache = (key) => { - if (isQuanX) return $prefs.valueForKey(key) - if (isSurge) return $persistentStore.read(key) + this.read = (key) => { + if (_isQuanX) return $prefs.valueForKey(key) + if (_isSurge) return $persistentStore.read(key) } - const get = (options, callback) => { - if (isQuanX) { + this.get = (options, callback) => { + if (_isQuanX) { if (typeof options == "string") options = { url: options } options["method"] = "GET" - $task.fetch(options).then(response => { - response["status"] = response.statusCode - callback(null, response, response.body) - }, reason => callback(reason.error, null, null)) + $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) } - if (isSurge) $httpClient.get(options, callback) + if (_isSurge) $httpClient.get(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request(options, (error, response, body) => { callback(error, _status(response), body) }) } - const post = (options, callback) => { - if (isQuanX) { + this.post = (options, callback) => { + if (_isQuanX) { if (typeof options == "string") options = { url: options } options["method"] = "POST" - $task.fetch(options).then(response => { + $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) + } + if (_isSurge) $httpClient.post(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request.post(options, (error, response, body) => { callback(error, _status(response), body) }) + } + _status = (response) => { + if (response) { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { response["status"] = response.statusCode - callback(null, response, response.body) - }, reason => callback(reason.error, null, null)) + } } - if (isSurge) $httpClient.post(options, callback) + return response } - return { isQuanX, isSurge, notify, setCache, getCache, get, post } } function Base64() { diff --git a/tool.js b/tool.js index 35c66821f..236a0b9f1 100644 --- a/tool.js +++ b/tool.js @@ -1,7 +1,7 @@ // 统一 Surge、QuanX、Node 相关脚本 API, 方便开发、调试 // 包括 Node(request 模块)、Surge($httpClient,$notification,$persistentStore 模块)、QuanX($task,$notify,$prefs 模块) -const $tool = tool() +const $tool = new Tool() // notify $tool.notify("title", "subtitle", "message") // cache @@ -35,6 +35,63 @@ $tool.post(request, function (error, response, body) { } }) +function Tool() { + _node = (() => { + if (typeof require == "function") { + const request = require('request') + return ({ request }) + } else { + return (null) + } + })() + _isSurge = typeof $httpClient != "undefined" + _isQuanX = typeof $task != "undefined" + this.isSurge = _isSurge + this.isQuanX = _isQuanX + this.isResponse = typeof $response != "undefined" + this.notify = (title, subtitle, message) => { + if (_isQuanX) $notify(title, subtitle, message) + if (_isSurge) $notification.post(title, subtitle, message) + if (_node) console.log(JSON.stringify({ title, subtitle, message })); + } + this.write = (value, key) => { + if (_isQuanX) return $prefs.setValueForKey(value, key) + if (_isSurge) return $persistentStore.write(value, key) + } + this.read = (key) => { + if (_isQuanX) return $prefs.valueForKey(key) + if (_isSurge) return $persistentStore.read(key) + } + this.get = (options, callback) => { + if (_isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "GET" + $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) + } + if (_isSurge) $httpClient.get(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request(options, (error, response, body) => { callback(error, _status(response), body) }) + } + this.post = (options, callback) => { + if (_isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "POST" + $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) + } + if (_isSurge) $httpClient.post(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request.post(options, (error, response, body) => { callback(error, _status(response), body) }) + } + _status = (response) => { + if (response) { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } + } + return response + } +} + function tool() { const isSurge = typeof $httpClient != "undefined" const isQuanX = typeof $task != "undefined" @@ -107,4 +164,4 @@ function tool() { } } return { isQuanX, isSurge, isResponse, notify, write, read, get, post } -} +} \ No newline at end of file From 4f7b4e762b3bbec0935a43409338f627afc71d7c Mon Sep 17 00:00:00 2001 From: goose Date: Tue, 18 Feb 2020 22:53:43 +0800 Subject: [PATCH 0079/1191] optimize --- nf_rating.js | 95 +++++++++++++++++++++------------------------------- 1 file changed, 38 insertions(+), 57 deletions(-) diff --git a/nf_rating.js b/nf_rating.js index bca45dc0b..de65cd652 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -2,7 +2,7 @@ README:https://github.com/yichahucha/surge/tree/master */ -const $tool = tool() +const $tool = new Tool() const consoleLog = false; const imdbApikeyCacheKey = "IMDbApikey"; const netflixTitleCacheKey = "NetflixTitle"; @@ -82,7 +82,6 @@ function requestDoubanRating(imdbId) { if (consoleLog) console.log("Netflix Douban Rating URL:\n" + url); $tool.get(url, function (error, response, data) { if (!error) { - if (consoleLog) console.log("Netflix Douban Rating response:\n" + JSON.stringify(response)); if (consoleLog) console.log("Netflix Douban Rating Data:\n" + data); if (response.status == 200) { const obj = JSON.parse(data); @@ -107,7 +106,6 @@ function requestIMDbRating(title, year, type) { if (consoleLog) console.log("Netflix IMDb Rating URL:\n" + url); $tool.get(url, function (error, response, data) { if (!error) { - if (consoleLog) console.log("Netflix IMDb Rating response:\n" + JSON.stringify(response)); if (consoleLog) console.log("Netflix IMDb Rating Data:\n" + data); if (response.status == 200) { const obj = JSON.parse(data); @@ -485,11 +483,8 @@ function countryEmoji(name) { return emojiMap[name] ? emojiMap[name] : emojiMap["Chequered"]; } -function tool() { - const isSurge = typeof $httpClient != "undefined" - const isQuanX = typeof $task != "undefined" - const isResponse = typeof $response != "undefined" - const node = (() => { +function Tool() { + _node = (() => { if (typeof require == "function") { const request = require('request') return ({ request }) @@ -497,64 +492,50 @@ function tool() { return (null) } })() - const notify = (title, subtitle, message) => { - if (isQuanX) $notify(title, subtitle, message) - if (isSurge) $notification.post(title, subtitle, message) - if (node) console.log(JSON.stringify({ title, subtitle, message })); + _isSurge = typeof $httpClient != "undefined" + _isQuanX = typeof $task != "undefined" + this.isSurge = _isSurge + this.isQuanX = _isQuanX + this.isResponse = typeof $response != "undefined" + this.notify = (title, subtitle, message) => { + if (_isQuanX) $notify(title, subtitle, message) + if (_isSurge) $notification.post(title, subtitle, message) + if (_node) console.log(JSON.stringify({ title, subtitle, message })); } - const write = (value, key) => { - if (isQuanX) return $prefs.setValueForKey(value, key) - if (isSurge) return $persistentStore.write(value, key) + this.write = (value, key) => { + if (_isQuanX) return $prefs.setValueForKey(value, key) + if (_isSurge) return $persistentStore.write(value, key) } - const read = (key) => { - if (isQuanX) return $prefs.valueForKey(key) - if (isSurge) return $persistentStore.read(key) + this.read = (key) => { + if (_isQuanX) return $prefs.valueForKey(key) + if (_isSurge) return $persistentStore.read(key) } - const adapterStatus = (response) => { - if (response) { - if (response.status) { - response["statusCode"] = response.status - } else if (response.statusCode) { - response["status"] = response.statusCode - } - } - return response - } - const get = (options, callback) => { - if (isQuanX) { + this.get = (options, callback) => { + if (_isQuanX) { if (typeof options == "string") options = { url: options } options["method"] = "GET" - $task.fetch(options).then(response => { - callback(null, adapterStatus(response), response.body) - }, reason => callback(reason.error, null, null)) - } - if (isSurge) $httpClient.get(options, (error, response, body) => { - callback(error, adapterStatus(response), body) - }) - if (node) { - node.request(options, (error, response, body) => { - callback(error, adapterStatus(response), body) - }) + $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) } + if (_isSurge) $httpClient.get(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request(options, (error, response, body) => { callback(error, _status(response), body) }) } - const post = (options, callback) => { - if (isQuanX) { + this.post = (options, callback) => { + if (_isQuanX) { if (typeof options == "string") options = { url: options } options["method"] = "POST" - $task.fetch(options).then(response => { - callback(null, adapterStatus(response), response.body) - }, reason => callback(reason.error, null, null)) + $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) } - if (isSurge) { - $httpClient.post(options, (error, response, body) => { - callback(error, adapterStatus(response), body) - }) - } - if (node) { - node.request.post(options, (error, response, body) => { - callback(error, adapterStatus(response), body) - }) + if (_isSurge) $httpClient.post(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request.post(options, (error, response, body) => { callback(error, _status(response), body) }) + } + _status = (response) => { + if (response) { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } } + return response } - return { isQuanX, isSurge, isResponse, notify, write, read, get, post } -} +} \ No newline at end of file From 4caf44244b4d129f4b86741b9f531a80dd5cf2ca Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 18 Feb 2020 23:50:32 +0800 Subject: [PATCH 0080/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2f8ce13a8..18aec3a27 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -[Issue Group](http://t.me/scriptgroup) - # Surge Remove weibo ads ``` @@ -115,3 +113,5 @@ Daily work check-in reminder [task_local] 0 9,18 * * 1-5 check_in.js ``` + +[Issue Group](http://t.me/scriptgroup) From 8ef18f4822987673bab2f735b6d94850ab9880f0 Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 19 Feb 2020 21:08:40 +0800 Subject: [PATCH 0081/1191] optimize --- tb_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price.js b/tb_price.js index 62d2e27f6..9507d6ea2 100644 --- a/tb_price.js +++ b/tb_price.js @@ -91,7 +91,7 @@ function priceSummary(data) { } else if (index == 4) { item.Name = "三十天最低" } - summary = `${item.Name}${getSpace(10)}${item.Price}${getSpace(10)}${item.Date}` + summary = `${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` tbitems.push(customItem(summary)) }) return tbitems From 29b00abfd04696212f9de2e24e8fe740cac1f7f1 Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 19 Feb 2020 21:56:50 +0800 Subject: [PATCH 0082/1191] fix --- tb_price.js | 61 +++++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/tb_price.js b/tb_price.js index 9507d6ea2..1b110b618 100644 --- a/tb_price.js +++ b/tb_price.js @@ -32,41 +32,46 @@ if (url.indexOf(path2) != -1) { let obj = JSON.parse(body) let apiStack = obj.data.apiStack[0] let value = JSON.parse(apiStack.value) + let tradeConsumerProtection = null if (value.global) { - let tradeConsumerProtection = value.global.data.tradeConsumerProtection + tradeConsumerProtection = value.global.data.tradeConsumerProtection if (!tradeConsumerProtection) { value.global.data["tradeConsumerProtection"] = customTradeConsumerProtection() + tradeConsumerProtection = value.global.data.tradeConsumerProtection } - tradeConsumerProtection = value.global.data.tradeConsumerProtection - let service = tradeConsumerProtection.tradeConsumerService.service - let nonService = tradeConsumerProtection.tradeConsumerService.nonService + } else { + tradeConsumerProtection = value.tradeConsumerProtection + if (!tradeConsumerProtection) { + value["tradeConsumerProtection"] = customTradeConsumerProtection() + tradeConsumerProtection = value.tradeConsumerProtection + } + } + let service = tradeConsumerProtection.tradeConsumerService.service + let nonService = tradeConsumerProtection.tradeConsumerService.nonService - let item = obj.data.item - let shareUrl = `https://item.taobao.com/item.htm?id=${item.itemId}` + let item = obj.data.item + let shareUrl = `https://item.taobao.com/item.htm?id=${item.itemId}` - requestPrice(shareUrl, function (data) { - if (data) { - if (data.ok == 1 && data.single) { - const lower = lowerMsgs(data.single) - const tbitems = priceSummary(data) - const tip = data.PriceRemark.Tip - service.items = service.items.concat(nonService.items) - service.items.unshift(customItem(lower[1], `${lower[0]} ${tip}` + "(仅供参考)")) - nonService.title = "价格详情" - nonService.items = tbitems - } - if (data.ok == 0 && data.msg.length > 0) { - service.items.unshift(customItem("历史价格", data.msg)) - } - apiStack.value = JSON.stringify(value) - $done({ body: JSON.stringify(obj) }) - } else { - $done({ body }) + requestPrice(shareUrl, function (data) { + if (data) { + if (data.ok == 1 && data.single) { + const lower = lowerMsgs(data.single) + const tbitems = priceSummary(data) + const tip = data.PriceRemark.Tip + service.items = service.items.concat(nonService.items) + service.items.unshift(customItem(lower[1], `${lower[0]} ${tip}` + "(仅供参考)")) + nonService.title = "价格详情" + nonService.items = tbitems } - }) - } else { - $done({ body }) - } + if (data.ok == 0 && data.msg.length > 0) { + service.items.unshift(customItem("历史价格", data.msg)) + } + apiStack.value = JSON.stringify(value) + $done({ body: JSON.stringify(obj) }) + } else { + $done({ body }) + } + }) } function lowerMsgs(data) { From 37d95be320f5a0686f1e7d5a501d289995563557 Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 19 Feb 2020 22:36:38 +0800 Subject: [PATCH 0083/1191] fix --- tb_price.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tb_price.js b/tb_price.js index 1b110b618..43820351e 100644 --- a/tb_price.js +++ b/tb_price.js @@ -168,10 +168,10 @@ function requestPrice(share_url, callback) { $tool.post(options, function (error, response, data) { if (!error) { callback(JSON.parse(data)); - if (consolelog) console.log("Data:\n" + data); + if (consoleLog) console.log("Data:\n" + data); } else { callback(null, null); - if (consolelog) console.log("Error:\n" + error); + if (consoleLog) console.log("Error:\n" + error); } }) } From 0666acbc1c7a4bfa06f77a725c5a7b824119e27f Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 19 Feb 2020 22:39:45 +0800 Subject: [PATCH 0084/1191] fix --- tb_price_lite.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index 2d2f0c465..ad68f0a3c 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -138,10 +138,10 @@ function requestPrice(share_url, callback) { $tool.post(options, function (error, response, data) { if (!error) { callback(JSON.parse(data)); - if (consolelog) console.log("Data:\n" + data); + if (consoleLog) console.log("Data:\n" + data); } else { callback(null, null); - if (consolelog) console.log("Error:\n" + error); + if (consoleLog) console.log("Error:\n" + error); } }) } From 7013c3b125e0851fc89138874df052eb1b6fe483 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 20 Feb 2020 11:54:27 +0800 Subject: [PATCH 0085/1191] optimize --- tb_price.js | 81 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 34 deletions(-) diff --git a/tb_price.js b/tb_price.js index 43820351e..dddcf8e36 100644 --- a/tb_price.js +++ b/tb_price.js @@ -30,41 +30,52 @@ if (url.indexOf(path1) != -1) { if (url.indexOf(path2) != -1) { const body = $response.body let obj = JSON.parse(body) - let apiStack = obj.data.apiStack[0] - let value = JSON.parse(apiStack.value) - let tradeConsumerProtection = null - if (value.global) { - tradeConsumerProtection = value.global.data.tradeConsumerProtection - if (!tradeConsumerProtection) { - value.global.data["tradeConsumerProtection"] = customTradeConsumerProtection() - tradeConsumerProtection = value.global.data.tradeConsumerProtection - } - } else { - tradeConsumerProtection = value.tradeConsumerProtection - if (!tradeConsumerProtection) { - value["tradeConsumerProtection"] = customTradeConsumerProtection() - tradeConsumerProtection = value.tradeConsumerProtection - } - } - let service = tradeConsumerProtection.tradeConsumerService.service - let nonService = tradeConsumerProtection.tradeConsumerService.nonService - let item = obj.data.item let shareUrl = `https://item.taobao.com/item.htm?id=${item.itemId}` - requestPrice(shareUrl, function (data) { if (data) { - if (data.ok == 1 && data.single) { - const lower = lowerMsgs(data.single) - const tbitems = priceSummary(data) - const tip = data.PriceRemark.Tip - service.items = service.items.concat(nonService.items) - service.items.unshift(customItem(lower[1], `${lower[0]} ${tip}` + "(仅供参考)")) - nonService.title = "价格详情" - nonService.items = tbitems + const lower = lowerMsgs(data.single) + const tip = data.PriceRemark.Tip + let apiStack = obj.data.apiStack[0] + let value = JSON.parse(apiStack.value) + let tradeConsumerProtection = null + let consumerProtection = null + if (value.global) { + tradeConsumerProtection = value.global.data.tradeConsumerProtection + consumerProtection = value.global.data.consumerProtection + } else { + tradeConsumerProtection = value.tradeConsumerProtection + consumerProtection = value.consumerProtection } - if (data.ok == 0 && data.msg.length > 0) { - service.items.unshift(customItem("历史价格", data.msg)) + if (tradeConsumerProtection) { + const tbitems = priceSummary(data)[0] + let service = tradeConsumerProtection.tradeConsumerService.service + if (data.ok == 1 && data.single) { + let item = customItem(lower[1], `${lower[0]} ${tip}(仅供参考)`) + let nonService = tradeConsumerProtection.tradeConsumerService.nonService + service.items = service.items.concat(nonService.items) + nonService.title = "价格详情" + nonService.items = tbitems + service.items.unshift(item) + } + if (data.ok == 0 && data.msg.length > 0) { + service.items.unshift(customItem("历史价格", data.msg)) + } + } + else { + const summary = priceSummary(data)[1] + let basicService = consumerProtection.serviceProtection.basicService + let items = consumerProtection.items + if (data.ok == 1 && data.single) { + let item = customItem(lower[1], [`${lower[0]} ${tip}(仅供参考)\n${summary}`]) + basicService.services.unshift(item) + items.unshift(item) + } + if (data.ok == 0 && data.msg.length > 0) { + let item = customItem("历史价格", [data.msg]) + basicService.services.unshift(item) + items.unshift(item) + } } apiStack.value = JSON.stringify(value) $done({ body: JSON.stringify(obj) }) @@ -96,10 +107,11 @@ function priceSummary(data) { } else if (index == 4) { item.Name = "三十天最低" } - summary = `${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` - tbitems.push(customItem(summary)) + summary += `\n${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` + let summaryItem = `${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` + tbitems.push(customItem(summaryItem)) }) - return tbitems + return [tbitems, summary] } function historySummary(single) { @@ -195,6 +207,7 @@ function customItem(title, desc) { return { icon: "https://s2.ax1x.com/2020/02/16/3STeIJ.png", title: title, + name: title, desc: desc } } @@ -407,4 +420,4 @@ function Base64() { } return string; } -} +} \ No newline at end of file From 0afa0b7dc5c5691cbfae595d09c378272909b446 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 20 Feb 2020 15:27:36 +0800 Subject: [PATCH 0086/1191] optimize --- tb_price.js | 75 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 29 deletions(-) diff --git a/tb_price.js b/tb_price.js index dddcf8e36..4b0f43af4 100644 --- a/tb_price.js +++ b/tb_price.js @@ -34,8 +34,6 @@ if (url.indexOf(path2) != -1) { let shareUrl = `https://item.taobao.com/item.htm?id=${item.itemId}` requestPrice(shareUrl, function (data) { if (data) { - const lower = lowerMsgs(data.single) - const tip = data.PriceRemark.Tip let apiStack = obj.data.apiStack[0] let value = JSON.parse(apiStack.value) let tradeConsumerProtection = null @@ -48,33 +46,14 @@ if (url.indexOf(path2) != -1) { consumerProtection = value.consumerProtection } if (tradeConsumerProtection) { - const tbitems = priceSummary(data)[0] - let service = tradeConsumerProtection.tradeConsumerService.service - if (data.ok == 1 && data.single) { - let item = customItem(lower[1], `${lower[0]} ${tip}(仅供参考)`) - let nonService = tradeConsumerProtection.tradeConsumerService.nonService - service.items = service.items.concat(nonService.items) - nonService.title = "价格详情" - nonService.items = tbitems - service.items.unshift(item) - } - if (data.ok == 0 && data.msg.length > 0) { - service.items.unshift(customItem("历史价格", data.msg)) - } - } - else { - const summary = priceSummary(data)[1] - let basicService = consumerProtection.serviceProtection.basicService - let items = consumerProtection.items - if (data.ok == 1 && data.single) { - let item = customItem(lower[1], [`${lower[0]} ${tip}(仅供参考)\n${summary}`]) - basicService.services.unshift(item) - items.unshift(item) - } - if (data.ok == 0 && data.msg.length > 0) { - let item = customItem("历史价格", [data.msg]) - basicService.services.unshift(item) - items.unshift(item) + tradeConsumerProtection = setTradeConsumerProtection(data, tradeConsumerProtection) + } else { + let vertical = value.vertical + if (vertical && vertical.hasOwnProperty("tmallhkDirectSale")) { + value["tradeConsumerProtection"] = customTradeConsumerProtection() + value.tradeConsumerProtection = setTradeConsumerProtection(data, value.tradeConsumerProtection) + } else { + consumerProtection = setConsumerProtection(data, consumerProtection) } } apiStack.value = JSON.stringify(value) @@ -85,6 +64,44 @@ if (url.indexOf(path2) != -1) { }) } +function setConsumerProtection(data, consumerProtection) { + const lower = lowerMsgs(data.single) + const tip = data.PriceRemark.Tip + const summary = priceSummary(data)[1] + let basicService = consumerProtection.serviceProtection.basicService + let items = consumerProtection.items + if (data.ok == 1 && data.single) { + let item = customItem(lower[1], [`${lower[0]} ${tip}(仅供参考)\n${summary}`]) + basicService.services.unshift(item) + items.unshift(item) + } + if (data.ok == 0 && data.msg.length > 0) { + let item = customItem("历史价格", [data.msg]) + basicService.services.unshift(item) + items.unshift(item) + } + return consumerProtection +} + +function setTradeConsumerProtection(data, tradeConsumerProtection) { + const lower = lowerMsgs(data.single) + const tip = data.PriceRemark.Tip + const tbitems = priceSummary(data)[0] + let service = tradeConsumerProtection.tradeConsumerService.service + if (data.ok == 1 && data.single) { + let item = customItem(lower[1], `${lower[0]} ${tip}(仅供参考)`) + let nonService = tradeConsumerProtection.tradeConsumerService.nonService + service.items = service.items.concat(nonService.items) + nonService.title = "价格详情" + nonService.items = tbitems + service.items.unshift(item) + } + if (data.ok == 0 && data.msg.length > 0) { + service.items.unshift(customItem("历史价格", data.msg)) + } + return tradeConsumerProtection +} + function lowerMsgs(data) { const lower = data.lowerPriceyh const lowerDate = dateFormat(data.lowerDateyh) From 15800e45d3408227a64182da236d2be6fb6c00c1 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 20 Feb 2020 23:56:44 +0800 Subject: [PATCH 0087/1191] fix --- tb_price.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tb_price.js b/tb_price.js index 4b0f43af4..26f644f7b 100644 --- a/tb_price.js +++ b/tb_price.js @@ -65,13 +65,13 @@ if (url.indexOf(path2) != -1) { } function setConsumerProtection(data, consumerProtection) { - const lower = lowerMsgs(data.single) - const tip = data.PriceRemark.Tip - const summary = priceSummary(data)[1] let basicService = consumerProtection.serviceProtection.basicService let items = consumerProtection.items if (data.ok == 1 && data.single) { - let item = customItem(lower[1], [`${lower[0]} ${tip}(仅供参考)\n${summary}`]) + const lower = lowerMsgs(data.single) + const tip = data.PriceRemark.Tip + const summary = priceSummary(data)[1] + const item = customItem(lower[1], [`${lower[0]} ${tip}(仅供参考)\n${summary}`]) basicService.services.unshift(item) items.unshift(item) } @@ -84,12 +84,12 @@ function setConsumerProtection(data, consumerProtection) { } function setTradeConsumerProtection(data, tradeConsumerProtection) { - const lower = lowerMsgs(data.single) - const tip = data.PriceRemark.Tip - const tbitems = priceSummary(data)[0] let service = tradeConsumerProtection.tradeConsumerService.service if (data.ok == 1 && data.single) { - let item = customItem(lower[1], `${lower[0]} ${tip}(仅供参考)`) + const lower = lowerMsgs(data.single) + const tip = data.PriceRemark.Tip + const tbitems = priceSummary(data)[0] + const item = customItem(lower[1], `${lower[0]} ${tip}(仅供参考)`) let nonService = tradeConsumerProtection.tradeConsumerService.nonService service.items = service.items.concat(nonService.items) nonService.title = "价格详情" From 4a9fdc5169b8a660b103ac8b703d423acda4ecba Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 20 Feb 2020 23:57:11 +0800 Subject: [PATCH 0088/1191] fix --- tb_price.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tb_price.js b/tb_price.js index 26f644f7b..943945f2e 100644 --- a/tb_price.js +++ b/tb_price.js @@ -76,7 +76,7 @@ function setConsumerProtection(data, consumerProtection) { items.unshift(item) } if (data.ok == 0 && data.msg.length > 0) { - let item = customItem("历史价格", [data.msg]) + let item = customItem("暂无历史价格", [data.msg]) basicService.services.unshift(item) items.unshift(item) } @@ -97,7 +97,7 @@ function setTradeConsumerProtection(data, tradeConsumerProtection) { service.items.unshift(item) } if (data.ok == 0 && data.msg.length > 0) { - service.items.unshift(customItem("历史价格", data.msg)) + service.items.unshift(customItem("暂无历史价格", data.msg)) } return tradeConsumerProtection } From 2390f7c44c4ec5de9d92105e3f6370e309e14ecf Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 22 Feb 2020 11:10:58 +0800 Subject: [PATCH 0089/1191] Update README.md --- README.md | 50 +++++++++++++++----------------------------------- 1 file changed, 15 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 18aec3a27..a7bb9bd86 100644 --- a/README.md +++ b/README.md @@ -19,34 +19,24 @@ hostname = ios.prod.ftl.netflix.com Display jd historical price ``` -# 使用不生效或失效的检查一下配置有没有这两条复写,如果有删除试试 +# 不生效或失效的检查一下配置有没有这两条复写,删除试试 # ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=start - reject # ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=(start|queryMaterialAdverts) - reject [Script] http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +# lite +# http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price_lite.js [MITM] hostname = api.m.jd.com ``` -Display taobao historical price(提供两种方式,根据需求二选一) +Display taobao historical price ``` -# 使用脚本删除对应 IP,不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 +# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [Script] -http-response ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -http-response ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -[MITM] -hostname = trade-acs.m.taobao.com,amdc.m.taobao.com -``` - -``` -# 使用规则屏蔽指定 IP 段,有可能误伤其他功能或者应用,可以自己抓包缩小 IP 范围,随时生效 -[Rule] -IP-CIDR, 203.119.144.0/23, REJECT, no-resolve -IP-CIDR, 203.119.175.0/24, REJECT, no-resolve -IP-CIDR, 106.11.162.0/24, REJECT, no-resolve -IP-CIDR, 47.102.83.0/24, REJECT, no-resolve -[Script] -http-response ^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-response ^https?://(trade-acs| amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +# lite +# http-response ^https://(trade-acs| amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js [MITM] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` @@ -81,29 +71,19 @@ Display jd historical price ``` [rewrite_local] ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js +# lite +# ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price_lite.js [mitm] hostname = api.m.jd.com ``` -Display taobao historical price(提供两种方式,根据需求二选一) -``` -# 使用脚本删除对应 IP,不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 -[rewrite_local] -^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body tb_price.js -^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js -[mitm] -hostname = trade-acs.m.taobao.com,amdc.m.taobao.com -``` - +Display taobao historical price ``` -# 使用规则屏蔽指定 IP 段,有可能误伤其他功能或者应用,可以自己抓包缩小 IP 范围,随时生效 -[filter_local] -ip-cidr, 203.119.144.0/23, reject -ip-cidr, 203.119.175.0/24, reject -ip-cidr, 106.11.162.0/24, reject -ip-cidr, 47.102.83.0/24, reject +# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [rewrite_local] -^https://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js +^https://(trade-acs| amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body tb_price.js +# lite +# ^https://(trade-acs| amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body tb_price_lite.js [mitm] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` From 5ff864675fcbe7b8c6ed44d3b0069cf7cc995c94 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 22 Feb 2020 11:15:35 +0800 Subject: [PATCH 0090/1191] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a7bb9bd86..5d0f50e9e 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,9 @@ Display taobao historical price ``` # 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [Script] -http-response ^https?://(trade-acs| amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-response ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js # lite -# http-response ^https://(trade-acs| amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js +# http-response ^https://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js [MITM] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` @@ -81,9 +81,9 @@ Display taobao historical price ``` # 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [rewrite_local] -^https://(trade-acs| amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body tb_price.js +^https://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body tb_price.js # lite -# ^https://(trade-acs| amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body tb_price_lite.js +# ^https://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body tb_price_lite.js [mitm] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` From 3ddbd9034ef8f91e7f59d7613234162d490b3fc5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 22 Feb 2020 11:25:43 +0800 Subject: [PATCH 0091/1191] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5d0f50e9e..4d9e37d93 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Display taobao historical price [Script] http-response ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js # lite -# http-response ^https://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js +# http-response ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js [MITM] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` @@ -81,9 +81,9 @@ Display taobao historical price ``` # 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [rewrite_local] -^https://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body tb_price.js +^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body tb_price.js # lite -# ^https://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body tb_price_lite.js +# ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body tb_price_lite.js [mitm] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com ``` From 9787eb4f526878a0e5132f66d59c07a2ec8170c8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 22 Feb 2020 19:59:53 +0800 Subject: [PATCH 0092/1191] fix --- tb_price.js | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/tb_price.js b/tb_price.js index 943945f2e..3f085263e 100644 --- a/tb_price.js +++ b/tb_price.js @@ -34,30 +34,34 @@ if (url.indexOf(path2) != -1) { let shareUrl = `https://item.taobao.com/item.htm?id=${item.itemId}` requestPrice(shareUrl, function (data) { if (data) { - let apiStack = obj.data.apiStack[0] - let value = JSON.parse(apiStack.value) - let tradeConsumerProtection = null - let consumerProtection = null - if (value.global) { - tradeConsumerProtection = value.global.data.tradeConsumerProtection - consumerProtection = value.global.data.consumerProtection - } else { - tradeConsumerProtection = value.tradeConsumerProtection - consumerProtection = value.consumerProtection - } - if (tradeConsumerProtection) { - tradeConsumerProtection = setTradeConsumerProtection(data, tradeConsumerProtection) - } else { - let vertical = value.vertical - if (vertical && vertical.hasOwnProperty("tmallhkDirectSale")) { - value["tradeConsumerProtection"] = customTradeConsumerProtection() - value.tradeConsumerProtection = setTradeConsumerProtection(data, value.tradeConsumerProtection) + if (obj.data.apiStack) { + let apiStack = obj.data.apiStack[0] + let value = JSON.parse(apiStack.value) + let tradeConsumerProtection = null + let consumerProtection = null + if (value.global) { + tradeConsumerProtection = value.global.data.tradeConsumerProtection + consumerProtection = value.global.data.consumerProtection } else { - consumerProtection = setConsumerProtection(data, consumerProtection) + tradeConsumerProtection = value.tradeConsumerProtection + consumerProtection = value.consumerProtection } + if (tradeConsumerProtection) { + tradeConsumerProtection = setTradeConsumerProtection(data, tradeConsumerProtection) + } else { + let vertical = value.vertical + if (vertical && vertical.hasOwnProperty("tmallhkDirectSale")) { + value["tradeConsumerProtection"] = customTradeConsumerProtection() + value.tradeConsumerProtection = setTradeConsumerProtection(data, value.tradeConsumerProtection) + } else { + consumerProtection = setConsumerProtection(data, consumerProtection) + } + } + apiStack.value = JSON.stringify(value) + $done({ body: JSON.stringify(obj) }) + } else { + $done({ body }) } - apiStack.value = JSON.stringify(value) - $done({ body: JSON.stringify(obj) }) } else { $done({ body }) } @@ -437,4 +441,4 @@ function Base64() { } return string; } -} \ No newline at end of file +} From fb55247d410afe8b8ad446d1267e19248ac8d94b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 22 Feb 2020 21:41:05 +0800 Subject: [PATCH 0093/1191] Update tb_price.js --- tb_price.js | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/tb_price.js b/tb_price.js index 3f085263e..9bddfd126 100644 --- a/tb_price.js +++ b/tb_price.js @@ -39,28 +39,37 @@ if (url.indexOf(path2) != -1) { let value = JSON.parse(apiStack.value) let tradeConsumerProtection = null let consumerProtection = null + let trade = null if (value.global) { tradeConsumerProtection = value.global.data.tradeConsumerProtection consumerProtection = value.global.data.consumerProtection + trade = value.global.data.trade } else { tradeConsumerProtection = value.tradeConsumerProtection consumerProtection = value.consumerProtection + trade = value.trade } - if (tradeConsumerProtection) { - tradeConsumerProtection = setTradeConsumerProtection(data, tradeConsumerProtection) + if (trade && trade.useWap == "true") { + $done({ body }) + sendNotify(data, shareUrl) } else { - let vertical = value.vertical - if (vertical && vertical.hasOwnProperty("tmallhkDirectSale")) { - value["tradeConsumerProtection"] = customTradeConsumerProtection() - value.tradeConsumerProtection = setTradeConsumerProtection(data, value.tradeConsumerProtection) + if (tradeConsumerProtection) { + tradeConsumerProtection = setTradeConsumerProtection(data, tradeConsumerProtection) } else { - consumerProtection = setConsumerProtection(data, consumerProtection) + let vertical = value.vertical + if (vertical && vertical.hasOwnProperty("tmallhkDirectSale")) { + value["tradeConsumerProtection"] = customTradeConsumerProtection() + value.tradeConsumerProtection = setTradeConsumerProtection(data, value.tradeConsumerProtection) + } else { + consumerProtection = setConsumerProtection(data, consumerProtection) + } } + apiStack.value = JSON.stringify(value) + $done({ body: JSON.stringify(obj) }) } - apiStack.value = JSON.stringify(value) - $done({ body: JSON.stringify(obj) }) } else { $done({ body }) + sendNotify(data, shareUrl) } } else { $done({ body }) @@ -68,6 +77,18 @@ if (url.indexOf(path2) != -1) { }) } +function sendNotify(data, shareUrl) { + if (data.ok == 1 && data.single) { + const lower = lowerMsgs(data.single)[0] + const detail = priceSummary(data)[1] + const tip = data.PriceRemark.Tip + "(仅供参考)" + $tool.notify("", "", `〽️历史${lower} ${tip}\n${detail}\n\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) + } + if (data.ok == 0 && data.msg.length > 0) { + $tool.notify("", "", `⚠️ ${data.msg}`) + } +} + function setConsumerProtection(data, consumerProtection) { let basicService = consumerProtection.serviceProtection.basicService let items = consumerProtection.items From 6a03758b4a4940b09729a5424efce0efd34b5cbd Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 25 Feb 2020 15:29:01 +0800 Subject: [PATCH 0094/1191] Update README.md --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 4d9e37d93..0b10654c3 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,13 @@ http-response ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detai # http-response ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js [MITM] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com + +# 以上还不生效或者频繁失效的可以添加以下规则,使用规则有可能误伤其他功能或者应用(一般不需要添加规则就能正常使用) +# [Rule] +# IP-CIDR, 203.119.144.0/23, REJECT, no-resolve +# IP-CIDR, 203.119.175.0/24, REJECT, no-resolve +# IP-CIDR, 106.11.162.0/24, REJECT, no-resolve +# IP-CIDR, 47.102.83.0/24, REJECT, no-resolve ``` Daily work check-in reminder @@ -86,6 +93,13 @@ Display taobao historical price # ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body tb_price_lite.js [mitm] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com + +# 以上还不生效或者频繁失效的可以添加以下规则,使用规则有可能误伤其他功能或者应用(一般不需要添加规则就能正常使用) +# [filter_local] +# ip-cidr, 203.119.144.0/23, reject +# ip-cidr, 203.119.175.0/24, reject +# ip-cidr, 106.11.162.0/24, reject +# ip-cidr, 47.102.83.0/24, reject ``` Daily work check-in reminder From e8be42f4ee6fa40ea595827840b4478ca83b089f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 25 Feb 2020 19:30:58 +0800 Subject: [PATCH 0095/1191] Update README.md --- README.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0b10654c3..ed65ccc59 100644 --- a/README.md +++ b/README.md @@ -32,11 +32,10 @@ hostname = api.m.jd.com Display taobao historical price ``` -# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 +# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 大概率会失效 [Script] -http-response ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -# lite -# http-response ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js +http-request ^https?://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com @@ -86,11 +85,10 @@ hostname = api.m.jd.com Display taobao historical price ``` -# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 +# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 大概率会失效 [rewrite_local] -^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body tb_price.js -# lite -# ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body tb_price_lite.js +^https?://.+/amdc/mobileDispatch url script-request-body tb_price.js +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js [mitm] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com From 37fef978a783f5bec4dd321f084c10721aeb51b3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 25 Feb 2020 19:32:18 +0800 Subject: [PATCH 0096/1191] Update tb_price.js --- tb_price.js | 150 ++++++++++++++-------------------------------------- 1 file changed, 39 insertions(+), 111 deletions(-) diff --git a/tb_price.js b/tb_price.js index 9bddfd126..057ac0037 100644 --- a/tb_price.js +++ b/tb_price.js @@ -3,28 +3,31 @@ README:https://github.com/yichahucha/surge/tree/master */ const $tool = new Tool() -const $base64 = new Base64() const consoleLog = false const url = $request.url -const body = $response.body const path1 = "/amdc/mobileDispatch" const path2 = "/gw/mtop.taobao.detail.getdetail" if (url.indexOf(path1) != -1) { - let obj = JSON.parse($base64.decode(body)) - let dns = obj.dns - if (dns && dns.length > 0) { - let i = dns.length; + if ($tool.isResponse) { + $tool.notify("", "", "脚本已更新,此方式已废弃,请参考文档更新配置并更新脚本" + "\nGitHub: " + "https://github.com/yichahucha/surge/tree/master") + $done() + } else { + let body = $request.body + let json = Qs2Json(body) + let domain = json.domain.split(" ") + let i = domain.length; while (i--) { - const element = dns[i]; - let host = "trade-acs.m.taobao.com" - if (element.host == host) { - element.ips = [] - if (consoleLog) console.log(JSON.stringify(element)) + const block = "trade-acs.m.taobao.com" + const element = domain[i]; + if (element == block) { + domain.splice(i, 1); } } + json.domain = domain.join(" ") + body = Json2Qs(json) + $done({ body }) } - $done({ body: $base64.encode(JSON.stringify(obj)) }) } if (url.indexOf(path2) != -1) { @@ -275,6 +278,30 @@ function customTradeConsumerProtection() { } } +function Qs2Json(url) { + url = url == null ? window.location.href : url; + var search = url.substring(url.lastIndexOf("?") + 1); + var obj = {}; + var reg = /([^?&=]+)=([^?&=]*)/g; + search.replace(reg, function (rs, $1, $2) { + var name = decodeURIComponent($1); + var val = decodeURIComponent($2); + val = String(val); + obj[name] = val; + return rs; + }); + return obj; +} + + +function Json2Qs(json) { + var temp = []; + for (var k in json) { + temp.push(k + "=" + json[k]); + } + return temp.join("&"); +} + Array.prototype.insert = function (index, item) { this.splice(index, 0, item); }; @@ -364,102 +391,3 @@ function Tool() { return response } } - -function Base64() { - // private property - _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - // public method for encoding - this.encode = function (input) { - var output = ""; - var chr1, chr2, chr3, enc1, enc2, enc3, enc4; - var i = 0; - input = _utf8_encode(input); - while (i < input.length) { - chr1 = input.charCodeAt(i++); - chr2 = input.charCodeAt(i++); - chr3 = input.charCodeAt(i++); - enc1 = chr1 >> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - if (isNaN(chr2)) { - enc3 = enc4 = 64; - } else if (isNaN(chr3)) { - enc4 = 64; - } - output = output + - _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + - _keyStr.charAt(enc3) + _keyStr.charAt(enc4); - } - return output; - } - // public method for decoding - this.decode = function (input) { - var output = ""; - var chr1, chr2, chr3; - var enc1, enc2, enc3, enc4; - var i = 0; - input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - while (i < input.length) { - enc1 = _keyStr.indexOf(input.charAt(i++)); - enc2 = _keyStr.indexOf(input.charAt(i++)); - enc3 = _keyStr.indexOf(input.charAt(i++)); - enc4 = _keyStr.indexOf(input.charAt(i++)); - chr1 = (enc1 << 2) | (enc2 >> 4); - chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); - chr3 = ((enc3 & 3) << 6) | enc4; - output = output + String.fromCharCode(chr1); - if (enc3 != 64) { - output = output + String.fromCharCode(chr2); - } - if (enc4 != 64) { - output = output + String.fromCharCode(chr3); - } - } - output = _utf8_decode(output); - return output; - } - // private method for UTF-8 encoding - _utf8_encode = function (string) { - string = string.replace(/\r\n/g, "\n"); - var utftext = ""; - for (var n = 0; n < string.length; n++) { - var c = string.charCodeAt(n); - if (c < 128) { - utftext += String.fromCharCode(c); - } else if ((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } - - } - return utftext; - } - // private method for UTF-8 decoding - _utf8_decode = function (utftext) { - var string = ""; - var i = 0; - var c = c1 = c2 = 0; - while (i < utftext.length) { - c = utftext.charCodeAt(i); - if (c < 128) { - string += String.fromCharCode(c); - i++; - } else if ((c > 191) && (c < 224)) { - c2 = utftext.charCodeAt(i + 1); - string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); - i += 2; - } else { - c2 = utftext.charCodeAt(i + 1); - c3 = utftext.charCodeAt(i + 2); - string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); - i += 3; - } - } - return string; - } -} From 43bd7ad5389687d112df815b4d7dbd396326151c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 25 Feb 2020 20:05:18 +0800 Subject: [PATCH 0097/1191] Update tb_price_lite.js --- tb_price_lite.js | 49 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index ad68f0a3c..739209253 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -3,7 +3,6 @@ README:https://github.com/yichahucha/surge/tree/master */ const $tool = new Tool() -const $base64 = new Base64() const consoleLog = false const url = $request.url const body = $response.body @@ -11,20 +10,25 @@ const path1 = "/amdc/mobileDispatch" const path2 = "/gw/mtop.taobao.detail.getdetail" if (url.indexOf(path1) != -1) { - let obj = JSON.parse($base64.decode(body)) - let dns = obj.dns - if (dns && dns.length > 0) { - let i = dns.length; + if ($tool.isResponse) { + $tool.notify("", "", "脚本已更新,此配置方式已废弃,请参考文档更新配置并更新脚本" + "\nGitHub: " + "https://github.com/yichahucha/surge/tree/master") + $done() + } else { + let body = $request.body + let json = Qs2Json(body) + let domain = json.domain.split(" ") + let i = domain.length; while (i--) { - const element = dns[i]; - let host = "trade-acs.m.taobao.com" - if (element.host == host) { - element.ips = [] - if (consoleLog) console.log(JSON.stringify(element)) + const block = "trade-acs.m.taobao.com" + const element = domain[i]; + if (element == block) { + domain.splice(i, 1); } } + json.domain = domain.join(" ") + body = Json2Qs(json) + $done({ body }) } - $done({ body: $base64.encode(JSON.stringify(obj)) }) } if (url.indexOf(path2) != -1) { @@ -153,6 +157,29 @@ function dateFormat(cellval) { return date.getFullYear() + "-" + month + "-" + currentDate; } +function Qs2Json(url) { + url = url == null ? window.location.href : url; + var search = url.substring(url.lastIndexOf("?") + 1); + var obj = {}; + var reg = /([^?&=]+)=([^?&=]*)/g; + search.replace(reg, function (rs, $1, $2) { + var name = decodeURIComponent($1); + var val = decodeURIComponent($2); + val = String(val); + obj[name] = val; + return rs; + }); + return obj; +} + +function Json2Qs(json) { + var temp = []; + for (var k in json) { + temp.push(k + "=" + json[k]); + } + return temp.join("&"); +} + Array.prototype.insert = function (index, item) { this.splice(index, 0, item); }; From ffbfb2c5f1f9e4fd277aeaee7d10c443a5eb4d7a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 25 Feb 2020 20:06:06 +0800 Subject: [PATCH 0098/1191] Update tb_price_lite.js --- tb_price_lite.js | 99 ------------------------------------------------ 1 file changed, 99 deletions(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index 739209253..6bc6b9698 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -269,102 +269,3 @@ function Tool() { return response } } - -function Base64() { - // private property - _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - // public method for encoding - this.encode = function (input) { - var output = ""; - var chr1, chr2, chr3, enc1, enc2, enc3, enc4; - var i = 0; - input = _utf8_encode(input); - while (i < input.length) { - chr1 = input.charCodeAt(i++); - chr2 = input.charCodeAt(i++); - chr3 = input.charCodeAt(i++); - enc1 = chr1 >> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - if (isNaN(chr2)) { - enc3 = enc4 = 64; - } else if (isNaN(chr3)) { - enc4 = 64; - } - output = output + - _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + - _keyStr.charAt(enc3) + _keyStr.charAt(enc4); - } - return output; - } - // public method for decoding - this.decode = function (input) { - var output = ""; - var chr1, chr2, chr3; - var enc1, enc2, enc3, enc4; - var i = 0; - input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - while (i < input.length) { - enc1 = _keyStr.indexOf(input.charAt(i++)); - enc2 = _keyStr.indexOf(input.charAt(i++)); - enc3 = _keyStr.indexOf(input.charAt(i++)); - enc4 = _keyStr.indexOf(input.charAt(i++)); - chr1 = (enc1 << 2) | (enc2 >> 4); - chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); - chr3 = ((enc3 & 3) << 6) | enc4; - output = output + String.fromCharCode(chr1); - if (enc3 != 64) { - output = output + String.fromCharCode(chr2); - } - if (enc4 != 64) { - output = output + String.fromCharCode(chr3); - } - } - output = _utf8_decode(output); - return output; - } - // private method for UTF-8 encoding - _utf8_encode = function (string) { - string = string.replace(/\r\n/g, "\n"); - var utftext = ""; - for (var n = 0; n < string.length; n++) { - var c = string.charCodeAt(n); - if (c < 128) { - utftext += String.fromCharCode(c); - } else if ((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } - - } - return utftext; - } - // private method for UTF-8 decoding - _utf8_decode = function (utftext) { - var string = ""; - var i = 0; - var c = c1 = c2 = 0; - while (i < utftext.length) { - c = utftext.charCodeAt(i); - if (c < 128) { - string += String.fromCharCode(c); - i++; - } else if ((c > 191) && (c < 224)) { - c2 = utftext.charCodeAt(i + 1); - string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); - i += 2; - } else { - c2 = utftext.charCodeAt(i + 1); - c3 = utftext.charCodeAt(i + 2); - string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); - i += 3; - } - } - return string; - } -} From 11e3a979b4378e354ca7637c01660880ddb9c286 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 25 Feb 2020 20:06:46 +0800 Subject: [PATCH 0099/1191] Update tb_price.js --- tb_price.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tb_price.js b/tb_price.js index 057ac0037..d3a971363 100644 --- a/tb_price.js +++ b/tb_price.js @@ -10,7 +10,7 @@ const path2 = "/gw/mtop.taobao.detail.getdetail" if (url.indexOf(path1) != -1) { if ($tool.isResponse) { - $tool.notify("", "", "脚本已更新,此方式已废弃,请参考文档更新配置并更新脚本" + "\nGitHub: " + "https://github.com/yichahucha/surge/tree/master") + $tool.notify("", "", "脚本已更新,此配置方式已废弃,请参考文档更新配置并更新脚本" + "\nGitHub: " + "https://github.com/yichahucha/surge/tree/master") $done() } else { let body = $request.body @@ -293,7 +293,6 @@ function Qs2Json(url) { return obj; } - function Json2Qs(json) { var temp = []; for (var k in json) { From cab02f45ef4dbb03865aee387ebcf59d3455a4b9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 25 Feb 2020 20:30:16 +0800 Subject: [PATCH 0100/1191] Update tb_price.js --- tb_price.js | 1 - 1 file changed, 1 deletion(-) diff --git a/tb_price.js b/tb_price.js index d3a971363..d37367197 100644 --- a/tb_price.js +++ b/tb_price.js @@ -10,7 +10,6 @@ const path2 = "/gw/mtop.taobao.detail.getdetail" if (url.indexOf(path1) != -1) { if ($tool.isResponse) { - $tool.notify("", "", "脚本已更新,此配置方式已废弃,请参考文档更新配置并更新脚本" + "\nGitHub: " + "https://github.com/yichahucha/surge/tree/master") $done() } else { let body = $request.body From 4afb60eb014a1a65f57d9c724a182d3f3b1f3792 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 25 Feb 2020 20:32:10 +0800 Subject: [PATCH 0101/1191] Update tb_price_lite.js --- tb_price_lite.js | 1 - 1 file changed, 1 deletion(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index 6bc6b9698..b13c1e370 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -11,7 +11,6 @@ const path2 = "/gw/mtop.taobao.detail.getdetail" if (url.indexOf(path1) != -1) { if ($tool.isResponse) { - $tool.notify("", "", "脚本已更新,此配置方式已废弃,请参考文档更新配置并更新脚本" + "\nGitHub: " + "https://github.com/yichahucha/surge/tree/master") $done() } else { let body = $request.body From d676470e421b31e60af5c4b5aa2706b6a858ef91 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 25 Feb 2020 20:36:55 +0800 Subject: [PATCH 0102/1191] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index ed65ccc59..f878a78d1 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,9 @@ Display taobao historical price ``` # 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 大概率会失效 [rewrite_local] +# 1.0.5(商店版) +^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body tb_price.js +# 1.0.6(TF版) ^https?://.+/amdc/mobileDispatch url script-request-body tb_price.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js [mitm] From 109ff55db3ec7930b04bca2fa7bb497d94b74ec4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 25 Feb 2020 20:58:02 +0800 Subject: [PATCH 0103/1191] Update tb_price.js --- tb_price.js | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 116 insertions(+), 1 deletion(-) diff --git a/tb_price.js b/tb_price.js index d37367197..7f9eafb92 100644 --- a/tb_price.js +++ b/tb_price.js @@ -4,13 +4,29 @@ README:https://github.com/yichahucha/surge/tree/master const $tool = new Tool() const consoleLog = false +const $base64 = new Base64() const url = $request.url const path1 = "/amdc/mobileDispatch" const path2 = "/gw/mtop.taobao.detail.getdetail" if (url.indexOf(path1) != -1) { if ($tool.isResponse) { - $done() + let body = $response.body + let obj = JSON.parse($base64.decode(body)) + let dns = obj.dns + if (dns && dns.length > 0) { + let i = dns.length; + while (i--) { + const element = dns[i]; + let host = "trade-acs.m.taobao.com" + if (element.host == host) { + element.ips = [] + if (consoleLog) console.log(JSON.stringify(element)) + } + } + } + body = $base64.encode(JSON.stringify(obj)) + $done({ body }) } else { let body = $request.body let json = Qs2Json(body) @@ -389,3 +405,102 @@ function Tool() { return response } } + +function Base64() { + // private property + _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + // public method for encoding + this.encode = function (input) { + var output = ""; + var chr1, chr2, chr3, enc1, enc2, enc3, enc4; + var i = 0; + input = _utf8_encode(input); + while (i < input.length) { + chr1 = input.charCodeAt(i++); + chr2 = input.charCodeAt(i++); + chr3 = input.charCodeAt(i++); + enc1 = chr1 >> 2; + enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); + enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); + enc4 = chr3 & 63; + if (isNaN(chr2)) { + enc3 = enc4 = 64; + } else if (isNaN(chr3)) { + enc4 = 64; + } + output = output + + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + + _keyStr.charAt(enc3) + _keyStr.charAt(enc4); + } + return output; + } + // public method for decoding + this.decode = function (input) { + var output = ""; + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0; + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); + while (i < input.length) { + enc1 = _keyStr.indexOf(input.charAt(i++)); + enc2 = _keyStr.indexOf(input.charAt(i++)); + enc3 = _keyStr.indexOf(input.charAt(i++)); + enc4 = _keyStr.indexOf(input.charAt(i++)); + chr1 = (enc1 << 2) | (enc2 >> 4); + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); + chr3 = ((enc3 & 3) << 6) | enc4; + output = output + String.fromCharCode(chr1); + if (enc3 != 64) { + output = output + String.fromCharCode(chr2); + } + if (enc4 != 64) { + output = output + String.fromCharCode(chr3); + } + } + output = _utf8_decode(output); + return output; + } + // private method for UTF-8 encoding + _utf8_encode = function (string) { + string = string.replace(/\r\n/g, "\n"); + var utftext = ""; + for (var n = 0; n < string.length; n++) { + var c = string.charCodeAt(n); + if (c < 128) { + utftext += String.fromCharCode(c); + } else if ((c > 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + + } + return utftext; + } + // private method for UTF-8 decoding + _utf8_decode = function (utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + while (i < utftext.length) { + c = utftext.charCodeAt(i); + if (c < 128) { + string += String.fromCharCode(c); + i++; + } else if ((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i + 1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } else { + c2 = utftext.charCodeAt(i + 1); + c3 = utftext.charCodeAt(i + 2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + } + return string; + } +} From 46ce884e7a02fed69ca940f1b30b08a883523e3d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 25 Feb 2020 20:59:13 +0800 Subject: [PATCH 0104/1191] Update tb_price.js --- tb_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price.js b/tb_price.js index 7f9eafb92..10c4f18d3 100644 --- a/tb_price.js +++ b/tb_price.js @@ -3,8 +3,8 @@ README:https://github.com/yichahucha/surge/tree/master */ const $tool = new Tool() -const consoleLog = false const $base64 = new Base64() +const consoleLog = false const url = $request.url const path1 = "/amdc/mobileDispatch" const path2 = "/gw/mtop.taobao.detail.getdetail" From 78dcf6f03465d84e4fd58bcb8f0d17349e5c9226 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 25 Feb 2020 21:04:32 +0800 Subject: [PATCH 0105/1191] Update tb_price_lite.js --- tb_price_lite.js | 118 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 116 insertions(+), 2 deletions(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index b13c1e370..74368adb4 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -3,15 +3,30 @@ README:https://github.com/yichahucha/surge/tree/master */ const $tool = new Tool() +const $base64 = new Base64() const consoleLog = false const url = $request.url -const body = $response.body const path1 = "/amdc/mobileDispatch" const path2 = "/gw/mtop.taobao.detail.getdetail" if (url.indexOf(path1) != -1) { if ($tool.isResponse) { - $done() + let body = $response.body + let obj = JSON.parse($base64.decode(body)) + let dns = obj.dns + if (dns && dns.length > 0) { + let i = dns.length; + while (i--) { + const element = dns[i]; + let host = "trade-acs.m.taobao.com" + if (element.host == host) { + element.ips = [] + if (consoleLog) console.log(JSON.stringify(element)) + } + } + } + body = $base64.encode(JSON.stringify(obj)) + $done({ body }) } else { let body = $request.body let json = Qs2Json(body) @@ -268,3 +283,102 @@ function Tool() { return response } } + +function Base64() { + // private property + _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + // public method for encoding + this.encode = function (input) { + var output = ""; + var chr1, chr2, chr3, enc1, enc2, enc3, enc4; + var i = 0; + input = _utf8_encode(input); + while (i < input.length) { + chr1 = input.charCodeAt(i++); + chr2 = input.charCodeAt(i++); + chr3 = input.charCodeAt(i++); + enc1 = chr1 >> 2; + enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); + enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); + enc4 = chr3 & 63; + if (isNaN(chr2)) { + enc3 = enc4 = 64; + } else if (isNaN(chr3)) { + enc4 = 64; + } + output = output + + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + + _keyStr.charAt(enc3) + _keyStr.charAt(enc4); + } + return output; + } + // public method for decoding + this.decode = function (input) { + var output = ""; + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0; + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); + while (i < input.length) { + enc1 = _keyStr.indexOf(input.charAt(i++)); + enc2 = _keyStr.indexOf(input.charAt(i++)); + enc3 = _keyStr.indexOf(input.charAt(i++)); + enc4 = _keyStr.indexOf(input.charAt(i++)); + chr1 = (enc1 << 2) | (enc2 >> 4); + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); + chr3 = ((enc3 & 3) << 6) | enc4; + output = output + String.fromCharCode(chr1); + if (enc3 != 64) { + output = output + String.fromCharCode(chr2); + } + if (enc4 != 64) { + output = output + String.fromCharCode(chr3); + } + } + output = _utf8_decode(output); + return output; + } + // private method for UTF-8 encoding + _utf8_encode = function (string) { + string = string.replace(/\r\n/g, "\n"); + var utftext = ""; + for (var n = 0; n < string.length; n++) { + var c = string.charCodeAt(n); + if (c < 128) { + utftext += String.fromCharCode(c); + } else if ((c > 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + + } + return utftext; + } + // private method for UTF-8 decoding + _utf8_decode = function (utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + while (i < utftext.length) { + c = utftext.charCodeAt(i); + if (c < 128) { + string += String.fromCharCode(c); + i++; + } else if ((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i + 1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } else { + c2 = utftext.charCodeAt(i + 1); + c3 = utftext.charCodeAt(i + 2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + } + return string; + } +} From deedd5b8aa9d4fc745aba17c9b5ff79ace41e9e6 Mon Sep 17 00:00:00 2001 From: goose Date: Tue, 25 Feb 2020 21:50:17 +0800 Subject: [PATCH 0106/1191] fix --- tb_price_lite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index 74368adb4..cfd0c3d53 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -46,7 +46,7 @@ if (url.indexOf(path1) != -1) { } if (url.indexOf(path2) != -1) { - $done({ body }) + $done({ $response.body }) const obj = JSON.parse(body) let item = obj.data.item let shareUrl = `https://item.taobao.com/item.htm?id=${item.itemId}` From 2242a7cbf40b79bd5adfd954f1bdcaf75f7b09ee Mon Sep 17 00:00:00 2001 From: goose Date: Tue, 25 Feb 2020 21:51:39 +0800 Subject: [PATCH 0107/1191] fix --- tb_price_lite.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index cfd0c3d53..0fde2bb6e 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -46,7 +46,8 @@ if (url.indexOf(path1) != -1) { } if (url.indexOf(path2) != -1) { - $done({ $response.body }) + const body = $response.body + $done({ body }) const obj = JSON.parse(body) let item = obj.data.item let shareUrl = `https://item.taobao.com/item.htm?id=${item.itemId}` From b47d3395efef0ec22cf33fbe33705a146d19fe2d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 25 Feb 2020 22:14:04 +0800 Subject: [PATCH 0108/1191] Update tb_price.js --- tb_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price.js b/tb_price.js index 10c4f18d3..f79c7eec4 100644 --- a/tb_price.js +++ b/tb_price.js @@ -3,7 +3,6 @@ README:https://github.com/yichahucha/surge/tree/master */ const $tool = new Tool() -const $base64 = new Base64() const consoleLog = false const url = $request.url const path1 = "/amdc/mobileDispatch" @@ -11,6 +10,7 @@ const path2 = "/gw/mtop.taobao.detail.getdetail" if (url.indexOf(path1) != -1) { if ($tool.isResponse) { + const $base64 = new Base64() let body = $response.body let obj = JSON.parse($base64.decode(body)) let dns = obj.dns From cae85cbc7dd81aa3322bee547f15df9cb9995771 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 25 Feb 2020 22:14:37 +0800 Subject: [PATCH 0109/1191] Update tb_price_lite.js --- tb_price_lite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index 0fde2bb6e..77db89229 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -3,7 +3,6 @@ README:https://github.com/yichahucha/surge/tree/master */ const $tool = new Tool() -const $base64 = new Base64() const consoleLog = false const url = $request.url const path1 = "/amdc/mobileDispatch" @@ -11,6 +10,7 @@ const path2 = "/gw/mtop.taobao.detail.getdetail" if (url.indexOf(path1) != -1) { if ($tool.isResponse) { + const $base64 = new Base64() let body = $response.body let obj = JSON.parse($base64.decode(body)) let dns = obj.dns From bdae343c70e7c49db9e7861a38e6e9c5d99f30b6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 25 Feb 2020 22:24:25 +0800 Subject: [PATCH 0110/1191] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f878a78d1..0c336e552 100644 --- a/README.md +++ b/README.md @@ -47,10 +47,10 @@ hostname = trade-acs.m.taobao.com,amdc.m.taobao.com # IP-CIDR, 47.102.83.0/24, REJECT, no-resolve ``` -Daily work check-in reminder +DingDing clock in ``` [Script] -cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/surge/master/check_in.js +cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/surge/master/clock_in.js ``` # Quan-X @@ -103,10 +103,10 @@ hostname = trade-acs.m.taobao.com,amdc.m.taobao.com # ip-cidr, 47.102.83.0/24, reject ``` -Daily work check-in reminder +DingDing clock in ``` [task_local] -0 9,18 * * 1-5 check_in.js +0 9,18 * * 1-5 clock_in.js ``` [Issue Group](http://t.me/scriptgroup) From a3a49e72b0e2e78e7a92467a2b0d9066af495266 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 25 Feb 2020 22:24:59 +0800 Subject: [PATCH 0111/1191] Rename check_in.js to clock_in.js --- check_in.js => clock_in.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename check_in.js => clock_in.js (99%) diff --git a/check_in.js b/clock_in.js similarity index 99% rename from check_in.js rename to clock_in.js index 00792d523..bd6018988 100644 --- a/check_in.js +++ b/clock_in.js @@ -76,4 +76,4 @@ function Tool() { } return response } -} \ No newline at end of file +} From 9a799e14854342a801623957460508aa34132b05 Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 26 Feb 2020 11:09:08 +0800 Subject: [PATCH 0112/1191] fix --- jd_price.js | 9 ++++++--- jd_price_lite.js | 9 ++++++--- tb_price.js | 13 ++++++++----- tb_price_lite.js | 9 ++++++--- 4 files changed, 26 insertions(+), 14 deletions(-) diff --git a/jd_price.js b/jd_price.js index e3d704773..869ac4b9d 100644 --- a/jd_price.js +++ b/jd_price.js @@ -122,7 +122,7 @@ function historySummary(single) { } function difference(currentPrice, price) { - let difference = strip(currentPrice - price) + let difference = sub(currentPrice, price) if (difference == 0) { return "-" } else { @@ -130,8 +130,11 @@ function difference(currentPrice, price) { } } -function strip(num, precision = 12) { - return +parseFloat(num.toPrecision(precision)); +function sub(num1, num2) { + const num1Digits = (num1.toString().split('.')[1] || '').length; + const num2Digits = (num2.toString().split('.')[1] || '').length; + const baseNum = Math.pow(10, Math.max(num1Digits, num2Digits)); + return (num1 * baseNum - num2 * baseNum) / baseNum; } function request_history_price(share_url, callback) { diff --git a/jd_price_lite.js b/jd_price_lite.js index 401227b86..45bcdacef 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -103,7 +103,7 @@ function historySummary(single) { } function difference(currentPrice, price) { - let difference = strip(currentPrice - price) + let difference = sub(currentPrice, price) if (difference == 0) { return "-" } else { @@ -111,8 +111,11 @@ function difference(currentPrice, price) { } } -function strip(num, precision = 12) { - return +parseFloat(num.toPrecision(precision)); +function sub(num1, num2) { + const num1Digits = (num1.toString().split('.')[1] || '').length; + const num2Digits = (num2.toString().split('.')[1] || '').length; + const baseNum = Math.pow(10, Math.max(num1Digits, num2Digits)); + return (num1 * baseNum - num2 * baseNum) / baseNum; } function request_history_price(share_url, callback) { diff --git a/tb_price.js b/tb_price.js index f79c7eec4..f85df2c32 100644 --- a/tb_price.js +++ b/tb_price.js @@ -3,10 +3,10 @@ README:https://github.com/yichahucha/surge/tree/master */ const $tool = new Tool() -const consoleLog = false -const url = $request.url const path1 = "/amdc/mobileDispatch" const path2 = "/gw/mtop.taobao.detail.getdetail" +const consoleLog = false +const url = $request.url if (url.indexOf(path1) != -1) { if ($tool.isResponse) { @@ -216,7 +216,7 @@ function historySummary(single) { } function difference(currentPrice, price) { - let difference = strip(currentPrice - price) + let difference = sub(currentPrice, price) if (difference == 0) { return "-" } else { @@ -224,8 +224,11 @@ function difference(currentPrice, price) { } } -function strip(num, precision = 12) { - return +parseFloat(num.toPrecision(precision)); +function sub(num1, num2) { + const num1Digits = (num1.toString().split('.')[1] || '').length; + const num2Digits = (num2.toString().split('.')[1] || '').length; + const baseNum = Math.pow(10, Math.max(num1Digits, num2Digits)); + return (num1 * baseNum - num2 * baseNum) / baseNum; } function requestPrice(share_url, callback) { diff --git a/tb_price_lite.js b/tb_price_lite.js index 77db89229..0e9a1748c 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -133,7 +133,7 @@ function historySummary(single) { } function difference(currentPrice, price) { - let difference = strip(currentPrice - price) + let difference = sub(currentPrice, price) if (difference == 0) { return "-" } else { @@ -141,8 +141,11 @@ function difference(currentPrice, price) { } } -function strip(num, precision = 12) { - return +parseFloat(num.toPrecision(precision)); +function sub(num1, num2) { + const num1Digits = (num1.toString().split('.')[1] || '').length; + const num2Digits = (num2.toString().split('.')[1] || '').length; + const baseNum = Math.pow(10, Math.max(num1Digits, num2Digits)); + return (num1 * baseNum - num2 * baseNum) / baseNum; } function requestPrice(share_url, callback) { From b4b5632dbf43990f31bae11986c26c951423c9fb Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 26 Feb 2020 14:40:57 +0800 Subject: [PATCH 0113/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0c336e552..3fd240741 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ Remove weibo ads ``` [Script] -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js [MITM] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` @@ -58,8 +58,8 @@ cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/s Remove weibo ads ``` [rewrite_local] -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body wb_ad.js ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body wb_launch.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body wb_ad.js [mitm] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` From 00078438f05a1437884d2026189cbf8273e114cd Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 26 Feb 2020 20:37:38 +0800 Subject: [PATCH 0114/1191] fix --- nf_rating.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/nf_rating.js b/nf_rating.js index de65cd652..3e0a89e8e 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -60,7 +60,15 @@ if (!$tool.isResponse) { .catch(error => msg = error + "\n") .finally(() => { let summary = obj.value.videos[videoID].summary; - summary["supplementalMessage"] = `${msg}${summary && summary.supplementalMessage ? "\n" + summary.supplementalMessage : ""}`; + if (summary && summary.imageTypeIdentifier && summary.imageTypeIdentifier.match(/^top/)) { + const ranking = `#${summary.supplementalMessage ? summary.supplementalMessage.match(/\d/g).join("") : ""}`; + const ratings = msg.split("\n") + let rating = msg + if (ratings.length > 1) rating = `${ratings[1].split(" ")[0].replace(/\s{2}/g, " ")} ${ratings[2].split(" ")[0].replace(/\s{2}/g, " ")}` + summary["supplementalMessage"] = `${ranking} ${rating}`; + } else { + summary["supplementalMessage"] = `${msg}${summary && summary.supplementalMessage ? "\n" + summary.supplementalMessage : ""}`; + } if (consoleLog) console.log("Netflix Modified Body:\n" + JSON.stringify(obj)); $done({ body: JSON.stringify(obj) }); }); @@ -151,7 +159,7 @@ function get_IMDb_message(data) { if (imdb_source == "Internet Movie Database") { const imdb_votes = data.imdbVotes; const imdb_rating = ratings[0]["Value"]; - rating_message = "IMDb: ⭐️ " + imdb_rating + " " + "" + imdb_votes; + rating_message = "IMDb: ⭐️ " + imdb_rating + " " + imdb_votes; if (data.Type == "movie") { if (ratings.length > 1) { const source = ratings[1]["Source"]; From f8640898ce3121da0d28c6154acde8e3f55e16e8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 26 Feb 2020 22:27:37 +0800 Subject: [PATCH 0115/1191] Update nf_rating.js --- nf_rating.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nf_rating.js b/nf_rating.js index 3e0a89e8e..7e53e5f13 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -38,9 +38,10 @@ if (!$tool.isResponse) { } let year = null; let type = video.summary.type; - if (type == "movie") { - year = video.details.releaseYear; - } else if (type == "show") { + // if (type == "movie") { + // year = video.details.releaseYear; + // } + if (type == "show") { type = "series"; } delete video.details; @@ -546,4 +547,4 @@ function Tool() { } return response } -} \ No newline at end of file +} From 403aa2f984d9ed611f2b65b2a8b1695f4ae73440 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 28 Feb 2020 09:52:20 +0800 Subject: [PATCH 0116/1191] Create eval_script.js --- eval_script.js | 185 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 eval_script.js diff --git a/eval_script.js b/eval_script.js new file mode 100644 index 000000000..61e8a9a65 --- /dev/null +++ b/eval_script.js @@ -0,0 +1,185 @@ +/** + * 远程脚本管理 beta(QuanX举例,Surge同理) + * + * 设置定时任务更新 conf 配置的远程脚本,第一次运行需要手动执行一下更新脚本,例如设置每天凌晨更新脚本: + * [task_local] + * 0 0 * * * eval_script.js + * + * conf 配置说明: + * key = 远程脚本的URL value = 脚本匹配对应的URL + * + * 脚本使用,只需要改一下之前配置的本地脚本名为本脚本名,例如京东 jd_price.js 改为 eval_price.js 即可: + * [rewrite_local] + * ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js + * [mitm] + * hostname = api.m.jd.com + */ +const conf = { + "https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js": "^https?:\/\/api\.m\.jd.com", + "https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js": ["^https?://trade-acs\.m\.taobao\.com", "^https?://amdc\.m\.taobao\.com"], + "https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js": "^https?://ios\.prod\.ftl\.netflix\.com", + "https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js": "^https?://m?api\.weibo\.c(n|om)", + "https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js": "^https?://(sdk|wb)app\.uve\.weibo\.com", + //继续添加新的远程脚本... +} +const $tool = new Tool() +const isTask = $tool.isTask + +if (isTask) { + const downloadScript = (url) => { + return new Promise((resolve) => { + $tool.get(url, (error, response, body) => { + let filename = url.match(/.*\/(.*?)$/)[1] + if (!error) { + if (response.statusCode == 200) { + $tool.write(body, url) + resolve(`🪓${filename} update success`) + console.log(`Update success: ${url}`) + } else { + resolve(`🪓${filename} update fail`) + console.log(`Update fail ${response.statusCode}: ${url}`) + } + } else { + resolve(`🪓${filename} update fail`) + console.log(`Update fail ${error}: ${url}`) + } + }) + }) + } + const promises = (() => { + let all = [] + Object.keys(conf).forEach((url) => { + all.push(downloadScript(url)) + }); + return all + })() + + console.log("Start updating...") + Promise.all(promises).then(vals => { + console.log("Stop updating.") + console.log(vals.join("\n")) + let lastDate = $tool.read("ScriptLastUpdateDate") + lastDate = lastDate ? lastDate : new Date() + $tool.notify("Update done.", `${lastDate.Format("yyyy-MM-dd HH:mm:ss")} last update.`, `${vals.join("\n")}`) + $tool.write(new Date(), "ScriptLastUpdateDate") + $done() + }) +} + +if (!isTask) { + const url = $request.url + const script = (() => { + let s = null + for (let key in conf) { + let value = conf[key] + if (Array.isArray(value)) { + value.some((item) => { + if (url.match(item)) { + s = { url: key, content: $tool.read(key) } + return true + } + }) + } else { + if (url.match(value)) { + s = { url: key, content: $tool.read(key) } + } + } + } + return s + })() + if (script) { + if (script.content) { + eval(script.content) + console.log(`Execute script: ${script.url}`) + } else { + $done({}) + console.log(`Not found script: ${script.url}`) + } + } else { + $done({}) + console.log(`Not match URL: ${url}`) + } +} + +if (!Array.isArray) { + Array.isArray = function (arg) { + return Object.prototype.toString.call(arg) === '[object Array]' + } +} + +Date.prototype.Format = function (fmt) { + var o = { + "M+": this.getMonth() + 1, + "d+": this.getDate(), + "H+": this.getHours(), + "m+": this.getMinutes(), + "s+": this.getSeconds(), + "q+": Math.floor((this.getMonth() + 3) / 3), + "S": this.getMilliseconds() + }; + if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); + for (var k in o) + if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + return fmt; +} + +function Tool() { + _node = (() => { + if (typeof require == "function") { + const request = require('request') + return ({ request }) + } else { + return (null) + } + })() + _isSurge = typeof $httpClient != "undefined" + _isQuanX = typeof $task != "undefined" + _isTask = typeof $request == "undefined" + this.isSurge = _isSurge + this.isQuanX = _isQuanX + this.isTask = _isTask + this.isResponse = typeof $response != "undefined" + this.notify = (title, subtitle, message) => { + if (_isQuanX) $notify(title, subtitle, message) + if (_isSurge) $notification.post(title, subtitle, message) + if (_node) console.log(JSON.stringify({ title, subtitle, message })); + } + this.write = (value, key) => { + if (_isQuanX) return $prefs.setValueForKey(value, key) + if (_isSurge) return $persistentStore.write(value, key) + if (_node) console.log(`${key} write success`); + } + this.read = (key) => { + if (_isQuanX) return $prefs.valueForKey(key) + if (_isSurge) return $persistentStore.read(key) + if (_node) console.log(`${key} read success`); + } + this.get = (options, callback) => { + if (_isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "GET" + $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) + } + if (_isSurge) $httpClient.get(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request(options, (error, response, body) => { callback(error, _status(response), body) }) + } + this.post = (options, callback) => { + if (_isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "POST" + $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) + } + if (_isSurge) $httpClient.post(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request.post(options, (error, response, body) => { callback(error, _status(response), body) }) + } + _status = (response) => { + if (response) { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } + } + return response + } +} From e6e66478c150d19cc620898dbcd23b7dddb140a9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 28 Feb 2020 10:08:35 +0800 Subject: [PATCH 0117/1191] Update eval_script.js --- eval_script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index 61e8a9a65..57ed352a8 100644 --- a/eval_script.js +++ b/eval_script.js @@ -8,7 +8,7 @@ * conf 配置说明: * key = 远程脚本的URL value = 脚本匹配对应的URL * - * 脚本使用,只需要改一下之前配置的本地脚本名为本脚本名,例如京东 jd_price.js 改为 eval_price.js 即可: + * 脚本使用,只需要改一下之前配置的本地脚本名为本脚本名,例如京东 jd_price.js 改为 eval_script.js 即可: * [rewrite_local] * ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js * [mitm] From 7923d1a06625a2e9ae358166145d2c9abf3e1e27 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 28 Feb 2020 16:09:47 +0800 Subject: [PATCH 0118/1191] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 3fd240741..b3d9ba6d9 100644 --- a/README.md +++ b/README.md @@ -109,4 +109,11 @@ DingDing clock in 0 9,18 * * 1-5 clock_in.js ``` +Script management tool +``` +# 脚本内看详细说明 +[task_local] +0 0 * * * eval_script.js +``` + [Issue Group](http://t.me/scriptgroup) From 516a758754d116015cd16de0497437fb3c3db9fa Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 28 Feb 2020 16:09:57 +0800 Subject: [PATCH 0119/1191] Update README.md From a75fad345b943dc770516e248254bb6de0f8e1ca Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 28 Feb 2020 16:12:32 +0800 Subject: [PATCH 0120/1191] Update eval_script.js --- eval_script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index 57ed352a8..57c20ac5d 100644 --- a/eval_script.js +++ b/eval_script.js @@ -1,7 +1,7 @@ /** * 远程脚本管理 beta(QuanX举例,Surge同理) * - * 设置定时任务更新 conf 配置的远程脚本,第一次运行需要手动执行一下更新脚本,例如设置每天凌晨更新脚本: + * 设置定时任务更新 conf 配置的远程脚本,第一次运行需要手动执行一下更新脚本(Qanx 普通调试模式容易失败,使用最新 TF 红色按钮调试),例如设置每天凌晨更新脚本: * [task_local] * 0 0 * * * eval_script.js * From be14d09420498d54156032a19567ebd6b0c39344 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 28 Feb 2020 17:36:30 +0800 Subject: [PATCH 0121/1191] Update eval_script.js --- eval_script.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/eval_script.js b/eval_script.js index 57c20ac5d..19ca20770 100644 --- a/eval_script.js +++ b/eval_script.js @@ -1,27 +1,29 @@ /** - * 远程脚本管理 beta(QuanX举例,Surge同理) + * 远程脚本管理(QuanX举例,Surge同理) * - * 设置定时任务更新 conf 配置的远程脚本,第一次运行需要手动执行一下更新脚本(Qanx 普通调试模式容易失败,使用最新 TF 红色按钮调试),例如设置每天凌晨更新脚本: + * 1.设置定时任务更新添加的远程脚本,第一次运行需要手动执行一下更新脚本(Qanx 普通调试模式容易更新失败,使用最新 TF 红色按钮调试),例如设置每天凌晨更新脚本: * [task_local] * 0 0 * * * eval_script.js * - * conf 配置说明: - * key = 远程脚本的URL value = 脚本匹配对应的URL + * 2.conf 配置说明: + * 参考下面 conf 对象,key = 远程脚本的URL,value = 匹配脚本对应的URL * - * 脚本使用,只需要改一下之前配置的本地脚本名为本脚本名,例如京东 jd_price.js 改为 eval_script.js 即可: + * 3.脚本使用,只需要改一下之前配置好的本地脚本名为本脚本名,例如京东 jd_price.js 改为 eval_script.js 即可,例如: * [rewrite_local] * ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js * [mitm] * hostname = api.m.jd.com */ + const conf = { "https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js": "^https?:\/\/api\.m\.jd.com", "https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js": ["^https?://trade-acs\.m\.taobao\.com", "^https?://amdc\.m\.taobao\.com"], "https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js": "^https?://ios\.prod\.ftl\.netflix\.com", "https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js": "^https?://m?api\.weibo\.c(n|om)", "https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js": "^https?://(sdk|wb)app\.uve\.weibo\.com", - //继续添加新的远程脚本... + //添加自定义远程脚本... } + const $tool = new Tool() const isTask = $tool.isTask @@ -53,7 +55,6 @@ if (isTask) { }); return all })() - console.log("Start updating...") Promise.all(promises).then(vals => { console.log("Stop updating.") From c29a5b4f492de084b035b897fb20d9fbf3fcee36 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 28 Feb 2020 17:38:12 +0800 Subject: [PATCH 0122/1191] Update eval_script.js --- eval_script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eval_script.js b/eval_script.js index 19ca20770..74258f41d 100644 --- a/eval_script.js +++ b/eval_script.js @@ -1,12 +1,12 @@ /** - * 远程脚本管理(QuanX举例,Surge同理) + * 远程脚本管理(QuanX 举例,Surge 同理) * - * 1.设置定时任务更新添加的远程脚本,第一次运行需要手动执行一下更新脚本(Qanx 普通调试模式容易更新失败,使用最新 TF 红色按钮调试),例如设置每天凌晨更新脚本: + * 1.设置定时任务更新添加的远程脚本,第一次运行需要手动执行一下更新脚本( Qanx 普通调试模式容易更新失败,使用最新 TF 红色按钮调试),例如设置每天凌晨更新脚本: * [task_local] * 0 0 * * * eval_script.js * * 2.conf 配置说明: - * 参考下面 conf 对象,key = 远程脚本的URL,value = 匹配脚本对应的URL + * 参考下面 conf 对象,key = 远程脚本的 URL,value = 匹配脚本对应的 URL * * 3.脚本使用,只需要改一下之前配置好的本地脚本名为本脚本名,例如京东 jd_price.js 改为 eval_script.js 即可,例如: * [rewrite_local] From b66d6c08604d5e050d3f8ac0073f741c49a8a7c6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 28 Feb 2020 23:15:25 +0800 Subject: [PATCH 0123/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b3d9ba6d9..bd7e44983 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ DingDing clock in Script management tool ``` -# 脚本内看详细说明 +# 远程脚本管理 [task_local] 0 0 * * * eval_script.js ``` From db8a95c63f82218045fb1dddce695a9329d3a2fc Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 28 Feb 2020 23:24:55 +0800 Subject: [PATCH 0124/1191] fix --- eval_script.js | 59 +++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/eval_script.js b/eval_script.js index 74258f41d..b33340cb1 100644 --- a/eval_script.js +++ b/eval_script.js @@ -5,17 +5,18 @@ * [task_local] * 0 0 * * * eval_script.js * - * 2.conf 配置说明: - * 参考下面 conf 对象,key = 远程脚本的 URL,value = 匹配脚本对应的 URL + * 2.__conf 配置说明: + * 参考下面 __conf 对象,key = 远程脚本的 URL,value = 匹配脚本对应的 URL * - * 3.脚本使用,只需要改一下之前配置好的本地脚本名为本脚本名,例如京东 jd_price.js 改为 eval_script.js 即可,例如: + * 3.修改配置文件的本地脚本为此脚本,例如之前京东 jd_price.js 改为 eval_script.js 即可: * [rewrite_local] + * # ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js * ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js * [mitm] * hostname = api.m.jd.com */ -const conf = { +const __conf = { "https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js": "^https?:\/\/api\.m\.jd.com", "https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js": ["^https?://trade-acs\.m\.taobao\.com", "^https?://amdc\.m\.taobao\.com"], "https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js": "^https?://ios\.prod\.ftl\.netflix\.com", @@ -24,17 +25,17 @@ const conf = { //添加自定义远程脚本... } -const $tool = new Tool() -const isTask = $tool.isTask +const __tool = new __Tool() +const __isTask = __tool.isTask -if (isTask) { +if (__isTask) { const downloadScript = (url) => { return new Promise((resolve) => { - $tool.get(url, (error, response, body) => { + __tool.get(url, (error, response, body) => { let filename = url.match(/.*\/(.*?)$/)[1] if (!error) { if (response.statusCode == 200) { - $tool.write(body, url) + __tool.write(body, url) resolve(`🪓${filename} update success`) console.log(`Update success: ${url}`) } else { @@ -50,7 +51,7 @@ if (isTask) { } const promises = (() => { let all = [] - Object.keys(conf).forEach((url) => { + Object.keys(__conf).forEach((url) => { all.push(downloadScript(url)) }); return all @@ -59,46 +60,46 @@ if (isTask) { Promise.all(promises).then(vals => { console.log("Stop updating.") console.log(vals.join("\n")) - let lastDate = $tool.read("ScriptLastUpdateDate") + let lastDate = __tool.read("ScriptLastUpdateDate") lastDate = lastDate ? lastDate : new Date() - $tool.notify("Update done.", `${lastDate.Format("yyyy-MM-dd HH:mm:ss")} last update.`, `${vals.join("\n")}`) - $tool.write(new Date(), "ScriptLastUpdateDate") + __tool.notify("Update done.", `${lastDate.Format("yyyy-MM-dd HH:mm:ss")} last update.`, `${vals.join("\n")}`) + __tool.write(new Date(), "ScriptLastUpdateDate") $done() }) } -if (!isTask) { - const url = $request.url - const script = (() => { +if (!__isTask) { + const __url = $request.url + const __script = (() => { let s = null - for (let key in conf) { - let value = conf[key] + for (let key in __conf) { + let value = __conf[key] if (Array.isArray(value)) { value.some((item) => { - if (url.match(item)) { - s = { url: key, content: $tool.read(key) } + if (__url.match(item)) { + s = { url: key, content: __tool.read(key) } return true } }) } else { - if (url.match(value)) { - s = { url: key, content: $tool.read(key) } + if (__url.match(value)) { + s = { url: key, content: __tool.read(key) } } } } return s })() - if (script) { - if (script.content) { - eval(script.content) - console.log(`Execute script: ${script.url}`) + if (__script) { + if (__script.content) { + eval(__script.content) + console.log(`Execute script: ${__script.url}`) } else { $done({}) - console.log(`Not found script: ${script.url}`) + console.log(`Not found script: ${__script.url}`) } } else { $done({}) - console.log(`Not match URL: ${url}`) + console.log(`Not match URL: ${__url}`) } } @@ -124,7 +125,7 @@ Date.prototype.Format = function (fmt) { return fmt; } -function Tool() { +function __Tool() { _node = (() => { if (typeof require == "function") { const request = require('request') From dc0e14b53fe2cad8274d343baa16d9fc64a60fa0 Mon Sep 17 00:00:00 2001 From: goose Date: Sat, 29 Feb 2020 10:37:40 +0800 Subject: [PATCH 0125/1191] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index bd7e44983..d731b5ee0 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,4 @@ Script management tool # 远程脚本管理 [task_local] 0 0 * * * eval_script.js -``` - -[Issue Group](http://t.me/scriptgroup) +``` \ No newline at end of file From 74575c7ff2a4f1e63a9ae50a1d65c53d980dcc08 Mon Sep 17 00:00:00 2001 From: goose Date: Sat, 29 Feb 2020 13:27:43 +0800 Subject: [PATCH 0126/1191] fix --- eval_script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eval_script.js b/eval_script.js index b33340cb1..2bb1e76ba 100644 --- a/eval_script.js +++ b/eval_script.js @@ -61,9 +61,9 @@ if (__isTask) { console.log("Stop updating.") console.log(vals.join("\n")) let lastDate = __tool.read("ScriptLastUpdateDate") - lastDate = lastDate ? lastDate : new Date() - __tool.notify("Update done.", `${lastDate.Format("yyyy-MM-dd HH:mm:ss")} last update.`, `${vals.join("\n")}`) - __tool.write(new Date(), "ScriptLastUpdateDate") + lastDate = lastDate ? lastDate : new Date().Format("yyyy-MM-dd HH:mm:ss") + __tool.notify("Update done.", `${lastDate} last update.`, `${vals.join("\n")}`) + __tool.write(new Date().Format("yyyy-MM-dd HH:mm:ss"), "ScriptLastUpdateDate") $done() }) } From ba53a3924ca49498af5954c1983f5f2790d061ef Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 29 Feb 2020 14:44:02 +0800 Subject: [PATCH 0127/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d731b5ee0..aad972824 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ DingDing clock in Script management tool ``` -# 远程脚本管理 +# 远程脚本管理,需脚本内配置 [task_local] 0 0 * * * eval_script.js -``` \ No newline at end of file +``` From 1bd9bab9f98b2b3e90ffda83413bc991c29730ae Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 29 Feb 2020 23:04:52 +0800 Subject: [PATCH 0128/1191] Update README.md --- README.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/README.md b/README.md index aad972824..a81ae0ad7 100644 --- a/README.md +++ b/README.md @@ -108,10 +108,3 @@ DingDing clock in [task_local] 0 9,18 * * 1-5 clock_in.js ``` - -Script management tool -``` -# 远程脚本管理,需脚本内配置 -[task_local] -0 0 * * * eval_script.js -``` From 47ce7356ad111cd14e5945991e6f8dce4b23538c Mon Sep 17 00:00:00 2001 From: goose Date: Sun, 1 Mar 2020 10:44:55 +0800 Subject: [PATCH 0129/1191] optimize conf --- eval_script.js | 134 ++++++++++++++++++++++++++++++------------------- 1 file changed, 83 insertions(+), 51 deletions(-) diff --git a/eval_script.js b/eval_script.js index 2bb1e76ba..2588f157f 100644 --- a/eval_script.js +++ b/eval_script.js @@ -1,12 +1,13 @@ /** * 远程脚本管理(QuanX 举例,Surge 同理) * - * 1.设置定时任务更新添加的远程脚本,第一次运行需要手动执行一下更新脚本( Qanx 普通调试模式容易更新失败,使用最新 TF 红色按钮调试),例如设置每天凌晨更新脚本: + * 1.设置定时任务更新添加的远程脚本,第一次运行需要手动执行一下更新脚本(Qanx 普通调试模式容易更新失败,使用最新 TF 红色按钮调试),例如设置每天凌晨更新脚本: * [task_local] * 0 0 * * * eval_script.js * * 2.__conf 配置说明: - * 参考下面 __conf 对象,key = 远程脚本的 URL,value = 匹配脚本对应的 URL + * 参考下面 __conf 示例,格式为:远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 + * * * 3.修改配置文件的本地脚本为此脚本,例如之前京东 jd_price.js 改为 eval_script.js 即可: * [rewrite_local] @@ -15,17 +16,27 @@ * [mitm] * hostname = api.m.jd.com */ +const __c = String.raw +const __conf = __c` -const __conf = { - "https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js": "^https?:\/\/api\.m\.jd.com", - "https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js": ["^https?://trade-acs\.m\.taobao\.com", "^https?://amdc\.m\.taobao\.com"], - "https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js": "^https?://ios\.prod\.ftl\.netflix\.com", - "https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js": "^https?://m?api\.weibo\.c(n|om)", - "https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js": "^https?://(sdk|wb)app\.uve\.weibo\.com", - //添加自定义远程脚本... -} -const __tool = new __Tool() +//京东 +https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) +//淘宝 +https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js url ^https?://.+/amdc/mobileDispatch, ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail +//奈飞 +https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D +//微博 +https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) +https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) + +//添加自定义远程脚本... + + +` + +const __tool = new ____Tool() +const __confObj = ____confObj() const __isTask = __tool.isTask if (__isTask) { @@ -51,9 +62,9 @@ if (__isTask) { } const promises = (() => { let all = [] - Object.keys(__conf).forEach((url) => { + Object.keys(__confObj).forEach((url) => { all.push(downloadScript(url)) - }); + }) return all })() console.log("Start updating...") @@ -62,7 +73,7 @@ if (__isTask) { console.log(vals.join("\n")) let lastDate = __tool.read("ScriptLastUpdateDate") lastDate = lastDate ? lastDate : new Date().Format("yyyy-MM-dd HH:mm:ss") - __tool.notify("Update done.", `${lastDate} last update.`, `${vals.join("\n")}`) + __tool.notify("Update Done.", `${lastDate} last update.`, `${vals.join("\n")}`) __tool.write(new Date().Format("yyyy-MM-dd HH:mm:ss"), "ScriptLastUpdateDate") $done() }) @@ -72,60 +83,59 @@ if (!__isTask) { const __url = $request.url const __script = (() => { let s = null - for (let key in __conf) { - let value = __conf[key] - if (Array.isArray(value)) { - value.some((item) => { - if (__url.match(item)) { - s = { url: key, content: __tool.read(key) } - return true - } - }) - } else { - if (__url.match(value)) { - s = { url: key, content: __tool.read(key) } + for (let key in __confObj) { + let value = __confObj[key] + if (!Array.isArray(value)) value = value.split(",") + value.some((url) => { + if (__url.match(url)) { + s = { url: key, content: __tool.read(key), match: url } + return true } - } + }) } return s })() if (__script) { if (__script.content) { eval(__script.content) - console.log(`Execute script: ${__script.url}`) + console.log(`Request url: ${__url}\nMatch url: ${__script.match}\nExecute script: ${__script.url}`) } else { $done({}) - console.log(`Not found script: ${__script.url}`) + console.log(`Request url: ${__url}\nMatch url: ${__script.match}\nScript not executed. Script not found: ${__script.url}`) } } else { $done({}) - console.log(`Not match URL: ${__url}`) - } -} - -if (!Array.isArray) { - Array.isArray = function (arg) { - return Object.prototype.toString.call(arg) === '[object Array]' + console.log(`No match url: ${__url}`) } } -Date.prototype.Format = function (fmt) { - var o = { - "M+": this.getMonth() + 1, - "d+": this.getDate(), - "H+": this.getHours(), - "m+": this.getMinutes(), - "s+": this.getSeconds(), - "q+": Math.floor((this.getMonth() + 3) / 3), - "S": this.getMilliseconds() - }; - if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); - for (var k in o) - if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); - return fmt; +function ____confObj() { + const lines = __conf.split("\n") + let confObj = {} + lines.forEach((line) => { + line = line.replace(/^\s*/, "") + if (line.length > 0 && line.substring(0, 2) != "//") { + console.log(line); + const avaliable = (() => { + const format = /^https?:\/\/.*\s+url\s+.*/ + return format.test(line) + })() + if (avaliable) { + const value = line.split("url") + const remote = value[0].replace(/\s/g, "") + const match = value[1].replace(/\s/g, "") + confObj[remote] = match + } else { + __tool.notify("Configuration error", "", line) + throw "Configuration error:" + line + } + } + }) + console.log(`Configuration information: \n${JSON.stringify(confObj)}`) + return confObj } -function __Tool() { +function ____Tool() { _node = (() => { if (typeof require == "function") { const request = require('request') @@ -185,3 +195,25 @@ function __Tool() { return response } } + +if (!Array.isArray) { + Array.isArray = function (arg) { + return Object.prototype.toString.call(arg) === '[object Array]' + } +} + +Date.prototype.Format = function (fmt) { + var o = { + "M+": this.getMonth() + 1, + "d+": this.getDate(), + "H+": this.getHours(), + "m+": this.getMinutes(), + "s+": this.getSeconds(), + "q+": Math.floor((this.getMonth() + 3) / 3), + "S": this.getMilliseconds() + }; + if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); + for (var k in o) + if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + return fmt; +} \ No newline at end of file From 7f1d24265715dc1cf3d34ce7432f3bc93afb214a Mon Sep 17 00:00:00 2001 From: goose Date: Sun, 1 Mar 2020 10:48:41 +0800 Subject: [PATCH 0130/1191] optimize conf --- eval_script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index 2588f157f..d1c70e3bd 100644 --- a/eval_script.js +++ b/eval_script.js @@ -1,5 +1,5 @@ /** - * 远程脚本管理(QuanX 举例,Surge 同理) + * 远程脚本管理(QuanX 举例) * * 1.设置定时任务更新添加的远程脚本,第一次运行需要手动执行一下更新脚本(Qanx 普通调试模式容易更新失败,使用最新 TF 红色按钮调试),例如设置每天凌晨更新脚本: * [task_local] From e25a47d455d7595200045b564d14e19366bdd4c5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 1 Mar 2020 10:59:56 +0800 Subject: [PATCH 0131/1191] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index a81ae0ad7..95f611fff 100644 --- a/README.md +++ b/README.md @@ -108,3 +108,10 @@ DingDing clock in [task_local] 0 9,18 * * 1-5 clock_in.js ``` + +Script management tool +``` +# 远程脚本管理,脚本内添加配置 +[task_local] +0 0 * * * eval_script.js +``` From 7c004fea2c34b075248b13048c95ed4c5e2526e1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 1 Mar 2020 12:17:52 +0800 Subject: [PATCH 0132/1191] Create sub_script.conf --- sub_script.conf | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 sub_script.conf diff --git a/sub_script.conf b/sub_script.conf new file mode 100644 index 000000000..d9a7c0bd1 --- /dev/null +++ b/sub_script.conf @@ -0,0 +1,12 @@ +hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com + +//京东 +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js +//淘宝 +^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js +//奈飞 +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js +//微博 +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js From 5a6f5c907d43252a4ab36c8032f6c2ea7bff482c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 1 Mar 2020 13:06:39 +0800 Subject: [PATCH 0133/1191] Update sub_script.conf --- sub_script.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sub_script.conf b/sub_script.conf index d9a7c0bd1..7a12b8155 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,12 +1,20 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com //京东 +### https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js + //淘宝 +### https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js url ^https?://.+/amdc/mobileDispatch, ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js + //奈飞 +### https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js + //微博 +### https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) +### https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js From 9ea4685aa6128364938792d6c2503590ca3a8399 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 1 Mar 2020 16:36:52 +0800 Subject: [PATCH 0134/1191] Create sub_script1.conf --- sub_script1.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 sub_script1.conf diff --git a/sub_script1.conf b/sub_script1.conf new file mode 100644 index 000000000..ce19ad1ca --- /dev/null +++ b/sub_script1.conf @@ -0,0 +1,11 @@ +hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, amdc.m.taobao.com + +//淘宝 +### https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js url ^https?://.+/amdc/mobileDispatch, ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail +^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js + +//微博 +### https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) +### https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js From 82c71053795f51fd96a8cd4f97ae9323268b6638 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 1 Mar 2020 16:37:45 +0800 Subject: [PATCH 0135/1191] Update sub_script.conf --- sub_script.conf | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sub_script.conf b/sub_script.conf index 7a12b8155..9060dac11 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,20 +1,10 @@ -hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com +hostname = api.m.jd.com, ios.prod.ftl.netflix.com //京东 ### https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js -//淘宝 -### https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js url ^https?://.+/amdc/mobileDispatch, ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail -^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js - //奈飞 ### https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js - -//微博 -### https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) -### https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js From 50d3b55ba163a509992d7cf5b60f57a4093910ab Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 1 Mar 2020 16:57:19 +0800 Subject: [PATCH 0136/1191] Update sub_script.conf --- sub_script.conf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sub_script.conf b/sub_script.conf index 9060dac11..f62643976 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,9 +1,5 @@ hostname = api.m.jd.com, ios.prod.ftl.netflix.com -//京东 -### https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js - //奈飞 ### https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js From 5336c30345127b6ff8a5e0f3e71fb1a2f33f334a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 1 Mar 2020 17:27:50 +0800 Subject: [PATCH 0137/1191] optimize --- eval_script.js | 165 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 128 insertions(+), 37 deletions(-) diff --git a/eval_script.js b/eval_script.js index d1c70e3bd..70d99d534 100644 --- a/eval_script.js +++ b/eval_script.js @@ -6,39 +6,47 @@ * 0 0 * * * eval_script.js * * 2.__conf 配置说明: - * 参考下面 __conf 示例,格式为:远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 * + * 参考下面 __conf 示例 * - * 3.修改配置文件的本地脚本为此脚本,例如之前京东 jd_price.js 改为 eval_script.js 即可: + * [远程订阅] + * 参考示例:https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf + * + * [本地添加] + * 格式为:远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 + * + * 如果是本地添加需要修改配置文件的本地脚本为此脚本,例如之前京东 jd_price.js 改为 eval_script.js 即可: * [rewrite_local] * # ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js * ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js * [mitm] * hostname = api.m.jd.com */ -const __c = String.raw -const __conf = __c` +//配置 +const __conf = String.raw` + + + +[remote] +//配置远程订阅 +https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf +https://raw.githubusercontent.com/yichahucha/surge/master/sub_script1.conf + + + +[local] +//配置本地脚本 //京东 https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) -//淘宝 -https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js url ^https?://.+/amdc/mobileDispatch, ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail -//奈飞 -https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D -//微博 -https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) -https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) -//添加自定义远程脚本... ` const __tool = new ____Tool() -const __confObj = ____confObj() const __isTask = __tool.isTask - if (__isTask) { const downloadScript = (url) => { return new Promise((resolve) => { @@ -47,40 +55,88 @@ if (__isTask) { if (!error) { if (response.statusCode == 200) { __tool.write(body, url) - resolve(`🪓${filename} update success`) + resolve({ body, msg: `🪓${filename} update success` }) console.log(`Update success: ${url}`) } else { - resolve(`🪓${filename} update fail`) + resolve({ body, msg: `🪓${filename} update fail` }) console.log(`Update fail ${response.statusCode}: ${url}`) } } else { - resolve(`🪓${filename} update fail`) + resolve({ body: null, msg: `🪓${filename} update fail` }) console.log(`Update fail ${error}: ${url}`) } }) }) } - const promises = (() => { - let all = [] - Object.keys(__confObj).forEach((url) => { - all.push(downloadScript(url)) + + const getConf = (() => { + return new Promise((resolve) => { + const remoteConf = ____removeGarbage(____getConfInfo(__conf, "remote")) + const localConf = ____removeGarbage(____getConfInfo(__conf, "local")) + if (remoteConf.length > 0) { + const promises = (() => { + let all = [] + remoteConf.forEach((url) => { + all.push(downloadScript(url)) + }) + return all + })() + Promise.all(promises).then(result => { + let allRemoteConf = "" + let allRemoteMSg = "" + result.forEach(data => { + if (data.body) { + allRemoteConf += "\n" + ____parseRemoteConf(data.body) + } + allRemoteMSg += allRemoteMSg.length > 0 ? "\n" + data.msg : data.msg + }); + let content = localConf.join("\n") + if (allRemoteConf.length > 0) { + content = `${content}\n${allRemoteConf}` + } + resolve({ content, msg: allRemoteMSg }) + }) + } else { + const content = localConf.join("\n") + resolve({ content: content, msg: "" }) + } }) - return all - })() - console.log("Start updating...") - Promise.all(promises).then(vals => { - console.log("Stop updating.") - console.log(vals.join("\n")) - let lastDate = __tool.read("ScriptLastUpdateDate") - lastDate = lastDate ? lastDate : new Date().Format("yyyy-MM-dd HH:mm:ss") - __tool.notify("Update Done.", `${lastDate} last update.`, `${vals.join("\n")}`) - __tool.write(new Date().Format("yyyy-MM-dd HH:mm:ss"), "ScriptLastUpdateDate") - $done() }) + + getConf() + .then((conf) => { + const parseConf = ____parseConf(conf.content) + const promises = (() => { + let all = [] + Object.keys(parseConf).forEach((url) => { + all.push(downloadScript(url)) + }) + return all + })() + console.log("Start updating...") + Promise.all(promises).then(result => { + console.log("Stop updating.") + const notifyMsg = (() => { + let msg = conf.msg + result.forEach(data => { + msg += msg.length > 0 ? "\n" + data.msg : data.msg + }); + return msg + })() + console.log(notifyMsg) + let lastDate = __tool.read("ScriptLastUpdateDate") + lastDate = lastDate ? lastDate : new Date().Format("yyyy-MM-dd HH:mm:ss") + __tool.notify("Update Done.", `${lastDate} last update.`, `${notifyMsg}`) + __tool.write(JSON.stringify(parseConf), "ScriptConfObject") + __tool.write(new Date().Format("yyyy-MM-dd HH:mm:ss"), "ScriptLastUpdateDate") + $done() + }) + }) } if (!__isTask) { const __url = $request.url + const __confObj = JSON.parse(__tool.read("ScriptConfObject")) const __script = (() => { let s = null for (let key in __confObj) { @@ -109,13 +165,48 @@ if (!__isTask) { } } -function ____confObj() { - const lines = __conf.split("\n") +function ____getConfInfo(conf, type) { + const rex = new RegExp("\\[" + type + "\\](.|\\n)*?($|\\n\\[)", "g") + let result = rex.exec(conf) + result = result[0].split("\n") + if (result[2].length > 0) { + result.pop() + } + result.shift() + return result +} + +function ____parseRemoteConf(conf) { + const lines = conf.split("\n") + let newLines = [] + lines.forEach((line) => { + line = line.replace(/^\s*/, "") + if (line.length > 0 && line.substring(0, 3) == "###") { + line = line.replace("###", "") + line = line.replace(/^\s*/, "") + newLines.push(line) + } + }) + return newLines.join("\n") +} + +function ____removeGarbage(lines) { + let newLines = [] + lines.forEach((line) => { + line = line.replace(/^\s*/, "") + if (line.length > 0 && line.substring(0, 2) != "//") { + newLines.push(line) + } + }) + return newLines +} + +function ____parseConf(conf) { + const lines = conf.split("\n") let confObj = {} lines.forEach((line) => { line = line.replace(/^\s*/, "") if (line.length > 0 && line.substring(0, 2) != "//") { - console.log(line); const avaliable = (() => { const format = /^https?:\/\/.*\s+url\s+.*/ return format.test(line) @@ -131,7 +222,7 @@ function ____confObj() { } } }) - console.log(`Configuration information: \n${JSON.stringify(confObj)}`) + console.log(`Configuration information: ${JSON.stringify(confObj)}`) return confObj } @@ -216,4 +307,4 @@ Date.prototype.Format = function (fmt) { for (var k in o) if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); return fmt; -} \ No newline at end of file +} From 37bcf52f16cdb73ed9e374fcb5248b006a8e6e0f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 1 Mar 2020 17:30:42 +0800 Subject: [PATCH 0138/1191] Update sub_script.conf --- sub_script.conf | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/sub_script.conf b/sub_script.conf index f62643976..7095aaffc 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,6 +1,21 @@ -hostname = api.m.jd.com, ios.prod.ftl.netflix.com +hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com -//奈飞 + +//京东 //京东 +### https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js + +//淘宝 //淘宝 +### https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js url ^https?://.+/amdc/mobileDispatch, ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail +^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js + +//奈飞 //奈飞 ### https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js + +//微博 //微博 +### https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) +### https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js From 1b3305666560ad53f5137400c7f70ebe898c03df Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 1 Mar 2020 17:31:28 +0800 Subject: [PATCH 0139/1191] Update sub_script.conf --- sub_script.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sub_script.conf b/sub_script.conf index 7095aaffc..71b03a6b6 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,20 +1,20 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com -//京东 //京东 +//京东 ### https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js -//淘宝 //淘宝 +//淘宝 ### https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js url ^https?://.+/amdc/mobileDispatch, ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js -//奈飞 //奈飞 +//奈飞 ### https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js -//微博 //微博 +//微博 ### https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) ### https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js From 823c09e94e259ca87cd58410b8e23f58eaef7670 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 1 Mar 2020 17:32:30 +0800 Subject: [PATCH 0140/1191] Create sub_script2.conf --- sub_script2.conf | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sub_script2.conf diff --git a/sub_script2.conf b/sub_script2.conf new file mode 100644 index 000000000..f62643976 --- /dev/null +++ b/sub_script2.conf @@ -0,0 +1,6 @@ +hostname = api.m.jd.com, ios.prod.ftl.netflix.com + +//奈飞 +### https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js From 7fd8df51738475e2413c9fe721f80ba94fa1033a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 1 Mar 2020 17:34:08 +0800 Subject: [PATCH 0141/1191] Update eval_script.js --- eval_script.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eval_script.js b/eval_script.js index 70d99d534..8810ed9b2 100644 --- a/eval_script.js +++ b/eval_script.js @@ -32,14 +32,12 @@ const __conf = String.raw` [remote] //配置远程订阅 https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf -https://raw.githubusercontent.com/yichahucha/surge/master/sub_script1.conf - [local] //配置本地脚本 //京东 -https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) +//https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) From 38c5c2eb96cc758035ea58232dbb524939eb1faf Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 1 Mar 2020 17:38:22 +0800 Subject: [PATCH 0142/1191] Update sub_script.conf --- sub_script.conf | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sub_script.conf b/sub_script.conf index 71b03a6b6..7a12b8155 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,21 +1,20 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com - //京东 ### https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js //淘宝 ### https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js url ^https?://.+/amdc/mobileDispatch, ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail -^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js +^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js //奈飞 ### https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js //微博 ### https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) ### https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js From 899f136f8af0aa6b96039291701c4ad9178fa324 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 1 Mar 2020 17:46:35 +0800 Subject: [PATCH 0143/1191] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 95f611fff..622ead330 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,6 @@ DingDing clock in Script management tool ``` -# 远程脚本管理,脚本内添加配置 [task_local] 0 0 * * * eval_script.js ``` From 238286161c2340ebe8ef8c58d56fbe228dfc2a48 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 1 Mar 2020 18:26:13 +0800 Subject: [PATCH 0144/1191] Update sub_script.conf --- sub_script.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sub_script.conf b/sub_script.conf index 7a12b8155..21c55a469 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,5 +1,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com +// ###格式为:远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2,如下 + //京东 ### https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js From f016b59b3d967a46b4977d0e39bc3c1acc23db22 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 1 Mar 2020 18:26:52 +0800 Subject: [PATCH 0145/1191] Update sub_script.conf --- sub_script.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sub_script.conf b/sub_script.conf index 21c55a469..7b0f43f10 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,22 +1,22 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com -// ###格式为:远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2,如下 +// 格式为:###远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2,如下 //京东 -### https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) +###https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js //淘宝 -### https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js url ^https?://.+/amdc/mobileDispatch, ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail +###https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js url ^https?://.+/amdc/mobileDispatch, ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js //奈飞 -### https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D +###https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js //微博 -### https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) -### https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) +###https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) +###https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js From d2484472a2db89b552c2f7647e23b572a2f10ff5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 1 Mar 2020 18:33:30 +0800 Subject: [PATCH 0146/1191] Update eval_script.js --- eval_script.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eval_script.js b/eval_script.js index 8810ed9b2..8d20c617a 100644 --- a/eval_script.js +++ b/eval_script.js @@ -9,10 +9,10 @@ * * 参考下面 __conf 示例 * - * [远程订阅] + * [远程订阅脚本] * 参考示例:https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf * - * [本地添加] + * [本地添加脚本远程连接] * 格式为:远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 * * 如果是本地添加需要修改配置文件的本地脚本为此脚本,例如之前京东 jd_price.js 改为 eval_script.js 即可: @@ -30,12 +30,12 @@ const __conf = String.raw` [remote] -//配置远程订阅 +//配置脚本远程订阅 https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf [local] -//配置本地脚本 +//配置脚本远程连接 //京东 //https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) From ee4a7993d26b50dbcbb5df85582959563021cea5 Mon Sep 17 00:00:00 2001 From: goose Date: Sun, 1 Mar 2020 20:54:01 +0800 Subject: [PATCH 0147/1191] optimize --- eval_script.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eval_script.js b/eval_script.js index 8d20c617a..785f2c536 100644 --- a/eval_script.js +++ b/eval_script.js @@ -5,17 +5,17 @@ * [task_local] * 0 0 * * * eval_script.js * - * 2.__conf 配置说明: + * 2.__conf 配置脚本远程链接说明: * * 参考下面 __conf 示例 * - * [远程订阅脚本] + * [远程配置] * 参考示例:https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf * - * [本地添加脚本远程连接] + * [本地配置] * 格式为:远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 * - * 如果是本地添加需要修改配置文件的本地脚本为此脚本,例如之前京东 jd_price.js 改为 eval_script.js 即可: + * 如果是本地配置需要修改配置文件的本地脚本为此脚本,例如之前京东 jd_price.js 改为 eval_script.js 即可: * [rewrite_local] * # ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js * ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js @@ -30,12 +30,12 @@ const __conf = String.raw` [remote] -//配置脚本远程订阅 +//远程配置 https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf [local] -//配置脚本远程连接 +//本地配置 //京东 //https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) From 19c7818738062b078689dc9ae0fdcf5e07e10855 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 11:29:33 +0800 Subject: [PATCH 0148/1191] Update eval_script.js --- eval_script.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index 785f2c536..8e11db0d8 100644 --- a/eval_script.js +++ b/eval_script.js @@ -10,12 +10,13 @@ * 参考下面 __conf 示例 * * [远程配置] + * 格式为:###远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 * 参考示例:https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf * * [本地配置] * 格式为:远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 * - * 如果是本地配置需要修改配置文件的本地脚本为此脚本,例如之前京东 jd_price.js 改为 eval_script.js 即可: + * 如果是本地配置需要修改配置文件的本地脚本路径为此脚本 eval_script.js 的路径,例如之前京东 jd_price.js 改为 eval_script.js 即可: * [rewrite_local] * # ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js * ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js From 7a183c71103f3ea6a8ceb2872862f4d0ffd6241b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 11:30:45 +0800 Subject: [PATCH 0149/1191] Update eval_script.js --- eval_script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index 8e11db0d8..b39be572a 100644 --- a/eval_script.js +++ b/eval_script.js @@ -5,7 +5,7 @@ * [task_local] * 0 0 * * * eval_script.js * - * 2.__conf 配置脚本远程链接说明: + * 2.__conf 配置说明: * * 参考下面 __conf 示例 * From 843dab911261fa9632598834b571514eeb400ff0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 11:32:08 +0800 Subject: [PATCH 0150/1191] Update eval_script.js --- eval_script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index b39be572a..45ff71aef 100644 --- a/eval_script.js +++ b/eval_script.js @@ -16,7 +16,7 @@ * [本地配置] * 格式为:远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 * - * 如果是本地配置需要修改配置文件的本地脚本路径为此脚本 eval_script.js 的路径,例如之前京东 jd_price.js 改为 eval_script.js 即可: + * 如果是本地配置需要修改配置文件的本地脚本路径为此脚本(eval_script.js)的路径,例如之前京东 jd_price.js 改为 eval_script.js 即可: * [rewrite_local] * # ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js * ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js From 496c6b032fb9f67c5dc09fd401ec2b476002e745 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 11:38:32 +0800 Subject: [PATCH 0151/1191] Update eval_script.js --- eval_script.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/eval_script.js b/eval_script.js index 45ff71aef..93131b9cd 100644 --- a/eval_script.js +++ b/eval_script.js @@ -1,7 +1,7 @@ /** * 远程脚本管理(QuanX 举例) * - * 1.设置定时任务更新添加的远程脚本,第一次运行需要手动执行一下更新脚本(Qanx 普通调试模式容易更新失败,使用最新 TF 红色按钮调试),例如设置每天凌晨更新脚本: + * 1.设置定时任务更新添加的远程脚本,第一次运行需要手动执行一下更新脚本(Qanx 普通调试模式容易更新失败,使用最新 TF 橙色按钮调试),例如设置每天凌晨更新脚本: * [task_local] * 0 0 * * * eval_script.js * @@ -47,7 +47,7 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf const __tool = new ____Tool() const __isTask = __tool.isTask if (__isTask) { - const downloadScript = (url) => { + const downloadFile = (url) => { return new Promise((resolve) => { __tool.get(url, (error, response, body) => { let filename = url.match(/.*\/(.*?)$/)[1] @@ -73,14 +73,14 @@ if (__isTask) { const remoteConf = ____removeGarbage(____getConfInfo(__conf, "remote")) const localConf = ____removeGarbage(____getConfInfo(__conf, "local")) if (remoteConf.length > 0) { - const promises = (() => { + const confPromises = (() => { let all = [] remoteConf.forEach((url) => { - all.push(downloadScript(url)) + all.push(downloadFile(url)) }) return all })() - Promise.all(promises).then(result => { + Promise.all(confPromises).then(result => { let allRemoteConf = "" let allRemoteMSg = "" result.forEach(data => { @@ -105,15 +105,15 @@ if (__isTask) { getConf() .then((conf) => { const parseConf = ____parseConf(conf.content) - const promises = (() => { + const scriptPromises = (() => { let all = [] Object.keys(parseConf).forEach((url) => { - all.push(downloadScript(url)) + all.push(downloadFile(url)) }) return all })() console.log("Start updating...") - Promise.all(promises).then(result => { + Promise.all(scriptPromises).then(result => { console.log("Stop updating.") const notifyMsg = (() => { let msg = conf.msg From dbbcaaaa076f3c74097ed1c6ca4db736bc39b3f3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 11:54:47 +0800 Subject: [PATCH 0152/1191] Update sub_script.conf --- sub_script.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sub_script.conf b/sub_script.conf index 7b0f43f10..b01729017 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,6 +1,6 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com -// 格式为:###远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2,如下 +//配置格式: ###远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2,如下 //京东 ###https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) From b3eabf2c2e32787e9ac3a3d90d8a49b54a810e1d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 11:56:23 +0800 Subject: [PATCH 0153/1191] Update eval_script.js --- eval_script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eval_script.js b/eval_script.js index 93131b9cd..d9f0c1ab6 100644 --- a/eval_script.js +++ b/eval_script.js @@ -1,5 +1,5 @@ /** - * 远程脚本管理(QuanX 举例) + * 脚本管理工具(QuanX 举例) * * 1.设置定时任务更新添加的远程脚本,第一次运行需要手动执行一下更新脚本(Qanx 普通调试模式容易更新失败,使用最新 TF 橙色按钮调试),例如设置每天凌晨更新脚本: * [task_local] @@ -18,7 +18,7 @@ * * 如果是本地配置需要修改配置文件的本地脚本路径为此脚本(eval_script.js)的路径,例如之前京东 jd_price.js 改为 eval_script.js 即可: * [rewrite_local] - * # ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js + * #^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js * ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js * [mitm] * hostname = api.m.jd.com From 8a50cc58d2449ef0c57adfdc69cd7ad6c6235feb Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 12:32:33 +0800 Subject: [PATCH 0154/1191] Update eval_script.js --- eval_script.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/eval_script.js b/eval_script.js index d9f0c1ab6..3df6b9e80 100644 --- a/eval_script.js +++ b/eval_script.js @@ -1,22 +1,23 @@ /** * 脚本管理工具(QuanX 举例) * - * 1.设置定时任务更新添加的远程脚本,第一次运行需要手动执行一下更新脚本(Qanx 普通调试模式容易更新失败,使用最新 TF 橙色按钮调试),例如设置每天凌晨更新脚本: + * 一.设置定时任务更新添加的远程脚本,第一次运行需要手动执行一下更新脚本(Qanx 普通调试模式容易更新失败,使用最新 TF 橙色按钮调试),例如设置每天凌晨更新脚本: * [task_local] * 0 0 * * * eval_script.js * - * 2.__conf 配置说明: + * 二.__conf 配置说明: * * 参考下面 __conf 示例 * * [远程配置] - * 格式为:###远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 + * 1.添加注释格式为:###远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 + * 2.修改原脚本路径为 eval_script.js 的脚本路径 * 参考示例:https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf * * [本地配置] - * 格式为:远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 - * - * 如果是本地配置需要修改配置文件的本地脚本路径为此脚本(eval_script.js)的路径,例如之前京东 jd_price.js 改为 eval_script.js 即可: + * 1.添加配置格式为:远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 + * 2.修改原脚本路径为 eval_script.js 的脚本路径 + * 例如修改京东脚本: * [rewrite_local] * #^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js * ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js From 79123186071d5a64859385253df433ba0b4e0874 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 12:33:38 +0800 Subject: [PATCH 0155/1191] Update eval_script.js --- eval_script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eval_script.js b/eval_script.js index 3df6b9e80..114d72635 100644 --- a/eval_script.js +++ b/eval_script.js @@ -10,12 +10,12 @@ * 参考下面 __conf 示例 * * [远程配置] - * 1.添加注释格式为:###远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 + * 1.添加注释,格式为:###远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 * 2.修改原脚本路径为 eval_script.js 的脚本路径 * 参考示例:https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf * * [本地配置] - * 1.添加配置格式为:远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 + * 1.添加配置,格式为:远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 * 2.修改原脚本路径为 eval_script.js 的脚本路径 * 例如修改京东脚本: * [rewrite_local] From 7f1b27ae5ab4654bb6a81a7db13ab19763666086 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 13:25:17 +0800 Subject: [PATCH 0156/1191] Update eval_script.js --- eval_script.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/eval_script.js b/eval_script.js index 114d72635..9aa0b0cab 100644 --- a/eval_script.js +++ b/eval_script.js @@ -47,6 +47,7 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf const __tool = new ____Tool() const __isTask = __tool.isTask + if (__isTask) { const downloadFile = (url) => { return new Promise((resolve) => { @@ -81,7 +82,9 @@ if (__isTask) { }) return all })() + console.log("Start updating conf...") Promise.all(confPromises).then(result => { + console.log("Stop updating conf.") let allRemoteConf = "" let allRemoteMSg = "" result.forEach(data => { @@ -113,9 +116,9 @@ if (__isTask) { }) return all })() - console.log("Start updating...") + console.log("Start updating script...") Promise.all(scriptPromises).then(result => { - console.log("Stop updating.") + console.log("Stop updating script.") const notifyMsg = (() => { let msg = conf.msg result.forEach(data => { @@ -151,6 +154,7 @@ if (!__isTask) { } return s })() + if (__script) { if (__script.content) { eval(__script.content) From 78d346c5054ea09c5075fc4371a5bdb55a4777e8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 13:26:23 +0800 Subject: [PATCH 0157/1191] Update eval_script.js --- eval_script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eval_script.js b/eval_script.js index 9aa0b0cab..d3bb643cf 100644 --- a/eval_script.js +++ b/eval_script.js @@ -16,8 +16,8 @@ * * [本地配置] * 1.添加配置,格式为:远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 - * 2.修改原脚本路径为 eval_script.js 的脚本路径 - * 例如修改京东脚本: + * 2.修改配置文件原脚本路径为 eval_script.js 的脚本路径 + * 例如修改配置文件京东脚本: * [rewrite_local] * #^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js * ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js From 9d65422a4eed1508e9cd3d5818835a1fda71d3ee Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 13:27:33 +0800 Subject: [PATCH 0158/1191] Update eval_script.js --- eval_script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eval_script.js b/eval_script.js index d3bb643cf..7f5552240 100644 --- a/eval_script.js +++ b/eval_script.js @@ -17,7 +17,7 @@ * [本地配置] * 1.添加配置,格式为:远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 * 2.修改配置文件原脚本路径为 eval_script.js 的脚本路径 - * 例如修改配置文件京东脚本: + * 例如修改配置文件 jd 脚本: * [rewrite_local] * #^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js * ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js @@ -38,7 +38,7 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf [local] //本地配置 -//京东 +//jd //https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) From 73a4f995c81e6de8e8f262bbe4a4fdda87abb528 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 13:29:16 +0800 Subject: [PATCH 0159/1191] Update eval_script.js --- eval_script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index 7f5552240..5a02c5adb 100644 --- a/eval_script.js +++ b/eval_script.js @@ -1,7 +1,7 @@ /** * 脚本管理工具(QuanX 举例) * - * 一.设置定时任务更新添加的远程脚本,第一次运行需要手动执行一下更新脚本(Qanx 普通调试模式容易更新失败,使用最新 TF 橙色按钮调试),例如设置每天凌晨更新脚本: + * 一.设置定时任务更新脚本,第一次运行需要手动执行一下更新脚本(Qanx 普通调试模式容易更新失败,使用最新 TF 橙色按钮调试),例如设置每天凌晨更新脚本: * [task_local] * 0 0 * * * eval_script.js * From 416bfc3c53b6bea93823b6d0bcb63ee442ec869a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 13:34:37 +0800 Subject: [PATCH 0160/1191] Update eval_script.js --- eval_script.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/eval_script.js b/eval_script.js index 5a02c5adb..27b847514 100644 --- a/eval_script.js +++ b/eval_script.js @@ -25,22 +25,21 @@ * hostname = api.m.jd.com */ - -//配置 +//conf const __conf = String.raw` - [remote] -//远程配置 https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf +//custom remote... + [local] -//本地配置 //jd //https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) +//custom local... ` From 3638ba2bf2225354fb25f5cb6481667bdcc68503 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 13:50:51 +0800 Subject: [PATCH 0161/1191] Update sub_script.conf --- sub_script.conf | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sub_script.conf b/sub_script.conf index b01729017..d85592522 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,21 +1,19 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com -//配置格式: ###远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2,如下 - -//京东 +//jd ###https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js -//淘宝 -###https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js url ^https?://.+/amdc/mobileDispatch, ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail +//tb +###https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js url ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js -//奈飞 +//nf ###https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js -//微博 +//wb ###https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) ###https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js From 9f82270b1349e79bf3780109c0e5cfa2c6fb4fd5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 13:54:31 +0800 Subject: [PATCH 0162/1191] Update sub_script1.conf --- sub_script1.conf | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sub_script1.conf b/sub_script1.conf index ce19ad1ca..46db2ae63 100644 --- a/sub_script1.conf +++ b/sub_script1.conf @@ -1,11 +1,9 @@ -hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, amdc.m.taobao.com +hostname = trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com -//淘宝 -### https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js url ^https?://.+/amdc/mobileDispatch, ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail -^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js +//jd +###https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js -//微博 -### https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) -### https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js +//tb +###https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js url ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) +^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js From c17b37cfc1d4ac99ff63d4e0cfe09fe6cdec0d2b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 13:55:28 +0800 Subject: [PATCH 0163/1191] Update sub_script2.conf --- sub_script2.conf | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sub_script2.conf b/sub_script2.conf index f62643976..658427611 100644 --- a/sub_script2.conf +++ b/sub_script2.conf @@ -1,6 +1,12 @@ -hostname = api.m.jd.com, ios.prod.ftl.netflix.com +hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, ios.prod.ftl.netflix.com -//奈飞 -### https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D +//nf +###https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js + +//wb +###https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) +###https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js From c382d26c73fce70d0b7cbb1748416b3b1b64614d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 13:56:22 +0800 Subject: [PATCH 0164/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 622ead330..aaed415d9 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Remove weibo ads ``` [Script] http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js [MITM] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` @@ -59,7 +59,7 @@ Remove weibo ads ``` [rewrite_local] ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body wb_ad.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) url script-response-body wb_ad.js [mitm] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` From 9cf7c764150da0e9319b3ff8dc35820bc12cb4cc Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 14:34:23 +0800 Subject: [PATCH 0165/1191] Update sub_script1.conf --- sub_script1.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sub_script1.conf b/sub_script1.conf index 46db2ae63..81889b8ce 100644 --- a/sub_script1.conf +++ b/sub_script1.conf @@ -1,9 +1,9 @@ hostname = trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com //jd -###https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) +####^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js //tb -###https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js url ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) +####^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js From 6aca3af0ed6154c680c5b07bd9c7de357ba2cc06 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 14:37:08 +0800 Subject: [PATCH 0166/1191] Update sub_script2.conf --- sub_script2.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sub_script2.conf b/sub_script2.conf index 658427611..c9475b5db 100644 --- a/sub_script2.conf +++ b/sub_script2.conf @@ -1,12 +1,12 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, ios.prod.ftl.netflix.com //nf -###https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D +####https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js //wb -###https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) -###https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) +####https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) +####https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js From 89be1ac1b892eb32d2837da0d65e4a7e83ad2aee Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 15:01:48 +0800 Subject: [PATCH 0167/1191] Update sub_script2.conf --- sub_script2.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sub_script2.conf b/sub_script2.conf index c9475b5db..658427611 100644 --- a/sub_script2.conf +++ b/sub_script2.conf @@ -1,12 +1,12 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, ios.prod.ftl.netflix.com //nf -####https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D +###https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js //wb -####https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) -####https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) +###https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) +###https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js From 33bfb14493d2bfa833da3464568cb580d273b0dd Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 15:22:30 +0800 Subject: [PATCH 0168/1191] Update eval_script.js --- eval_script.js | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/eval_script.js b/eval_script.js index 27b847514..e6a67c473 100644 --- a/eval_script.js +++ b/eval_script.js @@ -10,12 +10,12 @@ * 参考下面 __conf 示例 * * [远程配置] - * 1.添加注释,格式为:###远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 + * 1.添加注释,格式为:####匹配脚本对应的正则1,匹配脚本对应的正则2 eval 远程脚本的链接 * 2.修改原脚本路径为 eval_script.js 的脚本路径 * 参考示例:https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf * * [本地配置] - * 1.添加配置,格式为:远程脚本的链接 url 匹配脚本对应的正则1,匹配脚本对应的正则2 + * 1.添加配置,格式为:匹配脚本对应的正则1,匹配脚本对应的正则2 eval 远程脚本的链接 * 2.修改配置文件原脚本路径为 eval_script.js 的脚本路径 * 例如修改配置文件 jd 脚本: * [rewrite_local] @@ -30,14 +30,15 @@ const __conf = String.raw` [remote] -https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf +https://raw.githubusercontent.com/yichahucha/surge/master/sub_script1.conf +https://raw.githubusercontent.com/yichahucha/surge/master/sub_script2.conf //custom remote... [local] //jd -//https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) +//^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js //custom local... @@ -46,6 +47,7 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf const __tool = new ____Tool() const __isTask = __tool.isTask +const __log = false if (__isTask) { const downloadFile = (url) => { @@ -104,7 +106,7 @@ if (__isTask) { } }) }) - + getConf() .then((conf) => { const parseConf = ____parseConf(conf.content) @@ -153,18 +155,18 @@ if (!__isTask) { } return s })() - + if (__script) { if (__script.content) { eval(__script.content) - console.log(`Request url: ${__url}\nMatch url: ${__script.match}\nExecute script: ${__script.url}`) + if (__log) console.log(`Request url: ${__url}\nMatch url: ${__script.match}\nExecute script: ${__script.url}`) } else { $done({}) - console.log(`Request url: ${__url}\nMatch url: ${__script.match}\nScript not executed. Script not found: ${__script.url}`) + if (__log) console.log(`Request url: ${__url}\nMatch url: ${__script.match}\nScript not executed. Script not found: ${__script.url}`) } } else { $done({}) - console.log(`No match url: ${__url}`) + if (__log) console.log(`No match url: ${__url}`) } } @@ -184,8 +186,8 @@ function ____parseRemoteConf(conf) { let newLines = [] lines.forEach((line) => { line = line.replace(/^\s*/, "") - if (line.length > 0 && line.substring(0, 3) == "###") { - line = line.replace("###", "") + if (line.length > 0 && /^#{3}/.test(line)) { + line = line.replace(/^#*/, "") line = line.replace(/^\s*/, "") newLines.push(line) } @@ -210,14 +212,24 @@ function ____parseConf(conf) { lines.forEach((line) => { line = line.replace(/^\s*/, "") if (line.length > 0 && line.substring(0, 2) != "//") { + let urlRegex = /.+\s+url\s+.+/ + let evalRegex = /.+\s+eval\s+.+/ const avaliable = (() => { - const format = /^https?:\/\/.*\s+url\s+.*/ - return format.test(line) + return urlRegex.test(line) || evalRegex.test(line) })() if (avaliable) { - const value = line.split("url") - const remote = value[0].replace(/\s/g, "") - const match = value[1].replace(/\s/g, "") + let remote = "" + let match = "" + if (urlRegex.test(line)) { + const value = line.split("url") + remote = value[0].replace(/\s/g, "") + match = value[1].replace(/\s/g, "") + } + if (evalRegex.test(line)) { + const value = line.split("eval") + remote = value[1].replace(/\s/g, "") + match = value[0].replace(/\s/g, "") + } confObj[remote] = match } else { __tool.notify("Configuration error", "", line) From 395140b444ae60219dc4bf32e5431551aa38a68a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 15:29:47 +0800 Subject: [PATCH 0169/1191] Update eval_script.js --- eval_script.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eval_script.js b/eval_script.js index e6a67c473..9877806eb 100644 --- a/eval_script.js +++ b/eval_script.js @@ -30,8 +30,7 @@ const __conf = String.raw` [remote] -https://raw.githubusercontent.com/yichahucha/surge/master/sub_script1.conf -https://raw.githubusercontent.com/yichahucha/surge/master/sub_script2.conf +https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf //custom remote... From 800cb0c13d370fc0ee598eb1d99ff3c70ab24c46 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 15:33:25 +0800 Subject: [PATCH 0170/1191] Update eval_script.js --- eval_script.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eval_script.js b/eval_script.js index 9877806eb..fb832f02c 100644 --- a/eval_script.js +++ b/eval_script.js @@ -12,7 +12,7 @@ * [远程配置] * 1.添加注释,格式为:####匹配脚本对应的正则1,匹配脚本对应的正则2 eval 远程脚本的链接 * 2.修改原脚本路径为 eval_script.js 的脚本路径 - * 参考示例:https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf + * 参考示例:https://raw.githubusercontent.com/yichahucha/surge/master/sub_script1.conf * * [本地配置] * 1.添加配置,格式为:匹配脚本对应的正则1,匹配脚本对应的正则2 eval 远程脚本的链接 @@ -188,7 +188,9 @@ function ____parseRemoteConf(conf) { if (line.length > 0 && /^#{3}/.test(line)) { line = line.replace(/^#*/, "") line = line.replace(/^\s*/, "") - newLines.push(line) + if (line.length > 0) { + newLines.push(line) + } } }) return newLines.join("\n") From 88090db9ae788b2bb47c0fcf83e74a9dda26e4db Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 16:19:45 +0800 Subject: [PATCH 0171/1191] Create sub_script3.conf --- sub_script3.conf | 1 + 1 file changed, 1 insertion(+) create mode 100644 sub_script3.conf diff --git a/sub_script3.conf b/sub_script3.conf new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/sub_script3.conf @@ -0,0 +1 @@ + From a36fb16d92b8fc4d88ac89e6454f14aeba1fbfa2 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 16:23:25 +0800 Subject: [PATCH 0172/1191] Update sub_script3.conf --- sub_script3.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sub_script3.conf b/sub_script3.conf index 8b1378917..d0a6881c1 100644 --- a/sub_script3.conf +++ b/sub_script3.conf @@ -1 +1 @@ - +###123 From 450a5b737def3db1dc1992187ad6f49bc247dee7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 16:38:33 +0800 Subject: [PATCH 0173/1191] Update sub_script3.conf --- sub_script3.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/sub_script3.conf b/sub_script3.conf index d0a6881c1..356b9e5cb 100644 --- a/sub_script3.conf +++ b/sub_script3.conf @@ -1 +1,2 @@ ###123 +^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) url script-response-body NobyDa/Surge/JS/VUE.js From d4f3db84d239f2aaa1e1d34cfd976a1e20102e48 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 16:39:42 +0800 Subject: [PATCH 0174/1191] Update sub_script3.conf --- sub_script3.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sub_script3.conf b/sub_script3.conf index 356b9e5cb..a713ff14d 100644 --- a/sub_script3.conf +++ b/sub_script3.conf @@ -1,2 +1,2 @@ -###123 +### ^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) url script-response-body NobyDa/Surge/JS/VUE.js From 8309be5d6b615ac1740b4fd664d45cea1a6890d8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 16:43:20 +0800 Subject: [PATCH 0175/1191] Update sub_script3.conf --- sub_script3.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sub_script3.conf b/sub_script3.conf index a713ff14d..a2861a16f 100644 --- a/sub_script3.conf +++ b/sub_script3.conf @@ -1,2 +1,3 @@ -### +#### + ^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) url script-response-body NobyDa/Surge/JS/VUE.js From 9379cda2a81b519380c3c954ed60d6f0def3c6a3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 16:44:00 +0800 Subject: [PATCH 0176/1191] Update sub_script3.conf --- sub_script3.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sub_script3.conf b/sub_script3.conf index a2861a16f..3a5321507 100644 --- a/sub_script3.conf +++ b/sub_script3.conf @@ -1,3 +1,3 @@ -#### +####^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare)val NobyDa/Surge/JS/VUE.js ^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) url script-response-body NobyDa/Surge/JS/VUE.js From b6ed33bde22fcb1ea34445d4522089aeaa3dbede Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 16:55:53 +0800 Subject: [PATCH 0177/1191] Update sub_script3.conf --- sub_script3.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sub_script3.conf b/sub_script3.conf index 3a5321507..4672910f7 100644 --- a/sub_script3.conf +++ b/sub_script3.conf @@ -1,3 +1,3 @@ -####^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare)val NobyDa/Surge/JS/VUE.js +####^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) eval NobyDa/Surge/JS/VUE.js ^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) url script-response-body NobyDa/Surge/JS/VUE.js From 6f1fe9ddb83a58f4085b0a10485442f7a439782f Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 2 Mar 2020 17:01:47 +0800 Subject: [PATCH 0178/1191] optimize --- eval_script.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eval_script.js b/eval_script.js index fb832f02c..e09e04912 100644 --- a/eval_script.js +++ b/eval_script.js @@ -233,12 +233,13 @@ function ____parseConf(conf) { } confObj[remote] = match } else { - __tool.notify("Configuration error", "", line) - throw "Configuration error:" + line + __tool.notify("Conf error", "", line) + $done() + throw new Error(`Conf error: ${line}`) } } }) - console.log(`Configuration information: ${JSON.stringify(confObj)}`) + console.log(`Conf information: ${JSON.stringify(confObj)}`) return confObj } From 5e46b6a895ff12b030a3de37f6eecc010e6ee43d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 17:05:38 +0800 Subject: [PATCH 0179/1191] Update sub_script3.conf --- sub_script3.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sub_script3.conf b/sub_script3.conf index 4672910f7..2ca7ff0c4 100644 --- a/sub_script3.conf +++ b/sub_script3.conf @@ -1,3 +1,3 @@ -####^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) eval NobyDa/Surge/JS/VUE.js +####^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) eval ^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) url script-response-body NobyDa/Surge/JS/VUE.js From 1ef6444a2668ebd1043b38dabe2bb306a058fc2a Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 2 Mar 2020 17:22:57 +0800 Subject: [PATCH 0180/1191] optimize --- eval_script.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/eval_script.js b/eval_script.js index e09e04912..fb137a142 100644 --- a/eval_script.js +++ b/eval_script.js @@ -47,6 +47,7 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf const __tool = new ____Tool() const __isTask = __tool.isTask const __log = false +const __debug = false if (__isTask) { const downloadFile = (url) => { @@ -231,11 +232,13 @@ function ____parseConf(conf) { remote = value[1].replace(/\s/g, "") match = value[0].replace(/\s/g, "") } - confObj[remote] = match + if (remote.length > 0 && match.length > 0) { + confObj[remote] = match + } else { + if (__debug) ____throwConfError(line) + } } else { - __tool.notify("Conf error", "", line) - $done() - throw new Error(`Conf error: ${line}`) + if (__debug) ____throwConfError(line) } } }) @@ -243,6 +246,12 @@ function ____parseConf(conf) { return confObj } +function ____throwConfError(line) { + __tool.notify("Conf error", "", line) + $done() + throw new Error(`Conf error: ${line}`) +} + function ____Tool() { _node = (() => { if (typeof require == "function") { From 4ec431e89f17e80cc6ed08743c7255fea1443ff2 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 17:28:26 +0800 Subject: [PATCH 0181/1191] Update and rename sub_script3.conf to sub_eval.conf --- sub_eval.conf | 1 + sub_script3.conf | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) create mode 100644 sub_eval.conf delete mode 100644 sub_script3.conf diff --git a/sub_eval.conf b/sub_eval.conf new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/sub_eval.conf @@ -0,0 +1 @@ + diff --git a/sub_script3.conf b/sub_script3.conf deleted file mode 100644 index 2ca7ff0c4..000000000 --- a/sub_script3.conf +++ /dev/null @@ -1,3 +0,0 @@ -####^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) eval - -^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) url script-response-body NobyDa/Surge/JS/VUE.js From 83a818a4d9410f271651ed71a275690531815ce0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 17:32:49 +0800 Subject: [PATCH 0182/1191] Update sub_eval.conf --- sub_eval.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sub_eval.conf b/sub_eval.conf index 8b1378917..d31b7a319 100644 --- a/sub_eval.conf +++ b/sub_eval.conf @@ -1 +1,12 @@ +//jd +####^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +//tb +####^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +//nf +####https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D eval https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +//wb +####^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +####^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js From 9eb42ab447f3a5de8d379701fc093efe89098fd4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 17:35:21 +0800 Subject: [PATCH 0183/1191] Update sub_eval.conf --- sub_eval.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sub_eval.conf b/sub_eval.conf index d31b7a319..9274df3e8 100644 --- a/sub_eval.conf +++ b/sub_eval.conf @@ -5,7 +5,7 @@ ####^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js //nf -####https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D eval https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +####^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D eval https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js //wb ####^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js From 320ae442cf96700a78b4cd6c7fde5f609573073d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 2 Mar 2020 17:36:11 +0800 Subject: [PATCH 0184/1191] Update sub_script.conf --- sub_script.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sub_script.conf b/sub_script.conf index d85592522..0429a4e0e 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -9,7 +9,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js //nf -###https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D +###https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js From 555941cc8c516b98f68d2b0d7560cf90556ec064 Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 2 Mar 2020 17:37:10 +0800 Subject: [PATCH 0185/1191] fix --- sub_script2.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sub_script2.conf b/sub_script2.conf index 658427611..9f81215a0 100644 --- a/sub_script2.conf +++ b/sub_script2.conf @@ -1,7 +1,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, ios.prod.ftl.netflix.com //nf -###https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D +###https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js From 5df9072fbb9643ad317e95422226b72c8486d2e6 Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 2 Mar 2020 18:13:42 +0800 Subject: [PATCH 0186/1191] fix --- eval_script.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/eval_script.js b/eval_script.js index fb137a142..803cac2c9 100644 --- a/eval_script.js +++ b/eval_script.js @@ -31,14 +31,12 @@ const __conf = String.raw` [remote] https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf - //custom remote... [local] //jd //^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - //custom local... From 40f51a959942d461859abd0bb4bd1593cb824d08 Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 2 Mar 2020 18:51:38 +0800 Subject: [PATCH 0187/1191] fix --- eval_script.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/eval_script.js b/eval_script.js index 803cac2c9..12831415e 100644 --- a/eval_script.js +++ b/eval_script.js @@ -30,14 +30,17 @@ const __conf = String.raw` [remote] -https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf //custom remote... +https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf + + [local] +//custom local... + //jd //^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -//custom local... ` @@ -45,7 +48,7 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf const __tool = new ____Tool() const __isTask = __tool.isTask const __log = false -const __debug = false +const __debug = true if (__isTask) { const downloadFile = (url) => { @@ -169,14 +172,9 @@ if (!__isTask) { } function ____getConfInfo(conf, type) { - const rex = new RegExp("\\[" + type + "\\](.|\\n)*?($|\\n\\[)", "g") - let result = rex.exec(conf) - result = result[0].split("\n") - if (result[2].length > 0) { - result.pop() - } - result.shift() - return result + const regExp = new RegExp(`(?<=\\[${type}\\])(.|\\n)+?(?=($|\\[))`) + const result = conf.match(regExp)[0] + return result.split("\n") } function ____parseRemoteConf(conf) { From 68e1e9bd8ba1e133a271a3d9462ebfeb66e7ae30 Mon Sep 17 00:00:00 2001 From: tern Date: Mon, 2 Mar 2020 19:55:49 +0800 Subject: [PATCH 0188/1191] fix --- eval_script.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/eval_script.js b/eval_script.js index 12831415e..803cac2c9 100644 --- a/eval_script.js +++ b/eval_script.js @@ -30,17 +30,14 @@ const __conf = String.raw` [remote] -//custom remote... - https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf - +//custom remote... [local] -//custom local... - //jd //^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +//custom local... ` @@ -48,7 +45,7 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf const __tool = new ____Tool() const __isTask = __tool.isTask const __log = false -const __debug = true +const __debug = false if (__isTask) { const downloadFile = (url) => { @@ -172,9 +169,14 @@ if (!__isTask) { } function ____getConfInfo(conf, type) { - const regExp = new RegExp(`(?<=\\[${type}\\])(.|\\n)+?(?=($|\\[))`) - const result = conf.match(regExp)[0] - return result.split("\n") + const rex = new RegExp("\\[" + type + "\\](.|\\n)*?($|\\n\\[)", "g") + let result = rex.exec(conf) + result = result[0].split("\n") + if (result[2].length > 0) { + result.pop() + } + result.shift() + return result } function ____parseRemoteConf(conf) { From 4049a1f1113fcf395e44b896473e7e7a02047b6c Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 2 Mar 2020 22:11:47 +0800 Subject: [PATCH 0189/1191] fix --- eval_script.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/eval_script.js b/eval_script.js index 803cac2c9..ae8c1b193 100644 --- a/eval_script.js +++ b/eval_script.js @@ -30,14 +30,18 @@ const __conf = String.raw` [remote] -https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf //custom remote... +https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf + + [local] +//custom local... + //jd //^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -//custom local... + ` @@ -169,15 +173,16 @@ if (!__isTask) { } function ____getConfInfo(conf, type) { - const rex = new RegExp("\\[" + type + "\\](.|\\n)*?($|\\n\\[)", "g") + const rex = new RegExp("\\[" + type + "\\](.|\\n)*?(?=\\n($|\\[))", "g") let result = rex.exec(conf) - result = result[0].split("\n") - if (result[2].length > 0) { - result.pop() + if (result) { + result = result[0].split("\n") + result.shift() + } else { + result = [] } - result.shift() return result -} + } function ____parseRemoteConf(conf) { const lines = conf.split("\n") From 783fcccfbdcf6874e713995dd9b1f30de38bb232 Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 2 Mar 2020 22:13:45 +0800 Subject: [PATCH 0190/1191] fix --- eval_script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index ae8c1b193..aa055d667 100644 --- a/eval_script.js +++ b/eval_script.js @@ -49,7 +49,7 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf const __tool = new ____Tool() const __isTask = __tool.isTask const __log = false -const __debug = false +const __debug = true if (__isTask) { const downloadFile = (url) => { From bed701fa01ed626c563492ec6d983e29030135d7 Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 2 Mar 2020 22:15:07 +0800 Subject: [PATCH 0191/1191] fix --- eval_script.js | 1 - 1 file changed, 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index aa055d667..4c438208e 100644 --- a/eval_script.js +++ b/eval_script.js @@ -25,7 +25,6 @@ * hostname = api.m.jd.com */ -//conf const __conf = String.raw` From b26ab16249b417311ebacdeb6eb1d8a9d707fa6f Mon Sep 17 00:00:00 2001 From: tern Date: Mon, 2 Mar 2020 23:37:08 +0800 Subject: [PATCH 0192/1191] delete --- sub_eval.conf | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 sub_eval.conf diff --git a/sub_eval.conf b/sub_eval.conf deleted file mode 100644 index 9274df3e8..000000000 --- a/sub_eval.conf +++ /dev/null @@ -1,12 +0,0 @@ -//jd -####^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - -//tb -####^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - -//nf -####^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D eval https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - -//wb -####^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js -####^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js From 32f932ff87cf6d709f3cdd6830a5e5d0c03bd4a2 Mon Sep 17 00:00:00 2001 From: tern Date: Tue, 3 Mar 2020 00:25:08 +0800 Subject: [PATCH 0193/1191] update --- eval_script.js | 11 ++++------- sub_script.conf | 14 +++++++++----- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/eval_script.js b/eval_script.js index 4c438208e..54318b899 100644 --- a/eval_script.js +++ b/eval_script.js @@ -10,14 +10,15 @@ * 参考下面 __conf 示例 * * [远程配置] - * 1.添加注释,格式为:####匹配脚本对应的正则1,匹配脚本对应的正则2 eval 远程脚本的链接 - * 2.修改原脚本路径为 eval_script.js 的脚本路径 * 参考示例:https://raw.githubusercontent.com/yichahucha/surge/master/sub_script1.conf * * [本地配置] + * jd 脚本举例 * 1.添加配置,格式为:匹配脚本对应的正则1,匹配脚本对应的正则2 eval 远程脚本的链接 + * [local] + * ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js + * * 2.修改配置文件原脚本路径为 eval_script.js 的脚本路径 - * 例如修改配置文件 jd 脚本: * [rewrite_local] * #^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js * ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js @@ -38,10 +39,6 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf [local] //custom local... -//jd -//^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - - ` diff --git a/sub_script.conf b/sub_script.conf index 0429a4e0e..fc6ff7fcd 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,20 +1,24 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com +// eval 配置说明: +//1.添加注释格式为:####匹配脚本对应的正则1,匹配脚本对应的正则2 eval 远程脚本的链接 +//2.修改原脚本路径为 eval_script.js 的脚本路径 + //jd -###https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js url ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) +####^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js //tb -###https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js url ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) +####^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js //nf -###https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D +####^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D eval https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js //wb -###https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) -###https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) +####^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +####^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js From 7e585db971e64deed8ab029215c759ffb8042752 Mon Sep 17 00:00:00 2001 From: tern Date: Tue, 3 Mar 2020 00:25:44 +0800 Subject: [PATCH 0194/1191] fix --- eval_script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index 54318b899..df25af4f3 100644 --- a/eval_script.js +++ b/eval_script.js @@ -10,7 +10,7 @@ * 参考下面 __conf 示例 * * [远程配置] - * 参考示例:https://raw.githubusercontent.com/yichahucha/surge/master/sub_script1.conf + * 参考示例:https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf * * [本地配置] * jd 脚本举例 From d8c064bb00fe0f59b74b7c4850cde5cc74ca4199 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 3 Mar 2020 11:20:47 +0800 Subject: [PATCH 0195/1191] Update sub_script.conf --- sub_script.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sub_script.conf b/sub_script.conf index fc6ff7fcd..96042e57a 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,8 +1,8 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com -// eval 配置说明: -//1.添加注释格式为:####匹配脚本对应的正则1,匹配脚本对应的正则2 eval 远程脚本的链接 -//2.修改原脚本路径为 eval_script.js 的脚本路径 +# eval_script.js 远程配置说明: +# 1.添加注释格式为:####匹配脚本对应的正则1,匹配脚本对应的正则2 eval 远程脚本的链接 +# 2.修改原脚本路径为 eval_script.js 的脚本路径 //jd ####^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js From a2bb192d3d003e1d49b58af09f130f9b36dba4b8 Mon Sep 17 00:00:00 2001 From: goose Date: Tue, 3 Mar 2020 15:54:48 +0800 Subject: [PATCH 0196/1191] optimize --- eval_script.js | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/eval_script.js b/eval_script.js index df25af4f3..df6456cdf 100644 --- a/eval_script.js +++ b/eval_script.js @@ -46,6 +46,7 @@ const __tool = new ____Tool() const __isTask = __tool.isTask const __log = false const __debug = true +const __emoji = "🪓" if (__isTask) { const downloadFile = (url) => { @@ -55,14 +56,14 @@ if (__isTask) { if (!error) { if (response.statusCode == 200) { __tool.write(body, url) - resolve({ body, msg: `🪓${filename} update success` }) + resolve({ body, msg: `${__emoji}${filename} update success` }) console.log(`Update success: ${url}`) } else { - resolve({ body, msg: `🪓${filename} update fail` }) + resolve({ body, msg: `${__emoji}${filename} update fail` }) console.log(`Update fail ${response.statusCode}: ${url}`) } } else { - resolve({ body: null, msg: `🪓${filename} update fail` }) + resolve({ body: null, msg: `${__emoji}${filename} update fail` }) console.log(`Update fail ${error}: ${url}`) } }) @@ -107,7 +108,7 @@ if (__isTask) { getConf() .then((conf) => { - const parseConf = ____parseConf(conf.content) + let parseConf = ____parseConf(conf.content) const scriptPromises = (() => { let all = [] Object.keys(parseConf).forEach((url) => { @@ -118,7 +119,7 @@ if (__isTask) { console.log("Start updating script...") Promise.all(scriptPromises).then(result => { console.log("Stop updating script.") - const notifyMsg = (() => { + let notifyMsg = (() => { let msg = conf.msg result.forEach(data => { msg += msg.length > 0 ? "\n" + data.msg : data.msg @@ -126,8 +127,22 @@ if (__isTask) { return msg })() console.log(notifyMsg) + const count = ((msgs) => { + let success = 0 + let fail = 0 + msgs.forEach(msg => { + if (msg.match("success")) success++ + if (msg.match("fail")) fail++ + }); + return { success, fail } + }) + let notifyMsgs = notifyMsg.split("\n") + let countObj = count(notifyMsgs) + notifyMsg = `${notifyMsgs.slice(0, 20).join("\n")}${notifyMsgs.length > 20 ? "\n......" : ""}\n${__emoji}success: ${countObj.success} fail: ${countObj.fail}` + let lastDate = __tool.read("ScriptLastUpdateDate") lastDate = lastDate ? lastDate : new Date().Format("yyyy-MM-dd HH:mm:ss") + __tool.notify("Update Done.", `${lastDate} last update.`, `${notifyMsg}`) __tool.write(JSON.stringify(parseConf), "ScriptConfObject") __tool.write(new Date().Format("yyyy-MM-dd HH:mm:ss"), "ScriptLastUpdateDate") @@ -172,13 +187,13 @@ function ____getConfInfo(conf, type) { const rex = new RegExp("\\[" + type + "\\](.|\\n)*?(?=\\n($|\\[))", "g") let result = rex.exec(conf) if (result) { - result = result[0].split("\n") - result.shift() + result = result[0].split("\n") + result.shift() } else { - result = [] + result = [] } return result - } +} function ____parseRemoteConf(conf) { const lines = conf.split("\n") From b6ac4440a9c4ab35e3aa5779d43ef5b999600135 Mon Sep 17 00:00:00 2001 From: goose Date: Tue, 3 Mar 2020 18:03:00 +0800 Subject: [PATCH 0197/1191] optimize --- eval_script.js | 55 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 13 deletions(-) diff --git a/eval_script.js b/eval_script.js index df6456cdf..9f42109e9 100644 --- a/eval_script.js +++ b/eval_script.js @@ -30,14 +30,14 @@ const __conf = String.raw` [remote] -//custom remote... +// custom remote... https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf [local] -//custom local... +// custom local... ` @@ -108,26 +108,56 @@ if (__isTask) { getConf() .then((conf) => { - let parseConf = ____parseConf(conf.content) + const confObj = ____parseConf(conf.content) + const scriptUrls = Object.keys(confObj) const scriptPromises = (() => { let all = [] - Object.keys(parseConf).forEach((url) => { + scriptUrls.forEach((url) => { all.push(downloadFile(url)) }) return all })() + const ____sequenceQueue = async (urls) => { + let results = [] + for (let i = 0; i < urls.length; i++) { + let result = await downloadFile(urls[i]) + results.push(result) + } + return results + } + const ____concurrentQueue = async (promises) => { + return new Promise((resolve) => { + Promise.all(promises).then(result => { + resolve(result) + }) + }) + } + let sliceLength = 20 + let part1 = scriptPromises.slice(0, sliceLength) + let part2 = scriptUrls.slice(sliceLength) + __tool.notify("", "", `Start updating ${scriptUrls.length} scripts...`) console.log("Start updating script...") - Promise.all(scriptPromises).then(result => { + ____concurrentQueue(part1).then(result1 => { + if (part2.length > 0) { + return new Promise((resolve) => { + ____sequenceQueue(part2).then((result2) => { + resolve(result1.concat(result2)) + }) + }) + } else { + return result1 + } + }).then((result) => { console.log("Stop updating script.") - let notifyMsg = (() => { + const resultMsg = (() => { let msg = conf.msg result.forEach(data => { msg += msg.length > 0 ? "\n" + data.msg : data.msg }); return msg })() - console.log(notifyMsg) - const count = ((msgs) => { + console.log(resultMsg); + const resultCount = ((msgs) => { let success = 0 let fail = 0 msgs.forEach(msg => { @@ -136,15 +166,15 @@ if (__isTask) { }); return { success, fail } }) - let notifyMsgs = notifyMsg.split("\n") - let countObj = count(notifyMsgs) - notifyMsg = `${notifyMsgs.slice(0, 20).join("\n")}${notifyMsgs.length > 20 ? "\n......" : ""}\n${__emoji}success: ${countObj.success} fail: ${countObj.fail}` + let resultMsgs = resultMsg.split("\n") + let count = resultCount(resultMsgs) + let notifyMsg = `${resultMsgs.slice(0, 20).join("\n")}${resultMsgs.length > 20 ? "\n......" : ""}\n${__emoji}success: ${count.success} fail: ${count.fail}` let lastDate = __tool.read("ScriptLastUpdateDate") lastDate = lastDate ? lastDate : new Date().Format("yyyy-MM-dd HH:mm:ss") __tool.notify("Update Done.", `${lastDate} last update.`, `${notifyMsg}`) - __tool.write(JSON.stringify(parseConf), "ScriptConfObject") + __tool.write(JSON.stringify(confObj), "ScriptConfObject") __tool.write(new Date().Format("yyyy-MM-dd HH:mm:ss"), "ScriptLastUpdateDate") $done() }) @@ -168,7 +198,6 @@ if (!__isTask) { } return s })() - if (__script) { if (__script.content) { eval(__script.content) From d5fc18bf70d7796f1748fd1a30a1e2f989453155 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 4 Mar 2020 13:09:20 +0800 Subject: [PATCH 0198/1191] Update sub_script.conf --- sub_script.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sub_script.conf b/sub_script.conf index 96042e57a..06c20d377 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,7 +1,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com # eval_script.js 远程配置说明: -# 1.添加注释格式为:####匹配脚本对应的正则1,匹配脚本对应的正则2 eval 远程脚本的链接 +# 1.添加注释格式为:####匹配脚本对应的正则1 匹配脚本对应的正则2 eval 远程脚本的链接 # 2.修改原脚本路径为 eval_script.js 的脚本路径 //jd @@ -9,7 +9,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js //tb -####^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +####^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js //nf From 91e026363a07a78d67cd40ecf4eec888e9a2a9b9 Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 4 Mar 2020 14:13:59 +0800 Subject: [PATCH 0199/1191] optimize --- eval_script.js | 263 ++++++++++++++++++++++++++----------------------- 1 file changed, 138 insertions(+), 125 deletions(-) diff --git a/eval_script.js b/eval_script.js index 9f42109e9..9391741d4 100644 --- a/eval_script.js +++ b/eval_script.js @@ -14,7 +14,7 @@ * * [本地配置] * jd 脚本举例 - * 1.添加配置,格式为:匹配脚本对应的正则1,匹配脚本对应的正则2 eval 远程脚本的链接 + * 1.添加配置,格式为:匹配脚本对应的正则1 匹配脚本对应的正则2 eval 远程脚本的链接 * [local] * ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js * @@ -33,7 +33,7 @@ const __conf = String.raw` // custom remote... https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf - +https://raw.githubusercontent.com/Wangsc1/All/master/nzw9314_eval.conf [local] @@ -47,58 +47,35 @@ const __isTask = __tool.isTask const __log = false const __debug = true const __emoji = "🪓" +const __concurrencyLimit = 5 if (__isTask) { - const downloadFile = (url) => { - return new Promise((resolve) => { - __tool.get(url, (error, response, body) => { - let filename = url.match(/.*\/(.*?)$/)[1] - if (!error) { - if (response.statusCode == 200) { - __tool.write(body, url) - resolve({ body, msg: `${__emoji}${filename} update success` }) - console.log(`Update success: ${url}`) - } else { - resolve({ body, msg: `${__emoji}${filename} update fail` }) - console.log(`Update fail ${response.statusCode}: ${url}`) - } - } else { - resolve({ body: null, msg: `${__emoji}${filename} update fail` }) - console.log(`Update fail ${error}: ${url}`) - } - }) - }) - } - const getConf = (() => { return new Promise((resolve) => { const remoteConf = ____removeGarbage(____getConfInfo(__conf, "remote")) const localConf = ____removeGarbage(____getConfInfo(__conf, "local")) if (remoteConf.length > 0) { - const confPromises = (() => { - let all = [] - remoteConf.forEach((url) => { - all.push(downloadFile(url)) - }) - return all - })() + __tool.notify("", "", `Start updating ${remoteConf.length} confs...`) console.log("Start updating conf...") - Promise.all(confPromises).then(result => { - console.log("Stop updating conf.") - let allRemoteConf = "" - let allRemoteMSg = "" - result.forEach(data => { - if (data.body) { - allRemoteConf += "\n" + ____parseRemoteConf(data.body) - } - allRemoteMSg += allRemoteMSg.length > 0 ? "\n" + data.msg : data.msg - }); - let content = localConf.join("\n") - if (allRemoteConf.length > 0) { - content = `${content}\n${allRemoteConf}` - } - resolve({ content, msg: allRemoteMSg }) + ____concurrentQueueLimit(remoteConf, __concurrencyLimit, (url) => { + return ____downloadFile(url) }) + .then(result => { + console.log("Stop updating conf.") + let allRemoteConf = "" + let allRemoteMSg = "" + result.forEach(data => { + if (data.body) { + allRemoteConf += "\n" + ____parseRemoteConf(data.body) + } + allRemoteMSg += allRemoteMSg.length > 0 ? "\n" + data.msg : data.msg + }); + let content = localConf.join("\n") + if (allRemoteConf.length > 0) { + content = `${content}\n${allRemoteConf}` + } + resolve({ content, msg: allRemoteMSg }) + }) } else { const content = localConf.join("\n") resolve({ content: content, msg: "" }) @@ -106,78 +83,48 @@ if (__isTask) { }) }) + let beginDate = new Date() getConf() .then((conf) => { const confObj = ____parseConf(conf.content) const scriptUrls = Object.keys(confObj) - const scriptPromises = (() => { - let all = [] - scriptUrls.forEach((url) => { - all.push(downloadFile(url)) - }) - return all - })() - const ____sequenceQueue = async (urls) => { - let results = [] - for (let i = 0; i < urls.length; i++) { - let result = await downloadFile(urls[i]) - results.push(result) - } - return results - } - const ____concurrentQueue = async (promises) => { - return new Promise((resolve) => { - Promise.all(promises).then(result => { - resolve(result) - }) - }) - } - let sliceLength = 20 - let part1 = scriptPromises.slice(0, sliceLength) - let part2 = scriptUrls.slice(sliceLength) __tool.notify("", "", `Start updating ${scriptUrls.length} scripts...`) console.log("Start updating script...") - ____concurrentQueue(part1).then(result1 => { - if (part2.length > 0) { - return new Promise((resolve) => { - ____sequenceQueue(part2).then((result2) => { - resolve(result1.concat(result2)) - }) + ____concurrentQueueLimit(scriptUrls, __concurrencyLimit, (url) => { + return ____downloadFile(url) + }) + .then(result => { + console.log("Stop updating script.") + __tool.write(JSON.stringify(confObj), "ScriptConfObject") + const resultMsg = (() => { + let msg = conf.msg + result.forEach(data => { + msg += msg.length > 0 ? "\n" + data.msg : data.msg + }); + return msg + })() + return resultMsg + }) + .then((resultMsg) => { + console.log(resultMsg); + const resultCount = ((msgs) => { + let success = 0 + let fail = 0 + msgs.forEach(msg => { + if (msg.match("success")) success++ + if (msg.match("fail")) fail++ + }); + return { success, fail } }) - } else { - return result1 - } - }).then((result) => { - console.log("Stop updating script.") - const resultMsg = (() => { - let msg = conf.msg - result.forEach(data => { - msg += msg.length > 0 ? "\n" + data.msg : data.msg - }); - return msg - })() - console.log(resultMsg); - const resultCount = ((msgs) => { - let success = 0 - let fail = 0 - msgs.forEach(msg => { - if (msg.match("success")) success++ - if (msg.match("fail")) fail++ - }); - return { success, fail } + let resultMsgs = resultMsg.split("\n") + let count = resultCount(resultMsgs) + let notifyMsg = `${resultMsgs.slice(0, 20).join("\n")}${resultMsgs.length > 20 ? `\n${__emoji}......\n` : ""}` + let lastDate = __tool.read("ScriptLastUpdateDate") + lastDate = lastDate ? lastDate : new Date().Format("yyyy-MM-dd HH:mm:ss") + __tool.notify("Update Done", `Success: ${count.success} Fail: ${count.fail} Tasks: ${____timeDiff(beginDate, new Date())}s`, `${notifyMsg}\n${lastDate} last update`) + __tool.write(new Date().Format("yyyy-MM-dd HH:mm:ss"), "ScriptLastUpdateDate") + $done() }) - let resultMsgs = resultMsg.split("\n") - let count = resultCount(resultMsgs) - let notifyMsg = `${resultMsgs.slice(0, 20).join("\n")}${resultMsgs.length > 20 ? "\n......" : ""}\n${__emoji}success: ${count.success} fail: ${count.fail}` - - let lastDate = __tool.read("ScriptLastUpdateDate") - lastDate = lastDate ? lastDate : new Date().Format("yyyy-MM-dd HH:mm:ss") - - __tool.notify("Update Done.", `${lastDate} last update.`, `${notifyMsg}`) - __tool.write(JSON.stringify(confObj), "ScriptConfObject") - __tool.write(new Date().Format("yyyy-MM-dd HH:mm:ss"), "ScriptLastUpdateDate") - $done() - }) }) } @@ -185,18 +132,22 @@ if (!__isTask) { const __url = $request.url const __confObj = JSON.parse(__tool.read("ScriptConfObject")) const __script = (() => { - let s = null + let script = null for (let key in __confObj) { let value = __confObj[key] - if (!Array.isArray(value)) value = value.split(",") value.some((url) => { - if (__url.match(url)) { - s = { url: key, content: __tool.read(key), match: url } - return true + try { + if (__url.match(url)) { + script = { url: key, content: __tool.read(key), match: url } + return true + } + } catch (error) { + __tool.notify("", "", `Regular Error: ${url}\nRequest URL: ${__url}`) + console.log(`${error}\nRegular Error: ${url}\nRequest URL: ${__url}`) } }) } - return s + return script })() if (__script) { if (__script.content) { @@ -212,6 +163,61 @@ if (!__isTask) { } } +function ____timeDiff(begin, end) { + return Math.ceil((end.getTime() - begin.getTime()) / 1000) +} + +async function ____sequenceQueue(urls) { + let results = [] + for (let i = 0; i < urls.length; i++) { + let result = await ____downloadFile(urls[i]) + results.push(result) + } + return results +} + +function ____concurrentQueueLimit(list, limit, asyncHandle) { + let results = [] + let recursion = (arr) => { + return asyncHandle(arr.shift()) + .then((result) => { + results.push(result) + if (arr.length !== 0) return recursion(arr) + else return 'finish' + }) + }; + let listCopy = [].concat(list) + let asyncList = [] + if (list.length < limit) limit = list.length + while (limit--) { + asyncList.push(recursion(listCopy)) + } + return new Promise((resolve) => { + Promise.all(asyncList).then(() => resolve(results)) + }); +} + +function ____downloadFile(url) { + return new Promise((resolve) => { + __tool.get(url, (error, response, body) => { + let filename = url.match(/.*\/(.*?)$/)[1] + if (!error) { + if (response.statusCode == 200) { + __tool.write(body, url) + resolve({ body, msg: `${__emoji}${filename} update success` }) + console.log(`Update success: ${url}`) + } else { + resolve({ body, msg: `${__emoji}${filename} update fail` }) + console.log(`Update fail ${response.statusCode}: ${url}`) + } + } else { + resolve({ body: null, msg: `${__emoji}${filename} update fail` }) + console.log(`Update fail ${error}: ${url}`) + } + }) + }) +} + function ____getConfInfo(conf, type) { const rex = new RegExp("\\[" + type + "\\](.|\\n)*?(?=\\n($|\\[))", "g") let result = rex.exec(conf) @@ -264,16 +270,16 @@ function ____parseConf(conf) { })() if (avaliable) { let remote = "" - let match = "" + let match = [] if (urlRegex.test(line)) { const value = line.split("url") remote = value[0].replace(/\s/g, "") - match = value[1].replace(/\s/g, "") + match = ____parseMatch(value[1]) } if (evalRegex.test(line)) { const value = line.split("eval") remote = value[1].replace(/\s/g, "") - match = value[0].replace(/\s/g, "") + match = ____parseMatch(value[0]) } if (remote.length > 0 && match.length > 0) { confObj[remote] = match @@ -285,10 +291,23 @@ function ____parseConf(conf) { } } }) - console.log(`Conf information: ${JSON.stringify(confObj)}`) + if (__log) console.log(`Conf information: ${JSON.stringify(confObj)}`) return confObj } +function ____parseMatch(match) { + let matchs = match.split(" ") + if (matchs.length > 0) { + let i = matchs.length; + while (i--) { + if (matchs[i].length == 0) { + matchs.splice(i, 1) + } + } + } + return matchs +} + function ____throwConfError(line) { __tool.notify("Conf error", "", line) $done() @@ -356,12 +375,6 @@ function ____Tool() { } } -if (!Array.isArray) { - Array.isArray = function (arg) { - return Object.prototype.toString.call(arg) === '[object Array]' - } -} - Date.prototype.Format = function (fmt) { var o = { "M+": this.getMonth() + 1, From 12cf4601318ea2f209d8ab84d3b10015b754496d Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 4 Mar 2020 14:15:28 +0800 Subject: [PATCH 0200/1191] optimize --- eval_script.js | 1 - 1 file changed, 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index 9391741d4..53f8afa9f 100644 --- a/eval_script.js +++ b/eval_script.js @@ -33,7 +33,6 @@ const __conf = String.raw` // custom remote... https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf -https://raw.githubusercontent.com/Wangsc1/All/master/nzw9314_eval.conf [local] From 67a50ce7fa7838f3c867c28cfb4a98f6aec8ec57 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 4 Mar 2020 18:39:10 +0800 Subject: [PATCH 0201/1191] Create sub_script3.conf --- sub_script3.conf | 1 + 1 file changed, 1 insertion(+) create mode 100644 sub_script3.conf diff --git a/sub_script3.conf b/sub_script3.conf new file mode 100644 index 000000000..6274b657d --- /dev/null +++ b/sub_script3.conf @@ -0,0 +1 @@ +^https://r\.inews\.qq.com\/get(QQNewsUnreadList|RecommendList) url script-response-body eval_script.js From c03d41012646cbee7b637069eb759a2a991f07f3 Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 4 Mar 2020 22:49:06 +0800 Subject: [PATCH 0202/1191] optimize --- eval_script.js | 143 ++++++++++++++++++++++++++----------------------- 1 file changed, 77 insertions(+), 66 deletions(-) diff --git a/eval_script.js b/eval_script.js index 53f8afa9f..5dfc1436a 100644 --- a/eval_script.js +++ b/eval_script.js @@ -49,87 +49,97 @@ const __emoji = "🪓" const __concurrencyLimit = 5 if (__isTask) { - const getConf = (() => { + const ____getConf = (() => { return new Promise((resolve) => { - const remoteConf = ____removeGarbage(____getConfInfo(__conf, "remote")) - const localConf = ____removeGarbage(____getConfInfo(__conf, "local")) + const remoteConf = ____removeGarbage(____extractConf(__conf, "remote")) + const localConf = ____removeGarbage(____extractConf(__conf, "local")) if (remoteConf.length > 0) { - __tool.notify("", "", `Start updating ${remoteConf.length} confs...`) console.log("Start updating conf...") + __tool.notify("", "", `Start updating ${remoteConf.length} confs...`) ____concurrentQueueLimit(remoteConf, __concurrencyLimit, (url) => { return ____downloadFile(url) }) .then(result => { console.log("Stop updating conf.") - let allRemoteConf = "" - let allRemoteMSg = "" + let content = [] result.forEach(data => { if (data.body) { - allRemoteConf += "\n" + ____parseRemoteConf(data.body) + content = content.concat(____parseRemoteConf(data.body)) } - allRemoteMSg += allRemoteMSg.length > 0 ? "\n" + data.msg : data.msg }); - let content = localConf.join("\n") - if (allRemoteConf.length > 0) { - content = `${content}\n${allRemoteConf}` - } - resolve({ content, msg: allRemoteMSg }) + content = content.concat(localConf) + resolve({ content, result }) }) } else { - const content = localConf.join("\n") - resolve({ content: content, msg: "" }) + resolve({ content: localConf, result: [] }) } }) }) - let beginDate = new Date() - getConf() + const begin = new Date() + ____getConf() .then((conf) => { - const confObj = ____parseConf(conf.content) - const scriptUrls = Object.keys(confObj) - __tool.notify("", "", `Start updating ${scriptUrls.length} scripts...`) + return new Promise((resolve, reject) => { + if (conf.content.length > 0) { + resolve(conf) + } else { + reject(`Invalid configuration information! Please check!`) + } + }) + }) + .then((conf) => { + const confContent = ____parseConf(conf.content) + const confResult = conf.result + const scriptUrls = Object.keys(confContent) console.log("Start updating script...") + __tool.notify("", "", `Start updating ${scriptUrls.length} scripts...`) ____concurrentQueueLimit(scriptUrls, __concurrencyLimit, (url) => { - return ____downloadFile(url) + return new Promise((resolve) => { + ____downloadFile(url).then((data) => { + if (data.code == 200) { + __tool.write(data.body, data.url) + } + resolve(data) + }) + }) }) .then(result => { console.log("Stop updating script.") - __tool.write(JSON.stringify(confObj), "ScriptConfObject") - const resultMsg = (() => { - let msg = conf.msg - result.forEach(data => { - msg += msg.length > 0 ? "\n" + data.msg : data.msg - }); - return msg - })() - return resultMsg - }) - .then((resultMsg) => { - console.log(resultMsg); - const resultCount = ((msgs) => { + __tool.write(JSON.stringify(confContent), "ScriptConfContentKey") + const resultInfo = (() => { + let message = "" let success = 0 let fail = 0 - msgs.forEach(msg => { - if (msg.match("success")) success++ - if (msg.match("fail")) fail++ + confResult.concat(result).forEach(data => { + if (data.message.match("success")) success++ + if (data.message.match("fail")) fail++ + message += message.length > 0 ? "\n" + data.message : data.message }); - return { success, fail } - }) - let resultMsgs = resultMsg.split("\n") - let count = resultCount(resultMsgs) - let notifyMsg = `${resultMsgs.slice(0, 20).join("\n")}${resultMsgs.length > 20 ? `\n${__emoji}......\n` : ""}` - let lastDate = __tool.read("ScriptLastUpdateDate") + return { message, count: { success, fail } } + })() + return resultInfo + }) + .then((resultInfo) => { + console.log(resultInfo.message) + let messages = resultInfo.message.split("\n") + let notifyMessage = `${messages.slice(0, 20).join("\n")}${messages.length > 20 ? `\n${__emoji}......\n` : ""}` + let lastDate = __tool.read("ScriptLastUpdateDateKey") lastDate = lastDate ? lastDate : new Date().Format("yyyy-MM-dd HH:mm:ss") - __tool.notify("Update Done", `Success: ${count.success} Fail: ${count.fail} Tasks: ${____timeDiff(beginDate, new Date())}s`, `${notifyMsg}\n${lastDate} last update`) - __tool.write(new Date().Format("yyyy-MM-dd HH:mm:ss"), "ScriptLastUpdateDate") + __tool.notify("Update Done", `Success: ${resultInfo.count.success} Fail: ${resultInfo.count.fail} Tasks: ${____timeDiff(begin, new Date())}s`, `${notifyMessage}\n${lastDate} last update`) + __tool.write(new Date().Format("yyyy-MM-dd HH:mm:ss"), "ScriptLastUpdateDateKey") $done() }) }) + .catch((error) => { + console.log(error) + if (__debug) __tool.notify("", "", error) + $done() + }) } if (!__isTask) { const __url = $request.url - const __confObj = JSON.parse(__tool.read("ScriptConfObject")) + const __confObj = JSON.parse(__tool.read("ScriptConfContentKey")) const __script = (() => { let script = null for (let key in __confObj) { @@ -179,8 +189,8 @@ function ____concurrentQueueLimit(list, limit, asyncHandle) { let results = [] let recursion = (arr) => { return asyncHandle(arr.shift()) - .then((result) => { - results.push(result) + .then((data) => { + results.push(data) if (arr.length !== 0) return recursion(arr) else return 'finish' }) @@ -201,23 +211,23 @@ function ____downloadFile(url) { __tool.get(url, (error, response, body) => { let filename = url.match(/.*\/(.*?)$/)[1] if (!error) { - if (response.statusCode == 200) { - __tool.write(body, url) - resolve({ body, msg: `${__emoji}${filename} update success` }) + const code = response.statusCode + if (code == 200) { + resolve({ url, code, body, message: `${__emoji}${filename} update success` }) console.log(`Update success: ${url}`) } else { - resolve({ body, msg: `${__emoji}${filename} update fail` }) + resolve({ url, code, body, message: `${__emoji}${filename} update fail` }) console.log(`Update fail ${response.statusCode}: ${url}`) } } else { - resolve({ body: null, msg: `${__emoji}${filename} update fail` }) + resolve({ url, code: null, body: null, message: `${__emoji}${filename} update fail` }) console.log(`Update fail ${error}: ${url}`) } }) }) } -function ____getConfInfo(conf, type) { +function ____extractConf(conf, type) { const rex = new RegExp("\\[" + type + "\\](.|\\n)*?(?=\\n($|\\[))", "g") let result = rex.exec(conf) if (result) { @@ -242,22 +252,23 @@ function ____parseRemoteConf(conf) { } } }) - return newLines.join("\n") + return newLines } function ____removeGarbage(lines) { - let newLines = [] - lines.forEach((line) => { - line = line.replace(/^\s*/, "") - if (line.length > 0 && line.substring(0, 2) != "//") { - newLines.push(line) + if (lines.length > 0) { + let i = lines.length; + while (i--) { + const line = lines[i] + if (line.length == 0 || line.substring(0, 2) == "//") { + lines.splice(i, 1) + } } - }) - return newLines + } + return lines } -function ____parseConf(conf) { - const lines = conf.split("\n") +function ____parseConf(lines) { let confObj = {} lines.forEach((line) => { line = line.replace(/^\s*/, "") @@ -337,12 +348,12 @@ function ____Tool() { this.write = (value, key) => { if (_isQuanX) return $prefs.setValueForKey(value, key) if (_isSurge) return $persistentStore.write(value, key) - if (_node) console.log(`${key} write success`); + if (_node) console.log(`Write success: ${key}`); } this.read = (key) => { if (_isQuanX) return $prefs.valueForKey(key) if (_isSurge) return $persistentStore.read(key) - if (_node) console.log(`${key} read success`); + if (_node) console.log(`Read success: ${key}`); } this.get = (options, callback) => { if (_isQuanX) { From 57b1eb5dadc627d571580beef9bbdfe39be017bd Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 4 Mar 2020 22:52:24 +0800 Subject: [PATCH 0203/1191] optimize --- eval_script.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/eval_script.js b/eval_script.js index 5dfc1436a..a3ade84cf 100644 --- a/eval_script.js +++ b/eval_script.js @@ -161,14 +161,14 @@ if (!__isTask) { if (__script) { if (__script.content) { eval(__script.content) - if (__log) console.log(`Request url: ${__url}\nMatch url: ${__script.match}\nExecute script: ${__script.url}`) + if (__log) console.log(`Request URL: ${__url}\nMatch URL: ${__script.match}\nExecute script: ${__script.url}`) } else { $done({}) - if (__log) console.log(`Request url: ${__url}\nMatch url: ${__script.match}\nScript not executed. Script not found: ${__script.url}`) + if (__log) console.log(`Request URL: ${__url}\nMatch URL: ${__script.match}\nScript not executed. Script not found: ${__script.url}`) } } else { $done({}) - if (__log) console.log(`No match url: ${__url}`) + if (__log) console.log(`No match URL: ${__url}`) } } @@ -214,14 +214,14 @@ function ____downloadFile(url) { const code = response.statusCode if (code == 200) { resolve({ url, code, body, message: `${__emoji}${filename} update success` }) - console.log(`Update success: ${url}`) + console.log(`Update Success: ${url}`) } else { resolve({ url, code, body, message: `${__emoji}${filename} update fail` }) - console.log(`Update fail ${response.statusCode}: ${url}`) + console.log(`Update Fail ${response.statusCode}: ${url}`) } } else { resolve({ url, code: null, body: null, message: `${__emoji}${filename} update fail` }) - console.log(`Update fail ${error}: ${url}`) + console.log(`Update Fail ${error}: ${url}`) } }) }) @@ -301,7 +301,7 @@ function ____parseConf(lines) { } } }) - if (__log) console.log(`Conf information: ${JSON.stringify(confObj)}`) + if (__log) console.log(`Conf Information: ${JSON.stringify(confObj)}`) return confObj } @@ -319,9 +319,9 @@ function ____parseMatch(match) { } function ____throwConfError(line) { - __tool.notify("Conf error", "", line) + __tool.notify("Conf Error", "", line) $done() - throw new Error(`Conf error: ${line}`) + throw new Error(`Conf Error: ${line}`) } function ____Tool() { @@ -348,12 +348,12 @@ function ____Tool() { this.write = (value, key) => { if (_isQuanX) return $prefs.setValueForKey(value, key) if (_isSurge) return $persistentStore.write(value, key) - if (_node) console.log(`Write success: ${key}`); + if (_node) console.log(`Write Success: ${key}`); } this.read = (key) => { if (_isQuanX) return $prefs.valueForKey(key) if (_isSurge) return $persistentStore.read(key) - if (_node) console.log(`Read success: ${key}`); + if (_node) console.log(`Read Success: ${key}`); } this.get = (options, callback) => { if (_isQuanX) { From 90e940caad11b08dc41c73e6632044a36eddeffb Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 5 Mar 2020 11:37:34 +0800 Subject: [PATCH 0204/1191] optimize --- eval_script.js | 101 +++++++++++++++++++++++++++++-------------------- 1 file changed, 59 insertions(+), 42 deletions(-) diff --git a/eval_script.js b/eval_script.js index a3ade84cf..3a49b8b5e 100644 --- a/eval_script.js +++ b/eval_script.js @@ -44,7 +44,6 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf const __tool = new ____Tool() const __isTask = __tool.isTask const __log = false -const __debug = true const __emoji = "🪓" const __concurrencyLimit = 5 @@ -82,15 +81,33 @@ if (__isTask) { return new Promise((resolve, reject) => { if (conf.content.length > 0) { resolve(conf) + if (__log) console.log(conf.content) } else { - reject(`Invalid configuration information! Please check!`) + let message = "" + conf.result.forEach(data => { + message += message.length > 0 ? "\n" + data.message : data.message + }); + __tool.notify("", "", message) + reject(`Unavailable configuration! Please check!`) } }) }) .then((conf) => { - const confContent = ____parseConf(conf.content) + return new Promise((resolve, reject) => { + const result = ____parseConf(conf.content) + if (result.obj) { + conf["obj"] = result.obj + resolve(conf) + if (__log) console.log(result.obj) + } else { + reject(`Configuration information error: ${result.error}`) + } + }) + }) + .then((conf) => { + const confObj = conf.obj const confResult = conf.result - const scriptUrls = Object.keys(confContent) + const scriptUrls = Object.keys(confObj) console.log("Start updating script...") __tool.notify("", "", `Start updating ${scriptUrls.length} scripts...`) ____concurrentQueueLimit(scriptUrls, __concurrencyLimit, (url) => { @@ -105,7 +122,7 @@ if (__isTask) { }) .then(result => { console.log("Stop updating script.") - __tool.write(JSON.stringify(confContent), "ScriptConfContentKey") + __tool.write(JSON.stringify(confObj), "ScriptConfObjKey") const resultInfo = (() => { let message = "" let success = 0 @@ -120,44 +137,50 @@ if (__isTask) { return resultInfo }) .then((resultInfo) => { - console.log(resultInfo.message) - let messages = resultInfo.message.split("\n") - let notifyMessage = `${messages.slice(0, 20).join("\n")}${messages.length > 20 ? `\n${__emoji}......\n` : ""}` - let lastDate = __tool.read("ScriptLastUpdateDateKey") - lastDate = lastDate ? lastDate : new Date().Format("yyyy-MM-dd HH:mm:ss") - __tool.notify("Update Done", `Success: ${resultInfo.count.success} Fail: ${resultInfo.count.fail} Tasks: ${____timeDiff(begin, new Date())}s`, `${notifyMessage}\n${lastDate} last update`) - __tool.write(new Date().Format("yyyy-MM-dd HH:mm:ss"), "ScriptLastUpdateDateKey") + const messages = resultInfo.message.split("\n") + const detail = `${messages.slice(0, 20).join("\n")}${messages.length > 20 ? `\n${__emoji}......` : ""}` + const summary = `Success: ${resultInfo.count.success} Fail: ${resultInfo.count.fail} Tasks: ${____timeDiff(begin, new Date())}s` + const nowDate = `${new Date().Format("yyyy-MM-dd HH:mm:ss")} last update` + const lastDate = __tool.read("ScriptLastUpdateDateKey") + console.log(`${summary}\n${detail}\n${lastDate ? lastDate : nowDate}`) + __tool.notify("Update Done", summary, `${detail}\n${lastDate ? lastDate : nowDate}`) + __tool.write(nowDate, "ScriptLastUpdateDateKey") $done() }) }) .catch((error) => { console.log(error) - if (__debug) __tool.notify("", "", error) + __tool.notify("", "", error) $done() }) } if (!__isTask) { const __url = $request.url - const __confObj = JSON.parse(__tool.read("ScriptConfContentKey")) + const __confObj = JSON.parse(__tool.read("ScriptConfObjKey")) const __script = (() => { let script = null - for (let key in __confObj) { - let value = __confObj[key] - value.some((url) => { + const keys = Object.keys(__confObj) + for (let i = keys.length; i--;) { + if (script) break + const key = keys[i] + const value = __confObj[key] + for (let j = value.length; j--;) { + const url = value[j] try { if (__url.match(url)) { script = { url: key, content: __tool.read(key), match: url } - return true + break } } catch (error) { __tool.notify("", "", `Regular Error: ${url}\nRequest URL: ${__url}`) console.log(`${error}\nRegular Error: ${url}\nRequest URL: ${__url}`) } - }) + } } return script })() + if (__script) { if (__script.content) { eval(__script.content) @@ -178,7 +201,7 @@ function ____timeDiff(begin, end) { async function ____sequenceQueue(urls) { let results = [] - for (let i = 0; i < urls.length; i++) { + for (let i = 0, len = urls.length; i < len; i++) { let result = await ____downloadFile(urls[i]) results.push(result) } @@ -187,7 +210,7 @@ async function ____sequenceQueue(urls) { function ____concurrentQueueLimit(list, limit, asyncHandle) { let results = [] - let recursion = (arr) => { + const recursion = (arr) => { return asyncHandle(arr.shift()) .then((data) => { results.push(data) @@ -195,9 +218,10 @@ function ____concurrentQueueLimit(list, limit, asyncHandle) { else return 'finish' }) }; - let listCopy = [].concat(list) + const listCopy = [].concat(list) let asyncList = [] - if (list.length < limit) limit = list.length + if (list.length < limit) + limit = list.length while (limit--) { asyncList.push(recursion(listCopy)) } @@ -209,7 +233,7 @@ function ____concurrentQueueLimit(list, limit, asyncHandle) { function ____downloadFile(url) { return new Promise((resolve) => { __tool.get(url, (error, response, body) => { - let filename = url.match(/.*\/(.*?)$/)[1] + const filename = url.match(/.*\/(.*?)$/)[1] if (!error) { const code = response.statusCode if (code == 200) { @@ -242,8 +266,8 @@ function ____extractConf(conf, type) { function ____parseRemoteConf(conf) { const lines = conf.split("\n") let newLines = [] - lines.forEach((line) => { - line = line.replace(/^\s*/, "") + for (let i = 0, len = lines.length; i < len; i++) { + let line = lines[i].replace(/^\s*/, "") if (line.length > 0 && /^#{3}/.test(line)) { line = line.replace(/^#*/, "") line = line.replace(/^\s*/, "") @@ -251,7 +275,7 @@ function ____parseRemoteConf(conf) { newLines.push(line) } } - }) + } return newLines } @@ -270,11 +294,11 @@ function ____removeGarbage(lines) { function ____parseConf(lines) { let confObj = {} - lines.forEach((line) => { - line = line.replace(/^\s*/, "") + for (let i = 0, len = lines.length; i < len; i++) { + let line = lines[i].replace(/^\s*/, "") if (line.length > 0 && line.substring(0, 2) != "//") { - let urlRegex = /.+\s+url\s+.+/ - let evalRegex = /.+\s+eval\s+.+/ + const urlRegex = /.+\s+url\s+.+/ + const evalRegex = /.+\s+eval\s+.+/ const avaliable = (() => { return urlRegex.test(line) || evalRegex.test(line) })() @@ -294,15 +318,14 @@ function ____parseConf(lines) { if (remote.length > 0 && match.length > 0) { confObj[remote] = match } else { - if (__debug) ____throwConfError(line) + return { obj: null, error: line } } } else { - if (__debug) ____throwConfError(line) + return { obj: null, error: line } } } - }) - if (__log) console.log(`Conf Information: ${JSON.stringify(confObj)}`) - return confObj + } + return { obj: confObj, error: null } } function ____parseMatch(match) { @@ -318,12 +341,6 @@ function ____parseMatch(match) { return matchs } -function ____throwConfError(line) { - __tool.notify("Conf Error", "", line) - $done() - throw new Error(`Conf Error: ${line}`) -} - function ____Tool() { _node = (() => { if (typeof require == "function") { From 1bcc87f8f2d34569d8cd0a7b69633d4bde7e5118 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 5 Mar 2020 13:29:44 +0800 Subject: [PATCH 0205/1191] optimize --- eval_script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eval_script.js b/eval_script.js index 3a49b8b5e..ad6695831 100644 --- a/eval_script.js +++ b/eval_script.js @@ -44,6 +44,7 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf const __tool = new ____Tool() const __isTask = __tool.isTask const __log = false +const __debug = false const __emoji = "🪓" const __concurrencyLimit = 5 @@ -54,7 +55,7 @@ if (__isTask) { const localConf = ____removeGarbage(____extractConf(__conf, "local")) if (remoteConf.length > 0) { console.log("Start updating conf...") - __tool.notify("", "", `Start updating ${remoteConf.length} confs...`) + if (__debug) __tool.notify("", "", `Start updating ${remoteConf.length} confs...`) ____concurrentQueueLimit(remoteConf, __concurrencyLimit, (url) => { return ____downloadFile(url) }) @@ -87,8 +88,7 @@ if (__isTask) { conf.result.forEach(data => { message += message.length > 0 ? "\n" + data.message : data.message }); - __tool.notify("", "", message) - reject(`Unavailable configuration! Please check!`) + reject(message.length > 0 ? message : `Unavailable configuration! Please check!`) } }) }) From 566b4e147ab10946d6b5ec0526479b90a053f597 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 5 Mar 2020 14:08:26 +0800 Subject: [PATCH 0206/1191] optimize --- eval_script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index ad6695831..d58411e73 100644 --- a/eval_script.js +++ b/eval_script.js @@ -150,7 +150,7 @@ if (__isTask) { }) .catch((error) => { console.log(error) - __tool.notify("", "", error) + __tool.notify("eval_script.js", "", error) $done() }) } From cb6ddd6a0aa7005ac3d61dcaae65e240c4f8f359 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 5 Mar 2020 14:31:20 +0800 Subject: [PATCH 0207/1191] optimize --- eval_script.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eval_script.js b/eval_script.js index d58411e73..144eb1a57 100644 --- a/eval_script.js +++ b/eval_script.js @@ -29,13 +29,13 @@ const __conf = String.raw` -[remote] +[eval_remote] // custom remote... https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf -[local] +[eval_local] // custom local... @@ -51,8 +51,8 @@ const __concurrencyLimit = 5 if (__isTask) { const ____getConf = (() => { return new Promise((resolve) => { - const remoteConf = ____removeGarbage(____extractConf(__conf, "remote")) - const localConf = ____removeGarbage(____extractConf(__conf, "local")) + const remoteConf = ____removeGarbage(____extractConf(__conf, "eval_remote")) + const localConf = ____removeGarbage(____extractConf(__conf, "eval_local")) if (remoteConf.length > 0) { console.log("Start updating conf...") if (__debug) __tool.notify("", "", `Start updating ${remoteConf.length} confs...`) From 6bca68622cee43520a0134480aa454ee79c6bac4 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 5 Mar 2020 18:51:19 +0800 Subject: [PATCH 0208/1191] optimize --- eval_script.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/eval_script.js b/eval_script.js index 144eb1a57..41d267a8c 100644 --- a/eval_script.js +++ b/eval_script.js @@ -81,8 +81,8 @@ if (__isTask) { .then((conf) => { return new Promise((resolve, reject) => { if (conf.content.length > 0) { - resolve(conf) if (__log) console.log(conf.content) + resolve(conf) } else { let message = "" conf.result.forEach(data => { @@ -97,8 +97,8 @@ if (__isTask) { const result = ____parseConf(conf.content) if (result.obj) { conf["obj"] = result.obj - resolve(conf) if (__log) console.log(result.obj) + resolve(conf) } else { reject(`Configuration information error: ${result.error}`) } @@ -138,11 +138,11 @@ if (__isTask) { }) .then((resultInfo) => { const messages = resultInfo.message.split("\n") - const detail = `${messages.slice(0, 20).join("\n")}${messages.length > 20 ? `\n${__emoji}......` : ""}` + const detail = `${messages.slice(0, 25).join("\n")}${messages.length > 20 ? `\n${__emoji}......` : ""}` const summary = `Success: ${resultInfo.count.success} Fail: ${resultInfo.count.fail} Tasks: ${____timeDiff(begin, new Date())}s` const nowDate = `${new Date().Format("yyyy-MM-dd HH:mm:ss")} last update` const lastDate = __tool.read("ScriptLastUpdateDateKey") - console.log(`${summary}\n${detail}\n${lastDate ? lastDate : nowDate}`) + console.log(`${summary}\n${resultInfo.message}\n${lastDate ? lastDate : nowDate}`) __tool.notify("Update Done", summary, `${detail}\n${lastDate ? lastDate : nowDate}`) __tool.write(nowDate, "ScriptLastUpdateDateKey") $done() @@ -199,10 +199,10 @@ function ____timeDiff(begin, end) { return Math.ceil((end.getTime() - begin.getTime()) / 1000) } -async function ____sequenceQueue(urls) { +async function ____sequenceQueue(urls, asyncHandle) { let results = [] for (let i = 0, len = urls.length; i < len; i++) { - let result = await ____downloadFile(urls[i]) + let result = await asyncHandle(urls[i]) results.push(result) } return results @@ -237,15 +237,15 @@ function ____downloadFile(url) { if (!error) { const code = response.statusCode if (code == 200) { - resolve({ url, code, body, message: `${__emoji}${filename} update success` }) console.log(`Update Success: ${url}`) + resolve({ url, code, body, message: `${__emoji}${filename} update success` }) } else { - resolve({ url, code, body, message: `${__emoji}${filename} update fail` }) console.log(`Update Fail ${response.statusCode}: ${url}`) + resolve({ url, code, body, message: `${__emoji}${filename} update fail` }) } } else { + console.log(`Update Fail ${error}`) resolve({ url, code: null, body: null, message: `${__emoji}${filename} update fail` }) - console.log(`Update Fail ${error}: ${url}`) } }) }) From 757a0148573565b0fa07e7b497fcba0aa78c7176 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 5 Mar 2020 21:58:21 +0800 Subject: [PATCH 0209/1191] Create sub_eval.conf --- sub_eval.conf | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 sub_eval.conf diff --git a/sub_eval.conf b/sub_eval.conf new file mode 100644 index 000000000..1835a4f73 --- /dev/null +++ b/sub_eval.conf @@ -0,0 +1,12 @@ +//jd +####^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js + +//tb +####^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +//nf +####^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D eval https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +//wb +####^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +####^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js From f71d422fdaac1346ae387f4e0b7f10b54216777a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 6 Mar 2020 00:14:41 +0800 Subject: [PATCH 0210/1191] Update sub_eval.conf --- sub_eval.conf | 3 --- 1 file changed, 3 deletions(-) diff --git a/sub_eval.conf b/sub_eval.conf index 1835a4f73..e17d5fd6c 100644 --- a/sub_eval.conf +++ b/sub_eval.conf @@ -1,6 +1,3 @@ -//jd -####^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - //tb ####^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js From ebf41542e192558e23253b2f8bd342277e3dd089 Mon Sep 17 00:00:00 2001 From: goose Date: Fri, 6 Mar 2020 12:06:02 +0800 Subject: [PATCH 0211/1191] add custom emojis --- eval_script.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/eval_script.js b/eval_script.js index 41d267a8c..88359fb90 100644 --- a/eval_script.js +++ b/eval_script.js @@ -31,8 +31,7 @@ const __conf = String.raw` [eval_remote] // custom remote... - -https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf +https://raw.githubusercontent.com/yichahucha/surge/master/sub_eval.conf [eval_local] @@ -41,11 +40,17 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf ` +const __emoji = "• " +const __emojiSuccess = "😁" +const __emojiFail = "😓" +const __emojiTasks = "🕐" +const __emojiDone = "✔️" +const __showLine = 20 + const __tool = new ____Tool() const __isTask = __tool.isTask const __log = false const __debug = false -const __emoji = "🪓" const __concurrencyLimit = 5 if (__isTask) { @@ -138,12 +143,12 @@ if (__isTask) { }) .then((resultInfo) => { const messages = resultInfo.message.split("\n") - const detail = `${messages.slice(0, 25).join("\n")}${messages.length > 20 ? `\n${__emoji}......` : ""}` - const summary = `Success: ${resultInfo.count.success} Fail: ${resultInfo.count.fail} Tasks: ${____timeDiff(begin, new Date())}s` + const detail = `${messages.slice(0, __showLine).join("\n")}${messages.length > 20 ? `\n${__emoji}......` : ""}` + const summary = `${__emojiSuccess}Success: ${resultInfo.count.success} ${__emojiFail}Fail: ${resultInfo.count.fail} ${__emojiTasks}Tasks: ${____timeDiff(begin, new Date())}s` const nowDate = `${new Date().Format("yyyy-MM-dd HH:mm:ss")} last update` const lastDate = __tool.read("ScriptLastUpdateDateKey") console.log(`${summary}\n${resultInfo.message}\n${lastDate ? lastDate : nowDate}`) - __tool.notify("Update Done", summary, `${detail}\n${lastDate ? lastDate : nowDate}`) + __tool.notify(`${__emojiDone}Update Done`, summary, `${detail}\n${__emoji}${lastDate ? lastDate : nowDate}`) __tool.write(nowDate, "ScriptLastUpdateDateKey") $done() }) From d6a087c8da874de53fa4169304fbdce9e56a66d5 Mon Sep 17 00:00:00 2001 From: goose Date: Fri, 6 Mar 2020 16:39:48 +0800 Subject: [PATCH 0212/1191] fix --- jd_price.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/jd_price.js b/jd_price.js index 869ac4b9d..905e94ec3 100644 --- a/jd_price.js +++ b/jd_price.js @@ -130,11 +130,18 @@ function difference(currentPrice, price) { } } -function sub(num1, num2) { - const num1Digits = (num1.toString().split('.')[1] || '').length; - const num2Digits = (num2.toString().split('.')[1] || '').length; - const baseNum = Math.pow(10, Math.max(num1Digits, num2Digits)); - return (num1 * baseNum - num2 * baseNum) / baseNum; +function sub(arg1, arg2) { + return add(arg1, -Number(arg2), arguments[2]); +} + +function add(arg1, arg2) { + arg1 = arg1.toString(), arg2 = arg2.toString(); + var arg1Arr = arg1.split("."), arg2Arr = arg2.split("."), d1 = arg1Arr.length == 2 ? arg1Arr[1] : "", d2 = arg2Arr.length == 2 ? arg2Arr[1] : ""; + var maxLen = Math.max(d1.length, d2.length); + var m = Math.pow(10, maxLen); + var result = Number(((arg1 * m + arg2 * m) / m).toFixed(maxLen)); + var d = arguments[2]; + return typeof d === "number" ? Number((result).toFixed(d)) : result; } function request_history_price(share_url, callback) { From fc0a5096229609e353f16d6a71a06fbf332e5737 Mon Sep 17 00:00:00 2001 From: goose Date: Fri, 6 Mar 2020 16:45:09 +0800 Subject: [PATCH 0213/1191] fix --- jd_price_lite.js | 17 ++++++++++++----- tb_price.js | 17 ++++++++++++----- tb_price_lite.js | 17 ++++++++++++----- 3 files changed, 36 insertions(+), 15 deletions(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index 45bcdacef..751237f00 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -111,11 +111,18 @@ function difference(currentPrice, price) { } } -function sub(num1, num2) { - const num1Digits = (num1.toString().split('.')[1] || '').length; - const num2Digits = (num2.toString().split('.')[1] || '').length; - const baseNum = Math.pow(10, Math.max(num1Digits, num2Digits)); - return (num1 * baseNum - num2 * baseNum) / baseNum; +function sub(arg1, arg2) { + return add(arg1, -Number(arg2), arguments[2]); +} + +function add(arg1, arg2) { + arg1 = arg1.toString(), arg2 = arg2.toString(); + var arg1Arr = arg1.split("."), arg2Arr = arg2.split("."), d1 = arg1Arr.length == 2 ? arg1Arr[1] : "", d2 = arg2Arr.length == 2 ? arg2Arr[1] : ""; + var maxLen = Math.max(d1.length, d2.length); + var m = Math.pow(10, maxLen); + var result = Number(((arg1 * m + arg2 * m) / m).toFixed(maxLen)); + var d = arguments[2]; + return typeof d === "number" ? Number((result).toFixed(d)) : result; } function request_history_price(share_url, callback) { diff --git a/tb_price.js b/tb_price.js index f85df2c32..eb66e7587 100644 --- a/tb_price.js +++ b/tb_price.js @@ -224,11 +224,18 @@ function difference(currentPrice, price) { } } -function sub(num1, num2) { - const num1Digits = (num1.toString().split('.')[1] || '').length; - const num2Digits = (num2.toString().split('.')[1] || '').length; - const baseNum = Math.pow(10, Math.max(num1Digits, num2Digits)); - return (num1 * baseNum - num2 * baseNum) / baseNum; +function sub(arg1, arg2) { + return add(arg1, -Number(arg2), arguments[2]); +} + +function add(arg1, arg2) { + arg1 = arg1.toString(), arg2 = arg2.toString(); + var arg1Arr = arg1.split("."), arg2Arr = arg2.split("."), d1 = arg1Arr.length == 2 ? arg1Arr[1] : "", d2 = arg2Arr.length == 2 ? arg2Arr[1] : ""; + var maxLen = Math.max(d1.length, d2.length); + var m = Math.pow(10, maxLen); + var result = Number(((arg1 * m + arg2 * m) / m).toFixed(maxLen)); + var d = arguments[2]; + return typeof d === "number" ? Number((result).toFixed(d)) : result; } function requestPrice(share_url, callback) { diff --git a/tb_price_lite.js b/tb_price_lite.js index 0e9a1748c..6ffc8b49d 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -141,11 +141,18 @@ function difference(currentPrice, price) { } } -function sub(num1, num2) { - const num1Digits = (num1.toString().split('.')[1] || '').length; - const num2Digits = (num2.toString().split('.')[1] || '').length; - const baseNum = Math.pow(10, Math.max(num1Digits, num2Digits)); - return (num1 * baseNum - num2 * baseNum) / baseNum; +function sub(arg1, arg2) { + return add(arg1, -Number(arg2), arguments[2]); +} + +function add(arg1, arg2) { + arg1 = arg1.toString(), arg2 = arg2.toString(); + var arg1Arr = arg1.split("."), arg2Arr = arg2.split("."), d1 = arg1Arr.length == 2 ? arg1Arr[1] : "", d2 = arg2Arr.length == 2 ? arg2Arr[1] : ""; + var maxLen = Math.max(d1.length, d2.length); + var m = Math.pow(10, maxLen); + var result = Number(((arg1 * m + arg2 * m) / m).toFixed(maxLen)); + var d = arguments[2]; + return typeof d === "number" ? Number((result).toFixed(d)) : result; } function requestPrice(share_url, callback) { From 72367425d691a847c0ade10ebe0562970b0ded14 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 7 Mar 2020 00:11:58 +0800 Subject: [PATCH 0214/1191] Create tb_test.js --- tb_test.js | 496 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 496 insertions(+) create mode 100644 tb_test.js diff --git a/tb_test.js b/tb_test.js new file mode 100644 index 000000000..8876d90e3 --- /dev/null +++ b/tb_test.js @@ -0,0 +1,496 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const $tool = new Tool() +const path1 = "/amdc/mobileDispatch" +const path2 = "/gw/mtop.taobao.detail.getdetail" +const consoleLog = false +const url = $request.url + +if (url.indexOf(path1) != -1) { + let body = $request.body + let json = Qs2Json(body) + let domain = json.domain.split(" ") + let i = domain.length; + while (i--) { + const block = "trade-acs.m.taobao.com" + const element = domain[i]; + if (element == block) { + domain.splice(i, 1); + } + } + json.domain = domain.join(" ") + body = Json2Qs(json) + $done({ body }) +} + +if (url.indexOf(path2) != -1) { + const body = $response.body + let obj = JSON.parse(body) + let item = obj.data.item + let shareUrl = `https://item.taobao.com/item.htm?id=${item.itemId}` + requestPrice(shareUrl, function (data) { + if (data) { + if (obj.data.apiStack) { + let apiStack = obj.data.apiStack[0] + let value = JSON.parse(apiStack.value) + let tradeConsumerProtection = null + let consumerProtection = null + let trade = null + if (value.global) { + tradeConsumerProtection = value.global.data.tradeConsumerProtection + consumerProtection = value.global.data.consumerProtection + trade = value.global.data.trade + } else { + tradeConsumerProtection = value.tradeConsumerProtection + consumerProtection = value.consumerProtection + trade = value.trade + } + if (trade && trade.useWap == "true") { + $done({ body }) + sendNotify(data, shareUrl) + } else { + if (tradeConsumerProtection) { + tradeConsumerProtection = setTradeConsumerProtection(data, tradeConsumerProtection) + } else { + let vertical = value.vertical + if (vertical && vertical.hasOwnProperty("tmallhkDirectSale")) { + value["tradeConsumerProtection"] = customTradeConsumerProtection() + value.tradeConsumerProtection = setTradeConsumerProtection(data, value.tradeConsumerProtection) + } else { + consumerProtection = setConsumerProtection(data, consumerProtection) + } + } + apiStack.value = JSON.stringify(value) + $done({ body: JSON.stringify(obj) }) + } + } else { + $done({ body }) + sendNotify(data, shareUrl) + } + } else { + $done({ body }) + } + }) +} + +function sendNotify(data, shareUrl) { + if (data.ok == 1 && data.single) { + const lower = lowerMsgs(data.single)[0] + const detail = priceSummary(data)[1] + const tip = data.PriceRemark.Tip + "(仅供参考)" + $tool.notify("", "", `〽️历史${lower} ${tip}\n${detail}\n\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) + } + if (data.ok == 0 && data.msg.length > 0) { + $tool.notify("", "", `⚠️ ${data.msg}`) + } +} + +function setConsumerProtection(data, consumerProtection) { + let basicService = consumerProtection.serviceProtection.basicService + let items = consumerProtection.items + if (data.ok == 1 && data.single) { + const lower = lowerMsgs(data.single) + const tip = data.PriceRemark.Tip + const summary = priceSummary(data)[1] + const item = customItem(lower[1], [`${lower[0]} ${tip}(仅供参考)\n${summary}`]) + basicService.services.unshift(item) + items.unshift(item) + } + if (data.ok == 0 && data.msg.length > 0) { + let item = customItem("暂无历史价格", [data.msg]) + basicService.services.unshift(item) + items.unshift(item) + } + return consumerProtection +} + +function setTradeConsumerProtection(data, tradeConsumerProtection) { + let service = tradeConsumerProtection.tradeConsumerService.service + if (data.ok == 1 && data.single) { + const lower = lowerMsgs(data.single) + const tip = data.PriceRemark.Tip + const tbitems = priceSummary(data)[0] + const item = customItem(lower[1], `${lower[0]} ${tip}(仅供参考)`) + let nonService = tradeConsumerProtection.tradeConsumerService.nonService + service.items = service.items.concat(nonService.items) + nonService.title = "价格详情" + nonService.items = tbitems + service.items.unshift(item) + } + if (data.ok == 0 && data.msg.length > 0) { + service.items.unshift(customItem("暂无历史价格", data.msg)) + } + return tradeConsumerProtection +} + +function lowerMsgs(data) { + const lower = data.lowerPriceyh + const lowerDate = dateFormat(data.lowerDateyh) + const lowerMsg = "最低到手价:¥" + String(lower) + `(${lowerDate})` + const lowerMsg1 = "历史最低¥" + String(lower) + return [lowerMsg, lowerMsg1] +} + +function priceSummary(data) { + let tbitems = [] + let summary = "" + let listPriceDetail = data.PriceRemark.ListPriceDetail + listPriceDetail.pop() + let list = listPriceDetail.concat(historySummary(data.single)) + list.forEach((item, index) => { + if (index == 2) { + item.Name = "双十一价格" + } else if (index == 3) { + item.Name = "六一八价格" + } else if (index == 4) { + item.Name = "三十天最低" + } + summary += `\n${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` + let summaryItem = `${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` + tbitems.push(customItem(summaryItem)) + }) + return [tbitems, summary] +} + +function historySummary(single) { + const rexMatch = /\[.*?\]/g; + const rexExec = /\[(.*),(.*),"(.*)"\]/; + let currentPrice, lowest60, lowest180, lowest360 + let list = single.jiagequshiyh.match(rexMatch); + list = list.reverse().slice(0, 360); + list.forEach((item, index) => { + if (item.length > 0) { + const result = rexExec.exec(item); + const dateUTC = new Date(eval(result[1])); + const date = dateUTC.format("yyyy-MM-dd"); + let price = parseFloat(result[2]); + if (index == 0) { + currentPrice = price + lowest60 = { Name: "六十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest180 = { Name: "一百八最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest360 = { Name: "三百六最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + } + if (index < 60 && price <= lowest60.price) { + lowest60.price = price + lowest60.Price = `¥${String(price)}` + lowest60.Date = date + lowest60.Difference = difference(currentPrice, price) + } + if (index < 180 && price <= lowest180.price) { + lowest180.price = price + lowest180.Price = `¥${String(price)}` + lowest180.Date = date + lowest180.Difference = difference(currentPrice, price) + } + if (index < 360 && price <= lowest360.price) { + lowest360.price = price + lowest360.Price = `¥${String(price)}` + lowest360.Date = date + lowest360.Difference = difference(currentPrice, price) + } + } + }); + return [lowest60, lowest180, lowest360]; +} + +function difference(currentPrice, price) { + let difference = sub(currentPrice, price) + if (difference == 0) { + return "-" + } else { + return `${difference > 0 ? "↑" : "↓"}${String(difference)}` + } +} + +function sub(arg1, arg2) { + return add(arg1, -Number(arg2), arguments[2]); +} + +function add(arg1, arg2) { + arg1 = arg1.toString(), arg2 = arg2.toString(); + var arg1Arr = arg1.split("."), arg2Arr = arg2.split("."), d1 = arg1Arr.length == 2 ? arg1Arr[1] : "", d2 = arg2Arr.length == 2 ? arg2Arr[1] : ""; + var maxLen = Math.max(d1.length, d2.length); + var m = Math.pow(10, maxLen); + var result = Number(((arg1 * m + arg2 * m) / m).toFixed(maxLen)); + var d = arguments[2]; + return typeof d === "number" ? Number((result).toFixed(d)) : result; +} + +function requestPrice(share_url, callback) { + const options = { + url: "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", + headers: { + "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" + }, + body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent(share_url) + } + $tool.post(options, function (error, response, data) { + if (!error) { + callback(JSON.parse(data)); + if (consoleLog) console.log("Data:\n" + data); + } else { + callback(null, null); + if (consoleLog) console.log("Error:\n" + error); + } + }) +} + +function dateFormat(cellval) { + const date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10)); + const month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; + const currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); + return date.getFullYear() + "-" + month + "-" + currentDate; +} + +function getSpace(length) { + let blank = ""; + for (let index = 0; index < length; index++) { + blank += " "; + } + return blank; +} + +function customItem(title, desc) { + return { + icon: "https://s2.ax1x.com/2020/02/16/3STeIJ.png", + title: title, + name: title, + desc: desc + } +} + +function customTradeConsumerProtection() { + return { + "tradeConsumerService": { + "service": { + "items": [ + ], + "icon": "", + "title": "基础服务" + }, + "nonService": { + "items": [ + ], + "title": "其他" + } + }, + "passValue": "all", + "url": "https://h5.m.taobao.com/app/detailsubpage/consumer/index.js", + "type": "0" + } +} + +function Qs2Json(url) { + url = url == null ? window.location.href : url; + var search = url.substring(url.lastIndexOf("?") + 1); + var obj = {}; + var reg = /([^?&=]+)=([^?&=]*)/g; + search.replace(reg, function (rs, $1, $2) { + var name = decodeURIComponent($1); + var val = decodeURIComponent($2); + val = String(val); + obj[name] = val; + return rs; + }); + return obj; +} + +function Json2Qs(json) { + var temp = []; + for (var k in json) { + temp.push(k + "=" + json[k]); + } + return temp.join("&"); +} + +Array.prototype.insert = function (index, item) { + this.splice(index, 0, item); +}; + +Date.prototype.format = function (fmt) { + var o = { + "y+": this.getFullYear(), + "M+": this.getMonth() + 1, + "d+": this.getDate(), + "h+": this.getHours(), + "m+": this.getMinutes(), + "s+": this.getSeconds(), + "q+": Math.floor((this.getMonth() + 3) / 3), + "S+": this.getMilliseconds() + }; + for (var k in o) { + if (new RegExp("(" + k + ")").test(fmt)) { + if (k == "y+") { + fmt = fmt.replace(RegExp.$1, ("" + o[k]).substr(4 - RegExp.$1.length)); + } + else if (k == "S+") { + var lens = RegExp.$1.length; + lens = lens == 1 ? 3 : lens; + fmt = fmt.replace(RegExp.$1, ("00" + o[k]).substr(("" + o[k]).length - 1, lens)); + } + else { + fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + } + } + } + return fmt; +} + +function Tool() { + _node = (() => { + if (typeof require == "function") { + const request = require('request') + return ({ request }) + } else { + return (null) + } + })() + _isSurge = typeof $httpClient != "undefined" + _isQuanX = typeof $task != "undefined" + this.isSurge = _isSurge + this.isQuanX = _isQuanX + this.isResponse = typeof $response != "undefined" + this.notify = (title, subtitle, message) => { + if (_isQuanX) $notify(title, subtitle, message) + if (_isSurge) $notification.post(title, subtitle, message) + if (_node) console.log(JSON.stringify({ title, subtitle, message })); + } + this.write = (value, key) => { + if (_isQuanX) return $prefs.setValueForKey(value, key) + if (_isSurge) return $persistentStore.write(value, key) + } + this.read = (key) => { + if (_isQuanX) return $prefs.valueForKey(key) + if (_isSurge) return $persistentStore.read(key) + } + this.get = (options, callback) => { + if (_isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "GET" + $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) + } + if (_isSurge) $httpClient.get(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request(options, (error, response, body) => { callback(error, _status(response), body) }) + } + this.post = (options, callback) => { + if (_isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "POST" + $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) + } + if (_isSurge) $httpClient.post(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request.post(options, (error, response, body) => { callback(error, _status(response), body) }) + } + _status = (response) => { + if (response) { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } + } + return response + } +} + +function Base64() { + // private property + _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + // public method for encoding + this.encode = function (input) { + var output = ""; + var chr1, chr2, chr3, enc1, enc2, enc3, enc4; + var i = 0; + input = _utf8_encode(input); + while (i < input.length) { + chr1 = input.charCodeAt(i++); + chr2 = input.charCodeAt(i++); + chr3 = input.charCodeAt(i++); + enc1 = chr1 >> 2; + enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); + enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); + enc4 = chr3 & 63; + if (isNaN(chr2)) { + enc3 = enc4 = 64; + } else if (isNaN(chr3)) { + enc4 = 64; + } + output = output + + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + + _keyStr.charAt(enc3) + _keyStr.charAt(enc4); + } + return output; + } + // public method for decoding + this.decode = function (input) { + var output = ""; + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0; + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); + while (i < input.length) { + enc1 = _keyStr.indexOf(input.charAt(i++)); + enc2 = _keyStr.indexOf(input.charAt(i++)); + enc3 = _keyStr.indexOf(input.charAt(i++)); + enc4 = _keyStr.indexOf(input.charAt(i++)); + chr1 = (enc1 << 2) | (enc2 >> 4); + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); + chr3 = ((enc3 & 3) << 6) | enc4; + output = output + String.fromCharCode(chr1); + if (enc3 != 64) { + output = output + String.fromCharCode(chr2); + } + if (enc4 != 64) { + output = output + String.fromCharCode(chr3); + } + } + output = _utf8_decode(output); + return output; + } + // private method for UTF-8 encoding + _utf8_encode = function (string) { + string = string.replace(/\r\n/g, "\n"); + var utftext = ""; + for (var n = 0; n < string.length; n++) { + var c = string.charCodeAt(n); + if (c < 128) { + utftext += String.fromCharCode(c); + } else if ((c > 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + + } + return utftext; + } + // private method for UTF-8 decoding + _utf8_decode = function (utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + while (i < utftext.length) { + c = utftext.charCodeAt(i); + if (c < 128) { + string += String.fromCharCode(c); + i++; + } else if ((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i + 1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } else { + c2 = utftext.charCodeAt(i + 1); + c3 = utftext.charCodeAt(i + 2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + } + return string; + } +} From a90756758ee9328928fbc45d7944bbe51288c517 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 7 Mar 2020 11:36:09 +0800 Subject: [PATCH 0215/1191] Update tb_test.js --- tb_test.js | 1 - 1 file changed, 1 deletion(-) diff --git a/tb_test.js b/tb_test.js index 8876d90e3..f3c9e1631 100644 --- a/tb_test.js +++ b/tb_test.js @@ -284,7 +284,6 @@ function customTradeConsumerProtection() { } function Qs2Json(url) { - url = url == null ? window.location.href : url; var search = url.substring(url.lastIndexOf("?") + 1); var obj = {}; var reg = /([^?&=]+)=([^?&=]*)/g; From 328337495f77b1bb916556ca5a7f7e5bc100f5db Mon Sep 17 00:00:00 2001 From: goose Date: Sat, 7 Mar 2020 20:15:54 +0800 Subject: [PATCH 0216/1191] optimize --- eval_script.js | 82 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 64 insertions(+), 18 deletions(-) diff --git a/eval_script.js b/eval_script.js index 88359fb90..4cacefdcd 100644 --- a/eval_script.js +++ b/eval_script.js @@ -31,12 +31,15 @@ const __conf = String.raw` [eval_remote] // custom remote... + https://raw.githubusercontent.com/yichahucha/surge/master/sub_eval.conf [eval_local] // custom local... +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js + ` @@ -155,7 +158,7 @@ if (__isTask) { }) .catch((error) => { console.log(error) - __tool.notify("eval_script.js", "", error) + __tool.notify("[eval_script.js]", "", error) $done() }) } @@ -171,15 +174,15 @@ if (!__isTask) { const key = keys[i] const value = __confObj[key] for (let j = value.length; j--;) { - const url = value[j] + const match = value[j] try { - if (__url.match(url)) { - script = { url: key, content: __tool.read(key), match: url } + if (__url.match(match.regular)) { + script = { url: key, match, content: __tool.read(key) } break } } catch (error) { - __tool.notify("", "", `Regular Error: ${url}\nRequest URL: ${__url}`) - console.log(`${error}\nRegular Error: ${url}\nRequest URL: ${__url}`) + if (__debug) __tool.notify("[eval_script.js]", "", `Error regular : ${match.regular}\nRequest: ${__url}`) + if (__log) console.log(`${error}\nError regular : ${match.regular}\nRequest: ${__url}`) } } } @@ -188,15 +191,35 @@ if (!__isTask) { if (__script) { if (__script.content) { - eval(__script.content) - if (__log) console.log(`Request URL: ${__url}\nMatch URL: ${__script.match}\nExecute script: ${__script.url}`) + try { + const type = __script.match.type + if (type && type.length > 0) { + if (__tool.scriptType == type) { + if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}==${type}`, `Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) + if (__log) console.log(`Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) + eval(__script.content) + } else { + $done({}) + if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}!=${type}`, `Script types do not match! Don't execute script.\nScript: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) + if (__log) console.log(`Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) + } + } else { + if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType} ${"request&&response"}`, `Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) + if (__log) console.log(`Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) + eval(__script.content) + } + } catch (error) { + $done({}) + if (__debug) __tool.notify("[eval_script.js]", `${__tool.scriptType} ${__tool.method}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match}\nRequest: ${__url}`) + if (__log) console.log(`Script execute error : ${error}\nScript: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) + } } else { $done({}) - if (__log) console.log(`Request URL: ${__url}\nMatch URL: ${__script.match}\nScript not executed. Script not found: ${__script.url}`) + if (__log) console.log(`Script not found: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } } else { $done({}) - if (__log) console.log(`No match URL: ${__url}`) + if (__log) console.log(`Script not matched: ${__url}`) } } @@ -334,13 +357,21 @@ function ____parseConf(lines) { } function ____parseMatch(match) { - let matchs = match.split(" ") - if (matchs.length > 0) { - let i = matchs.length; - while (i--) { - if (matchs[i].length == 0) { - matchs.splice(i, 1) - } + let matchs = [] + const typeRegex = /(request|response)\s+\S+/g + const typeItems = match.match(typeRegex) + if (typeItems && typeItems.length > 0) { + match = match.replace(typeRegex, "") + } + const normalItems = match.match(/\S+/g) + const items = (typeItems ? typeItems : []).concat(normalItems ? normalItems : []) + for (let i = 0, len = items.length; i < len; i++) { + let item = items[i] + item = item.match(/\S+/g) + if (item.length > 1) { + matchs.push({ type: item[0], regular: item[1] }) + } else { + matchs.push({ type: "", regular: item[0] }) } } return matchs @@ -358,10 +389,25 @@ function ____Tool() { _isSurge = typeof $httpClient != "undefined" _isQuanX = typeof $task != "undefined" _isTask = typeof $request == "undefined" + _isResponse = typeof $response != "undefined" + _isRequestBody = typeof $request != "undefined" && typeof $request.body != "undefined" this.isSurge = _isSurge this.isQuanX = _isQuanX this.isTask = _isTask - this.isResponse = typeof $response != "undefined" + this.isResponse = _isResponse + this.isRequestBody = _isRequestBody + this.method = (() => { + if (!_isTask && (_isSurge || _isQuanX)) { + return $request.method + } + })() + this.scriptType = (() => { + if (_isResponse) { + return "response" + } else { + return "request" + } + })() this.notify = (title, subtitle, message) => { if (_isQuanX) $notify(title, subtitle, message) if (_isSurge) $notification.post(title, subtitle, message) From 7214ee220bf82610338de57ed8bdfe218a188b28 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 7 Mar 2020 21:08:17 +0800 Subject: [PATCH 0217/1191] Update sub_eval.conf --- sub_eval.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sub_eval.conf b/sub_eval.conf index e17d5fd6c..789c845af 100644 --- a/sub_eval.conf +++ b/sub_eval.conf @@ -1,9 +1,9 @@ //tb -####^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +####response ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js //nf ####^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D eval https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js //wb -####^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js -####^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +####response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +####response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js From e1dddf6ec63cc093aaccb58a9187da5aa07226c6 Mon Sep 17 00:00:00 2001 From: goose Date: Sat, 7 Mar 2020 21:27:32 +0800 Subject: [PATCH 0218/1191] fix --- eval_script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index 4cacefdcd..834e183f6 100644 --- a/eval_script.js +++ b/eval_script.js @@ -38,7 +38,7 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_eval.conf [eval_local] // custom local... -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js ` From 18153e882ac38456127cf5240f52fa5cf068db1c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 8 Mar 2020 11:45:52 +0800 Subject: [PATCH 0219/1191] Update README.md --- README.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/README.md b/README.md index aaed415d9..54f705dff 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,7 @@ Display taobao historical price ``` # 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 大概率会失效 [Script] -http-request ^https?://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-response ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com @@ -87,11 +86,7 @@ Display taobao historical price ``` # 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 大概率会失效 [rewrite_local] -# 1.0.5(商店版) ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body tb_price.js -# 1.0.6(TF版) -^https?://.+/amdc/mobileDispatch url script-request-body tb_price.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js [mitm] hostname = trade-acs.m.taobao.com,amdc.m.taobao.com From 010d09acfd652e4853bbcba68a3f7d2cb3765066 Mon Sep 17 00:00:00 2001 From: goose Date: Sun, 8 Mar 2020 17:13:15 +0800 Subject: [PATCH 0220/1191] optimize --- eval_script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eval_script.js b/eval_script.js index 834e183f6..e0fc90330 100644 --- a/eval_script.js +++ b/eval_script.js @@ -195,22 +195,22 @@ if (!__isTask) { const type = __script.match.type if (type && type.length > 0) { if (__tool.scriptType == type) { + eval(__script.content) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}==${type}`, `Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) if (__log) console.log(`Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) - eval(__script.content) } else { $done({}) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}!=${type}`, `Script types do not match! Don't execute script.\nScript: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) if (__log) console.log(`Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } } else { + eval(__script.content) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType} ${"request&&response"}`, `Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) if (__log) console.log(`Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) - eval(__script.content) } } catch (error) { $done({}) - if (__debug) __tool.notify("[eval_script.js]", `${__tool.scriptType} ${__tool.method}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match}\nRequest: ${__url}`) + if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match}\nRequest: ${__url}`) if (__log) console.log(`Script execute error : ${error}\nScript: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } } else { From c00587cd51fb27244c2a1427c83f2080bdb1e097 Mon Sep 17 00:00:00 2001 From: goose Date: Sun, 8 Mar 2020 18:19:38 +0800 Subject: [PATCH 0221/1191] optimize --- tb_price.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tb_price.js b/tb_price.js index eb66e7587..82204b50b 100644 --- a/tb_price.js +++ b/tb_price.js @@ -76,8 +76,8 @@ if (url.indexOf(path2) != -1) { } else { let vertical = value.vertical if (vertical && vertical.hasOwnProperty("tmallhkDirectSale")) { - value["tradeConsumerProtection"] = customTradeConsumerProtection() - value.tradeConsumerProtection = setTradeConsumerProtection(data, value.tradeConsumerProtection) + $done({ body }) + sendNotify(data, shareUrl) } else { consumerProtection = setConsumerProtection(data, consumerProtection) } From 4fd21dedb7f5cbc5da717ddc65c1ed86d73118a6 Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 9 Mar 2020 12:10:43 +0800 Subject: [PATCH 0222/1191] add development mode --- eval_script.js | 95 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 70 insertions(+), 25 deletions(-) diff --git a/eval_script.js b/eval_script.js index e0fc90330..7930cc250 100644 --- a/eval_script.js +++ b/eval_script.js @@ -26,6 +26,7 @@ * hostname = api.m.jd.com */ + const __conf = String.raw` @@ -52,9 +53,10 @@ const __showLine = 20 const __tool = new ____Tool() const __isTask = __tool.isTask +const __concurrencyLimit = 5 const __log = false const __debug = false -const __concurrencyLimit = 5 +const __developmentMode = true if (__isTask) { const ____getConf = (() => { @@ -119,13 +121,23 @@ if (__isTask) { console.log("Start updating script...") __tool.notify("", "", `Start updating ${scriptUrls.length} scripts...`) ____concurrentQueueLimit(scriptUrls, __concurrencyLimit, (url) => { + const urlRegex = /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/ return new Promise((resolve) => { - ____downloadFile(url).then((data) => { - if (data.code == 200) { - __tool.write(data.body, data.url) + if (urlRegex.test(url)) { + ____downloadFile(url).then((data) => { + if (data.code == 200) { + __tool.write(data.body, data.url) + } + resolve(data) + }) + } else { + if (__developmentMode) { + __tool.write(url, url) + resolve({ body: url, url, message: `${__emoji}${url} function set success` }) + } else { + resolve({ body: "", url, message: `${__emoji}${url} The script url is not available!` }) } - resolve(data) - }) + } }) }) .then(result => { @@ -165,7 +177,13 @@ if (__isTask) { if (!__isTask) { const __url = $request.url - const __confObj = JSON.parse(__tool.read("ScriptConfObjKey")) + const __confObj = (() => { + if (__developmentMode) { + return ____parseDevelopmentModeConf(__conf) + } else { + return JSON.parse(__tool.read("ScriptConfObjKey")) + } + })() const __script = (() => { let script = null const keys = Object.keys(__confObj) @@ -175,14 +193,21 @@ if (!__isTask) { const value = __confObj[key] for (let j = value.length; j--;) { const match = value[j] - try { + if (__debug) { + try { + if (__url.match(match.regular)) { + script = { url: key, match, content: __tool.read(key) } + break + } + } catch (error) { + if (__debug) __tool.notify("[eval_script.js]", "", `Error regular : ${match.regular}\nRequest: ${__url}`) + if (__log) console.log(`${error}\nError regular : ${match.regular}\nRequest: ${__url}`) + } + } else { if (__url.match(match.regular)) { script = { url: key, match, content: __tool.read(key) } break } - } catch (error) { - if (__debug) __tool.notify("[eval_script.js]", "", `Error regular : ${match.regular}\nRequest: ${__url}`) - if (__log) console.log(`${error}\nError regular : ${match.regular}\nRequest: ${__url}`) } } } @@ -191,27 +216,41 @@ if (!__isTask) { if (__script) { if (__script.content) { - try { - const type = __script.match.type - if (type && type.length > 0) { - if (__tool.scriptType == type) { + const type = __script.match.type + if (type && type.length > 0) { + if (__tool.scriptType == type) { + if (__debug) { + try { + eval(__script.content) + if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}==${type}`, `Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) + if (__log) console.log(`Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) + } catch (error) { + $done({}) + if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match}\nRequest: ${__url}`) + if (__log) console.log(`Script execute error : ${error}\nScript: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) + } + } else { eval(__script.content) - if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}==${type}`, `Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) + } + } else { + $done({}) + if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}!=${type}`, `Script types do not match! Don't execute script.\nScript: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) + if (__log) console.log(`Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) + } + } else { + if (__debug) { + try { + eval(__script.content) + if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType} ${"request&&response"}`, `Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) if (__log) console.log(`Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) - } else { + } catch (error) { $done({}) - if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}!=${type}`, `Script types do not match! Don't execute script.\nScript: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) - if (__log) console.log(`Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) + if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match}\nRequest: ${__url}`) + if (__log) console.log(`Script execute error : ${error}\nScript: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } } else { eval(__script.content) - if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType} ${"request&&response"}`, `Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) - if (__log) console.log(`Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } - } catch (error) { - $done({}) - if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match}\nRequest: ${__url}`) - if (__log) console.log(`Script execute error : ${error}\nScript: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } } else { $done({}) @@ -223,6 +262,12 @@ if (!__isTask) { } } +function ____parseDevelopmentModeConf(conf) { + const localConf = ____removeGarbage(____extractConf(__conf, "eval_local")) + const result = ____parseConf(localConf) + return result.obj +} + function ____timeDiff(begin, end) { return Math.ceil((end.getTime() - begin.getTime()) / 1000) } From 0c39dfa6ebfe7f4640f958d9f76b6026415322d5 Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 9 Mar 2020 12:12:09 +0800 Subject: [PATCH 0223/1191] add development mode --- eval_script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index 7930cc250..5521cdbe6 100644 --- a/eval_script.js +++ b/eval_script.js @@ -56,7 +56,7 @@ const __isTask = __tool.isTask const __concurrencyLimit = 5 const __log = false const __debug = false -const __developmentMode = true +const __developmentMode = false if (__isTask) { const ____getConf = (() => { From 70a2ff979d5eca5fd7ddd4604b9fc87a75dc91f2 Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 9 Mar 2020 12:22:57 +0800 Subject: [PATCH 0224/1191] add evelopment mode --- eval_script.js | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/eval_script.js b/eval_script.js index 5521cdbe6..c1d88f658 100644 --- a/eval_script.js +++ b/eval_script.js @@ -1,44 +1,12 @@ -/** - * 脚本管理工具(QuanX 举例) - * - * 一.设置定时任务更新脚本,第一次运行需要手动执行一下更新脚本(Qanx 普通调试模式容易更新失败,使用最新 TF 橙色按钮调试),例如设置每天凌晨更新脚本: - * [task_local] - * 0 0 * * * eval_script.js - * - * 二.__conf 配置说明: - * - * 参考下面 __conf 示例 - * - * [远程配置] - * 参考示例:https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf - * - * [本地配置] - * jd 脚本举例 - * 1.添加配置,格式为:匹配脚本对应的正则1 匹配脚本对应的正则2 eval 远程脚本的链接 - * [local] - * ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - * - * 2.修改配置文件原脚本路径为 eval_script.js 的脚本路径 - * [rewrite_local] - * #^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js - * ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js - * [mitm] - * hostname = api.m.jd.com - */ - - const __conf = String.raw` - [eval_remote] // custom remote... - https://raw.githubusercontent.com/yichahucha/surge/master/sub_eval.conf [eval_local] // custom local... - response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js From 37539d48ebc75c2002f9dc52ef988c43d3810180 Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 9 Mar 2020 12:26:48 +0800 Subject: [PATCH 0225/1191] add evelopment mode --- eval_script.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/eval_script.js b/eval_script.js index c1d88f658..0cba288ee 100644 --- a/eval_script.js +++ b/eval_script.js @@ -169,7 +169,6 @@ if (!__isTask) { } } catch (error) { if (__debug) __tool.notify("[eval_script.js]", "", `Error regular : ${match.regular}\nRequest: ${__url}`) - if (__log) console.log(`${error}\nError regular : ${match.regular}\nRequest: ${__url}`) } } else { if (__url.match(match.regular)) { @@ -191,11 +190,9 @@ if (!__isTask) { try { eval(__script.content) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}==${type}`, `Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) - if (__log) console.log(`Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } catch (error) { $done({}) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match}\nRequest: ${__url}`) - if (__log) console.log(`Script execute error : ${error}\nScript: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } } else { eval(__script.content) @@ -203,18 +200,15 @@ if (!__isTask) { } else { $done({}) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}!=${type}`, `Script types do not match! Don't execute script.\nScript: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) - if (__log) console.log(`Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } } else { if (__debug) { try { eval(__script.content) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType} ${"request&&response"}`, `Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) - if (__log) console.log(`Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } catch (error) { $done({}) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match}\nRequest: ${__url}`) - if (__log) console.log(`Script execute error : ${error}\nScript: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } } else { eval(__script.content) From 6d6ce23cb8ac16ac08d0525945c3455ba446ebc6 Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 9 Mar 2020 14:26:35 +0800 Subject: [PATCH 0226/1191] add evelopment mode --- eval_script.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/eval_script.js b/eval_script.js index 0cba288ee..a460322cc 100644 --- a/eval_script.js +++ b/eval_script.js @@ -133,13 +133,13 @@ if (__isTask) { console.log(`${summary}\n${resultInfo.message}\n${lastDate ? lastDate : nowDate}`) __tool.notify(`${__emojiDone}Update Done`, summary, `${detail}\n${__emoji}${lastDate ? lastDate : nowDate}`) __tool.write(nowDate, "ScriptLastUpdateDateKey") - $done() + __tool.done({}) }) }) .catch((error) => { - console.log(error) + __tool.done({}) __tool.notify("[eval_script.js]", "", error) - $done() + console.log(error) }) } @@ -191,14 +191,14 @@ if (!__isTask) { eval(__script.content) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}==${type}`, `Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } catch (error) { - $done({}) + __tool.done({}) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match}\nRequest: ${__url}`) } } else { eval(__script.content) } } else { - $done({}) + __tool.done({}) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}!=${type}`, `Script types do not match! Don't execute script.\nScript: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } } else { @@ -207,7 +207,7 @@ if (!__isTask) { eval(__script.content) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType} ${"request&&response"}`, `Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } catch (error) { - $done({}) + __tool.done({}) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match}\nRequest: ${__url}`) } } else { @@ -215,11 +215,11 @@ if (!__isTask) { } } } else { - $done({}) + __tool.done({}) if (__log) console.log(`Script not found: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } } else { - $done({}) + __tool.done({}) if (__log) console.log(`Script not matched: ${__url}`) } } @@ -415,6 +415,11 @@ function ____Tool() { return "request" } })() + this.done = (obj) => { + if (_isQuanX) $done(obj) + if (_isSurge) $done(obj) + if (_node) console.log("Script Done."); + } this.notify = (title, subtitle, message) => { if (_isQuanX) $notify(title, subtitle, message) if (_isSurge) $notification.post(title, subtitle, message) From d208eba79d7f5cf50575ba3106fa489628cb51ea Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 9 Mar 2020 14:54:37 +0800 Subject: [PATCH 0227/1191] fix --- eval_script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index a460322cc..ab8684b67 100644 --- a/eval_script.js +++ b/eval_script.js @@ -89,7 +89,7 @@ if (__isTask) { console.log("Start updating script...") __tool.notify("", "", `Start updating ${scriptUrls.length} scripts...`) ____concurrentQueueLimit(scriptUrls, __concurrencyLimit, (url) => { - const urlRegex = /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/ + const urlRegex = /^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/ return new Promise((resolve) => { if (urlRegex.test(url)) { ____downloadFile(url).then((data) => { From 980bb792e5a9c4c3b2997a4e82dce1db6cc5a7fa Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 9 Mar 2020 15:47:57 +0800 Subject: [PATCH 0228/1191] fix --- tb_price.js | 1 - tb_price_lite.js | 1 - tb_test.js | 495 ----------------------------------------------- 3 files changed, 497 deletions(-) delete mode 100644 tb_test.js diff --git a/tb_price.js b/tb_price.js index 82204b50b..d1924a7b7 100644 --- a/tb_price.js +++ b/tb_price.js @@ -304,7 +304,6 @@ function customTradeConsumerProtection() { } function Qs2Json(url) { - url = url == null ? window.location.href : url; var search = url.substring(url.lastIndexOf("?") + 1); var obj = {}; var reg = /([^?&=]+)=([^?&=]*)/g; diff --git a/tb_price_lite.js b/tb_price_lite.js index 6ffc8b49d..b6edc5e49 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -183,7 +183,6 @@ function dateFormat(cellval) { } function Qs2Json(url) { - url = url == null ? window.location.href : url; var search = url.substring(url.lastIndexOf("?") + 1); var obj = {}; var reg = /([^?&=]+)=([^?&=]*)/g; diff --git a/tb_test.js b/tb_test.js deleted file mode 100644 index f3c9e1631..000000000 --- a/tb_test.js +++ /dev/null @@ -1,495 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const $tool = new Tool() -const path1 = "/amdc/mobileDispatch" -const path2 = "/gw/mtop.taobao.detail.getdetail" -const consoleLog = false -const url = $request.url - -if (url.indexOf(path1) != -1) { - let body = $request.body - let json = Qs2Json(body) - let domain = json.domain.split(" ") - let i = domain.length; - while (i--) { - const block = "trade-acs.m.taobao.com" - const element = domain[i]; - if (element == block) { - domain.splice(i, 1); - } - } - json.domain = domain.join(" ") - body = Json2Qs(json) - $done({ body }) -} - -if (url.indexOf(path2) != -1) { - const body = $response.body - let obj = JSON.parse(body) - let item = obj.data.item - let shareUrl = `https://item.taobao.com/item.htm?id=${item.itemId}` - requestPrice(shareUrl, function (data) { - if (data) { - if (obj.data.apiStack) { - let apiStack = obj.data.apiStack[0] - let value = JSON.parse(apiStack.value) - let tradeConsumerProtection = null - let consumerProtection = null - let trade = null - if (value.global) { - tradeConsumerProtection = value.global.data.tradeConsumerProtection - consumerProtection = value.global.data.consumerProtection - trade = value.global.data.trade - } else { - tradeConsumerProtection = value.tradeConsumerProtection - consumerProtection = value.consumerProtection - trade = value.trade - } - if (trade && trade.useWap == "true") { - $done({ body }) - sendNotify(data, shareUrl) - } else { - if (tradeConsumerProtection) { - tradeConsumerProtection = setTradeConsumerProtection(data, tradeConsumerProtection) - } else { - let vertical = value.vertical - if (vertical && vertical.hasOwnProperty("tmallhkDirectSale")) { - value["tradeConsumerProtection"] = customTradeConsumerProtection() - value.tradeConsumerProtection = setTradeConsumerProtection(data, value.tradeConsumerProtection) - } else { - consumerProtection = setConsumerProtection(data, consumerProtection) - } - } - apiStack.value = JSON.stringify(value) - $done({ body: JSON.stringify(obj) }) - } - } else { - $done({ body }) - sendNotify(data, shareUrl) - } - } else { - $done({ body }) - } - }) -} - -function sendNotify(data, shareUrl) { - if (data.ok == 1 && data.single) { - const lower = lowerMsgs(data.single)[0] - const detail = priceSummary(data)[1] - const tip = data.PriceRemark.Tip + "(仅供参考)" - $tool.notify("", "", `〽️历史${lower} ${tip}\n${detail}\n\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) - } - if (data.ok == 0 && data.msg.length > 0) { - $tool.notify("", "", `⚠️ ${data.msg}`) - } -} - -function setConsumerProtection(data, consumerProtection) { - let basicService = consumerProtection.serviceProtection.basicService - let items = consumerProtection.items - if (data.ok == 1 && data.single) { - const lower = lowerMsgs(data.single) - const tip = data.PriceRemark.Tip - const summary = priceSummary(data)[1] - const item = customItem(lower[1], [`${lower[0]} ${tip}(仅供参考)\n${summary}`]) - basicService.services.unshift(item) - items.unshift(item) - } - if (data.ok == 0 && data.msg.length > 0) { - let item = customItem("暂无历史价格", [data.msg]) - basicService.services.unshift(item) - items.unshift(item) - } - return consumerProtection -} - -function setTradeConsumerProtection(data, tradeConsumerProtection) { - let service = tradeConsumerProtection.tradeConsumerService.service - if (data.ok == 1 && data.single) { - const lower = lowerMsgs(data.single) - const tip = data.PriceRemark.Tip - const tbitems = priceSummary(data)[0] - const item = customItem(lower[1], `${lower[0]} ${tip}(仅供参考)`) - let nonService = tradeConsumerProtection.tradeConsumerService.nonService - service.items = service.items.concat(nonService.items) - nonService.title = "价格详情" - nonService.items = tbitems - service.items.unshift(item) - } - if (data.ok == 0 && data.msg.length > 0) { - service.items.unshift(customItem("暂无历史价格", data.msg)) - } - return tradeConsumerProtection -} - -function lowerMsgs(data) { - const lower = data.lowerPriceyh - const lowerDate = dateFormat(data.lowerDateyh) - const lowerMsg = "最低到手价:¥" + String(lower) + `(${lowerDate})` - const lowerMsg1 = "历史最低¥" + String(lower) - return [lowerMsg, lowerMsg1] -} - -function priceSummary(data) { - let tbitems = [] - let summary = "" - let listPriceDetail = data.PriceRemark.ListPriceDetail - listPriceDetail.pop() - let list = listPriceDetail.concat(historySummary(data.single)) - list.forEach((item, index) => { - if (index == 2) { - item.Name = "双十一价格" - } else if (index == 3) { - item.Name = "六一八价格" - } else if (index == 4) { - item.Name = "三十天最低" - } - summary += `\n${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` - let summaryItem = `${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` - tbitems.push(customItem(summaryItem)) - }) - return [tbitems, summary] -} - -function historySummary(single) { - const rexMatch = /\[.*?\]/g; - const rexExec = /\[(.*),(.*),"(.*)"\]/; - let currentPrice, lowest60, lowest180, lowest360 - let list = single.jiagequshiyh.match(rexMatch); - list = list.reverse().slice(0, 360); - list.forEach((item, index) => { - if (item.length > 0) { - const result = rexExec.exec(item); - const dateUTC = new Date(eval(result[1])); - const date = dateUTC.format("yyyy-MM-dd"); - let price = parseFloat(result[2]); - if (index == 0) { - currentPrice = price - lowest60 = { Name: "六十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } - lowest180 = { Name: "一百八最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } - lowest360 = { Name: "三百六最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } - } - if (index < 60 && price <= lowest60.price) { - lowest60.price = price - lowest60.Price = `¥${String(price)}` - lowest60.Date = date - lowest60.Difference = difference(currentPrice, price) - } - if (index < 180 && price <= lowest180.price) { - lowest180.price = price - lowest180.Price = `¥${String(price)}` - lowest180.Date = date - lowest180.Difference = difference(currentPrice, price) - } - if (index < 360 && price <= lowest360.price) { - lowest360.price = price - lowest360.Price = `¥${String(price)}` - lowest360.Date = date - lowest360.Difference = difference(currentPrice, price) - } - } - }); - return [lowest60, lowest180, lowest360]; -} - -function difference(currentPrice, price) { - let difference = sub(currentPrice, price) - if (difference == 0) { - return "-" - } else { - return `${difference > 0 ? "↑" : "↓"}${String(difference)}` - } -} - -function sub(arg1, arg2) { - return add(arg1, -Number(arg2), arguments[2]); -} - -function add(arg1, arg2) { - arg1 = arg1.toString(), arg2 = arg2.toString(); - var arg1Arr = arg1.split("."), arg2Arr = arg2.split("."), d1 = arg1Arr.length == 2 ? arg1Arr[1] : "", d2 = arg2Arr.length == 2 ? arg2Arr[1] : ""; - var maxLen = Math.max(d1.length, d2.length); - var m = Math.pow(10, maxLen); - var result = Number(((arg1 * m + arg2 * m) / m).toFixed(maxLen)); - var d = arguments[2]; - return typeof d === "number" ? Number((result).toFixed(d)) : result; -} - -function requestPrice(share_url, callback) { - const options = { - url: "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", - headers: { - "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", - "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" - }, - body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent(share_url) - } - $tool.post(options, function (error, response, data) { - if (!error) { - callback(JSON.parse(data)); - if (consoleLog) console.log("Data:\n" + data); - } else { - callback(null, null); - if (consoleLog) console.log("Error:\n" + error); - } - }) -} - -function dateFormat(cellval) { - const date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10)); - const month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; - const currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); - return date.getFullYear() + "-" + month + "-" + currentDate; -} - -function getSpace(length) { - let blank = ""; - for (let index = 0; index < length; index++) { - blank += " "; - } - return blank; -} - -function customItem(title, desc) { - return { - icon: "https://s2.ax1x.com/2020/02/16/3STeIJ.png", - title: title, - name: title, - desc: desc - } -} - -function customTradeConsumerProtection() { - return { - "tradeConsumerService": { - "service": { - "items": [ - ], - "icon": "", - "title": "基础服务" - }, - "nonService": { - "items": [ - ], - "title": "其他" - } - }, - "passValue": "all", - "url": "https://h5.m.taobao.com/app/detailsubpage/consumer/index.js", - "type": "0" - } -} - -function Qs2Json(url) { - var search = url.substring(url.lastIndexOf("?") + 1); - var obj = {}; - var reg = /([^?&=]+)=([^?&=]*)/g; - search.replace(reg, function (rs, $1, $2) { - var name = decodeURIComponent($1); - var val = decodeURIComponent($2); - val = String(val); - obj[name] = val; - return rs; - }); - return obj; -} - -function Json2Qs(json) { - var temp = []; - for (var k in json) { - temp.push(k + "=" + json[k]); - } - return temp.join("&"); -} - -Array.prototype.insert = function (index, item) { - this.splice(index, 0, item); -}; - -Date.prototype.format = function (fmt) { - var o = { - "y+": this.getFullYear(), - "M+": this.getMonth() + 1, - "d+": this.getDate(), - "h+": this.getHours(), - "m+": this.getMinutes(), - "s+": this.getSeconds(), - "q+": Math.floor((this.getMonth() + 3) / 3), - "S+": this.getMilliseconds() - }; - for (var k in o) { - if (new RegExp("(" + k + ")").test(fmt)) { - if (k == "y+") { - fmt = fmt.replace(RegExp.$1, ("" + o[k]).substr(4 - RegExp.$1.length)); - } - else if (k == "S+") { - var lens = RegExp.$1.length; - lens = lens == 1 ? 3 : lens; - fmt = fmt.replace(RegExp.$1, ("00" + o[k]).substr(("" + o[k]).length - 1, lens)); - } - else { - fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); - } - } - } - return fmt; -} - -function Tool() { - _node = (() => { - if (typeof require == "function") { - const request = require('request') - return ({ request }) - } else { - return (null) - } - })() - _isSurge = typeof $httpClient != "undefined" - _isQuanX = typeof $task != "undefined" - this.isSurge = _isSurge - this.isQuanX = _isQuanX - this.isResponse = typeof $response != "undefined" - this.notify = (title, subtitle, message) => { - if (_isQuanX) $notify(title, subtitle, message) - if (_isSurge) $notification.post(title, subtitle, message) - if (_node) console.log(JSON.stringify({ title, subtitle, message })); - } - this.write = (value, key) => { - if (_isQuanX) return $prefs.setValueForKey(value, key) - if (_isSurge) return $persistentStore.write(value, key) - } - this.read = (key) => { - if (_isQuanX) return $prefs.valueForKey(key) - if (_isSurge) return $persistentStore.read(key) - } - this.get = (options, callback) => { - if (_isQuanX) { - if (typeof options == "string") options = { url: options } - options["method"] = "GET" - $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) - } - if (_isSurge) $httpClient.get(options, (error, response, body) => { callback(error, _status(response), body) }) - if (_node) _node.request(options, (error, response, body) => { callback(error, _status(response), body) }) - } - this.post = (options, callback) => { - if (_isQuanX) { - if (typeof options == "string") options = { url: options } - options["method"] = "POST" - $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) - } - if (_isSurge) $httpClient.post(options, (error, response, body) => { callback(error, _status(response), body) }) - if (_node) _node.request.post(options, (error, response, body) => { callback(error, _status(response), body) }) - } - _status = (response) => { - if (response) { - if (response.status) { - response["statusCode"] = response.status - } else if (response.statusCode) { - response["status"] = response.statusCode - } - } - return response - } -} - -function Base64() { - // private property - _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - // public method for encoding - this.encode = function (input) { - var output = ""; - var chr1, chr2, chr3, enc1, enc2, enc3, enc4; - var i = 0; - input = _utf8_encode(input); - while (i < input.length) { - chr1 = input.charCodeAt(i++); - chr2 = input.charCodeAt(i++); - chr3 = input.charCodeAt(i++); - enc1 = chr1 >> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - if (isNaN(chr2)) { - enc3 = enc4 = 64; - } else if (isNaN(chr3)) { - enc4 = 64; - } - output = output + - _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + - _keyStr.charAt(enc3) + _keyStr.charAt(enc4); - } - return output; - } - // public method for decoding - this.decode = function (input) { - var output = ""; - var chr1, chr2, chr3; - var enc1, enc2, enc3, enc4; - var i = 0; - input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - while (i < input.length) { - enc1 = _keyStr.indexOf(input.charAt(i++)); - enc2 = _keyStr.indexOf(input.charAt(i++)); - enc3 = _keyStr.indexOf(input.charAt(i++)); - enc4 = _keyStr.indexOf(input.charAt(i++)); - chr1 = (enc1 << 2) | (enc2 >> 4); - chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); - chr3 = ((enc3 & 3) << 6) | enc4; - output = output + String.fromCharCode(chr1); - if (enc3 != 64) { - output = output + String.fromCharCode(chr2); - } - if (enc4 != 64) { - output = output + String.fromCharCode(chr3); - } - } - output = _utf8_decode(output); - return output; - } - // private method for UTF-8 encoding - _utf8_encode = function (string) { - string = string.replace(/\r\n/g, "\n"); - var utftext = ""; - for (var n = 0; n < string.length; n++) { - var c = string.charCodeAt(n); - if (c < 128) { - utftext += String.fromCharCode(c); - } else if ((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } - - } - return utftext; - } - // private method for UTF-8 decoding - _utf8_decode = function (utftext) { - var string = ""; - var i = 0; - var c = c1 = c2 = 0; - while (i < utftext.length) { - c = utftext.charCodeAt(i); - if (c < 128) { - string += String.fromCharCode(c); - i++; - } else if ((c > 191) && (c < 224)) { - c2 = utftext.charCodeAt(i + 1); - string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); - i += 2; - } else { - c2 = utftext.charCodeAt(i + 1); - c3 = utftext.charCodeAt(i + 2); - string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); - i += 3; - } - } - return string; - } -} From a8a275a18d95ea2b3a4dfe98d3fdb05b88590cac Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 9 Mar 2020 15:49:42 +0800 Subject: [PATCH 0229/1191] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 54f705dff..423ac5885 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,12 @@ DingDing clock in cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/surge/master/clock_in.js ``` +Script management tool +``` +[Script] +cron "0 0 * * *" eval_script.js +``` + # Quan-X Remove weibo ads From ba29a59fe730900c96035bb40544f6a26fe9a726 Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 9 Mar 2020 21:56:04 +0800 Subject: [PATCH 0230/1191] optimize --- eval_script.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_script.js b/eval_script.js index ab8684b67..07d527f32 100644 --- a/eval_script.js +++ b/eval_script.js @@ -29,8 +29,8 @@ const __developmentMode = false if (__isTask) { const ____getConf = (() => { return new Promise((resolve) => { - const remoteConf = ____removeGarbage(____extractConf(__conf, "eval_remote")) - const localConf = ____removeGarbage(____extractConf(__conf, "eval_local")) + const remoteConf = ____removeAnnotation(____extractConf(__conf, "eval_remote")) + const localConf = ____removeAnnotation(____extractConf(__conf, "eval_local")) if (remoteConf.length > 0) { console.log("Start updating conf...") if (__debug) __tool.notify("", "", `Start updating ${remoteConf.length} confs...`) @@ -314,12 +314,12 @@ function ____parseRemoteConf(conf) { return newLines } -function ____removeGarbage(lines) { +function ____removeAnnotation(lines) { if (lines.length > 0) { let i = lines.length; while (i--) { - const line = lines[i] - if (line.length == 0 || line.substring(0, 2) == "//") { + const line = lines[i].replace(/^\s*/, "") + if (line.length == 0 || line.substring(0, 2) == "//" || line.substring(0, 1) == "#") { lines.splice(i, 1) } } @@ -330,8 +330,8 @@ function ____removeGarbage(lines) { function ____parseConf(lines) { let confObj = {} for (let i = 0, len = lines.length; i < len; i++) { - let line = lines[i].replace(/^\s*/, "") - if (line.length > 0 && line.substring(0, 2) != "//") { + const line = lines[i].replace(/^\s*/, "") + if (line.length > 0) { const urlRegex = /.+\s+url\s+.+/ const evalRegex = /.+\s+eval\s+.+/ const avaliable = (() => { From 61e50253950ee5ffa5eaeb392e690bc3af80c277 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 10 Mar 2020 11:09:26 +0800 Subject: [PATCH 0231/1191] Update tb_price.js --- tb_price.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tb_price.js b/tb_price.js index d1924a7b7..a26871770 100644 --- a/tb_price.js +++ b/tb_price.js @@ -58,14 +58,17 @@ if (url.indexOf(path2) != -1) { let tradeConsumerProtection = null let consumerProtection = null let trade = null + let vertical = null if (value.global) { tradeConsumerProtection = value.global.data.tradeConsumerProtection consumerProtection = value.global.data.consumerProtection trade = value.global.data.trade + vertical = value.global.data.vertical } else { tradeConsumerProtection = value.tradeConsumerProtection consumerProtection = value.consumerProtection trade = value.trade + vertical = value.vertical } if (trade && trade.useWap == "true") { $done({ body }) @@ -74,10 +77,9 @@ if (url.indexOf(path2) != -1) { if (tradeConsumerProtection) { tradeConsumerProtection = setTradeConsumerProtection(data, tradeConsumerProtection) } else { - let vertical = value.vertical if (vertical && vertical.hasOwnProperty("tmallhkDirectSale")) { - $done({ body }) - sendNotify(data, shareUrl) + value["tradeConsumerProtection"] = customTradeConsumerProtection() + value.tradeConsumerProtection = setTradeConsumerProtection(data, value.tradeConsumerProtection) } else { consumerProtection = setConsumerProtection(data, consumerProtection) } From 97ed4059919bb10cf0957b699f17d0b103b33fa6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 10 Mar 2020 11:15:35 +0800 Subject: [PATCH 0232/1191] Update tb_price.js --- tb_price.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/tb_price.js b/tb_price.js index a26871770..20fdc6357 100644 --- a/tb_price.js +++ b/tb_price.js @@ -73,27 +73,26 @@ if (url.indexOf(path2) != -1) { if (trade && trade.useWap == "true") { $done({ body }) sendNotify(data, shareUrl) + } else if (vertical && vertical.hasOwnProperty("tmallhkDirectSale")) { + value["tradeConsumerProtection"] = customTradeConsumerProtection() + value.tradeConsumerProtection = setTradeConsumerProtection(data, value.tradeConsumerProtection) } else { if (tradeConsumerProtection) { tradeConsumerProtection = setTradeConsumerProtection(data, tradeConsumerProtection) } else { - if (vertical && vertical.hasOwnProperty("tmallhkDirectSale")) { - value["tradeConsumerProtection"] = customTradeConsumerProtection() - value.tradeConsumerProtection = setTradeConsumerProtection(data, value.tradeConsumerProtection) - } else { - consumerProtection = setConsumerProtection(data, consumerProtection) - } + consumerProtection = setConsumerProtection(data, consumerProtection) } - apiStack.value = JSON.stringify(value) - $done({ body: JSON.stringify(obj) }) } - } else { - $done({ body }) - sendNotify(data, shareUrl) + apiStack.value = JSON.stringify(value) + $done({ body: JSON.stringify(obj) }) } } else { $done({ body }) + sendNotify(data, shareUrl) } + } else { + $done({ body }) + } }) } From 88d67dac48da8110407faeb135e4920f2168ca45 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 10 Mar 2020 11:20:56 +0800 Subject: [PATCH 0233/1191] Update tb_price.js From ecc0e161dd8fcc8d1571183440d24c4f272583a3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 10 Mar 2020 11:25:52 +0800 Subject: [PATCH 0234/1191] Update tb_price.js --- tb_price.js | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/tb_price.js b/tb_price.js index 20fdc6357..d1924a7b7 100644 --- a/tb_price.js +++ b/tb_price.js @@ -58,41 +58,40 @@ if (url.indexOf(path2) != -1) { let tradeConsumerProtection = null let consumerProtection = null let trade = null - let vertical = null if (value.global) { tradeConsumerProtection = value.global.data.tradeConsumerProtection consumerProtection = value.global.data.consumerProtection trade = value.global.data.trade - vertical = value.global.data.vertical } else { tradeConsumerProtection = value.tradeConsumerProtection consumerProtection = value.consumerProtection trade = value.trade - vertical = value.vertical } if (trade && trade.useWap == "true") { $done({ body }) sendNotify(data, shareUrl) - } else if (vertical && vertical.hasOwnProperty("tmallhkDirectSale")) { - value["tradeConsumerProtection"] = customTradeConsumerProtection() - value.tradeConsumerProtection = setTradeConsumerProtection(data, value.tradeConsumerProtection) } else { if (tradeConsumerProtection) { tradeConsumerProtection = setTradeConsumerProtection(data, tradeConsumerProtection) } else { - consumerProtection = setConsumerProtection(data, consumerProtection) + let vertical = value.vertical + if (vertical && vertical.hasOwnProperty("tmallhkDirectSale")) { + $done({ body }) + sendNotify(data, shareUrl) + } else { + consumerProtection = setConsumerProtection(data, consumerProtection) + } } + apiStack.value = JSON.stringify(value) + $done({ body: JSON.stringify(obj) }) } - apiStack.value = JSON.stringify(value) - $done({ body: JSON.stringify(obj) }) + } else { + $done({ body }) + sendNotify(data, shareUrl) } } else { $done({ body }) - sendNotify(data, shareUrl) } - } else { - $done({ body }) - } }) } From 8abe2390b8649e18877ebc324e230d5dc8fb130f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 10 Mar 2020 11:26:59 +0800 Subject: [PATCH 0235/1191] Update tb_price.js From 5cf87a5a4629611792215bcf4f9384e68a3ac10f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 10 Mar 2020 11:55:54 +0800 Subject: [PATCH 0236/1191] Update tb_price.js --- tb_price.js | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/tb_price.js b/tb_price.js index d1924a7b7..9a457d28b 100644 --- a/tb_price.js +++ b/tb_price.js @@ -58,29 +58,36 @@ if (url.indexOf(path2) != -1) { let tradeConsumerProtection = null let consumerProtection = null let trade = null + let vertical = null if (value.global) { tradeConsumerProtection = value.global.data.tradeConsumerProtection consumerProtection = value.global.data.consumerProtection trade = value.global.data.trade + vertical = value.global.data.vertical } else { tradeConsumerProtection = value.tradeConsumerProtection consumerProtection = value.consumerProtection trade = value.trade + vertical = value.vertical } if (trade && trade.useWap == "true") { $done({ body }) sendNotify(data, shareUrl) } else { - if (tradeConsumerProtection) { + if (vertical && vertical.hasOwnProperty("tmallhkDirectSale")) { + // if (value.global) { + // value.global.data["tradeConsumerProtection"] = customTradeConsumerProtection() + // value.global.data.tradeConsumerProtection = setTradeConsumerProtection(data, value.global.data.tradeConsumerProtection) + // } else { + // value["tradeConsumerProtection"] = customTradeConsumerProtection() + // value.tradeConsumerProtection = setTradeConsumerProtection(data, value.tradeConsumerProtection) + // } + $done({ body }) + sendNotify(data, shareUrl) + } else if (tradeConsumerProtection) { tradeConsumerProtection = setTradeConsumerProtection(data, tradeConsumerProtection) } else { - let vertical = value.vertical - if (vertical && vertical.hasOwnProperty("tmallhkDirectSale")) { - $done({ body }) - sendNotify(data, shareUrl) - } else { - consumerProtection = setConsumerProtection(data, consumerProtection) - } + consumerProtection = setConsumerProtection(data, consumerProtection) } apiStack.value = JSON.stringify(value) $done({ body: JSON.stringify(obj) }) From fdce9f8d00bf94a1692283876cf1f3d29ab5f3c1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 10 Mar 2020 15:08:23 +0800 Subject: [PATCH 0237/1191] Update eval_script.js --- eval_script.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/eval_script.js b/eval_script.js index 07d527f32..fe6198e03 100644 --- a/eval_script.js +++ b/eval_script.js @@ -99,12 +99,8 @@ if (__isTask) { resolve(data) }) } else { - if (__developmentMode) { - __tool.write(url, url) - resolve({ body: url, url, message: `${__emoji}${url} function set success` }) - } else { - resolve({ body: "", url, message: `${__emoji}${url} The script url is not available!` }) - } + __tool.write(url, url) + resolve({ body: url, url, message: `${__emoji}${url} function set success` }) } }) }) @@ -164,15 +160,16 @@ if (!__isTask) { if (__debug) { try { if (__url.match(match.regular)) { - script = { url: key, match, content: __tool.read(key) } + script = { url: key, match, content: __developmentMode ? key : __tool.read(key) } break } } catch (error) { if (__debug) __tool.notify("[eval_script.js]", "", `Error regular : ${match.regular}\nRequest: ${__url}`) + throw error } } else { if (__url.match(match.regular)) { - script = { url: key, match, content: __tool.read(key) } + script = { url: key, match, content: __developmentMode ? key : __tool.read(key) } break } } @@ -191,8 +188,8 @@ if (!__isTask) { eval(__script.content) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}==${type}`, `Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } catch (error) { - __tool.done({}) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match}\nRequest: ${__url}`) + throw error } } else { eval(__script.content) @@ -207,8 +204,8 @@ if (!__isTask) { eval(__script.content) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType} ${"request&&response"}`, `Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } catch (error) { - __tool.done({}) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match}\nRequest: ${__url}`) + throw error } } else { eval(__script.content) @@ -225,7 +222,7 @@ if (!__isTask) { } function ____parseDevelopmentModeConf(conf) { - const localConf = ____removeGarbage(____extractConf(__conf, "eval_local")) + const localConf = ____removeAnnotation(____extractConf(__conf, "eval_local")) const result = ____parseConf(localConf) return result.obj } From 6465458d0ce5c1602c43a8ef49e80ac033978ffa Mon Sep 17 00:00:00 2001 From: XZChen Date: Tue, 10 Mar 2020 16:02:10 +0800 Subject: [PATCH 0238/1191] Update wb_ad.js --- wb_ad.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wb_ad.js b/wb_ad.js index ace0861ec..9780bf2f4 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -20,6 +20,7 @@ const path15 = "/statuses/video_timeline"; const path16 = "/page"; const path17 = "/statuses/friends_timeline"; const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; const url = $request.url; var body = $response.body; @@ -112,6 +113,10 @@ if ( body = JSON.stringify(obj); } +if (url.indexOf(path19) != -1) { + delete body.expandable_view; +} + $done({ body }); function filter_timeline_statuses(statuses) { From fcf804220b0ad79dce38a5b96fea0d3d799fc836 Mon Sep 17 00:00:00 2001 From: XZChen Date: Tue, 10 Mar 2020 16:02:47 +0800 Subject: [PATCH 0239/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 423ac5885..80a399b84 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Remove weibo ads ``` [Script] http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js [MITM] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` From f527d1247c9290e7c1ddf06363376bf6602cc6b9 Mon Sep 17 00:00:00 2001 From: goose Date: Tue, 10 Mar 2020 22:10:07 +0800 Subject: [PATCH 0240/1191] optimize --- eval_script.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eval_script.js b/eval_script.js index fe6198e03..69262385f 100644 --- a/eval_script.js +++ b/eval_script.js @@ -2,11 +2,13 @@ const __conf = String.raw` [eval_remote] // custom remote... + https://raw.githubusercontent.com/yichahucha/surge/master/sub_eval.conf [eval_local] // custom local... + response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js From c85e5a482cfb211564bd4b598f6f47c99fec9ebe Mon Sep 17 00:00:00 2001 From: goose Date: Tue, 10 Mar 2020 22:10:50 +0800 Subject: [PATCH 0241/1191] optimize --- eval_script.js | 1 + 1 file changed, 1 insertion(+) diff --git a/eval_script.js b/eval_script.js index 69262385f..e8fabc4d1 100644 --- a/eval_script.js +++ b/eval_script.js @@ -1,5 +1,6 @@ const __conf = String.raw` + [eval_remote] // custom remote... From 29f1a63a99fa9db54f02bbe07703a4668613deea Mon Sep 17 00:00:00 2001 From: goose Date: Tue, 10 Mar 2020 23:34:57 +0800 Subject: [PATCH 0242/1191] fix --- README.md | 30 ++++++++++++++++++++++++++++++ eval_script.js | 9 ++++----- sub_script.conf | 2 +- 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 80a399b84..55f6a388f 100644 --- a/README.md +++ b/README.md @@ -110,8 +110,38 @@ DingDing clock in 0 9,18 * * 1-5 clock_in.js ``` + Script management tool + +简单使用示例 + +1.设置定时任务更新脚本,第一次需手动更新,确保脚本更新成功 + ``` [task_local] 0 0 * * * eval_script.js ``` + + +2.在 eval_script.js 中配置需要管理的脚本,可以配置远程和配置本地,提供一个远程示例 + +``` + +远程格式为: ####匹配正则 eval 脚本连接 +本地格式为: 匹配正则 eval 脚本连接 + +[eval_remote] +https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf + +[eval_local] +// custom local... + +``` + +3.添加复写订阅,更新复写订阅 + +``` +[rewrite_remote] +https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf, tag=eval, enabled=true +``` +4.以上都配置好,脚本生效 \ No newline at end of file diff --git a/eval_script.js b/eval_script.js index e8fabc4d1..64a67e2d5 100644 --- a/eval_script.js +++ b/eval_script.js @@ -4,20 +4,19 @@ const __conf = String.raw` [eval_remote] // custom remote... -https://raw.githubusercontent.com/yichahucha/surge/master/sub_eval.conf +https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf [eval_local] -// custom local... -response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +// custom local... ` const __emoji = "• " -const __emojiSuccess = "😁" -const __emojiFail = "😓" +const __emojiSuccess = "😋" +const __emojiFail = "🤪" const __emojiTasks = "🕐" const __emojiDone = "✔️" const __showLine = 20 diff --git a/sub_script.conf b/sub_script.conf index 06c20d377..6e9c22f45 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,7 +1,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com # eval_script.js 远程配置说明: -# 1.添加注释格式为:####匹配脚本对应的正则1 匹配脚本对应的正则2 eval 远程脚本的链接 +# 1.添加注释格式为:####匹配正则 eval 脚本链接 # 2.修改原脚本路径为 eval_script.js 的脚本路径 //jd From 7917144f477e8128a31476d1871925bbae6aea1b Mon Sep 17 00:00:00 2001 From: goose Date: Tue, 10 Mar 2020 23:47:21 +0800 Subject: [PATCH 0243/1191] fix --- eval_script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index 64a67e2d5..84fc8bbd5 100644 --- a/eval_script.js +++ b/eval_script.js @@ -206,7 +206,7 @@ if (!__isTask) { eval(__script.content) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType} ${"request&&response"}`, `Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } catch (error) { - if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match}\nRequest: ${__url}`) + if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) throw error } } else { From 1612df44ab0780b2c6c47bb568ca8fb63cddf331 Mon Sep 17 00:00:00 2001 From: tern Date: Tue, 10 Mar 2020 23:58:59 +0800 Subject: [PATCH 0244/1191] fix --- eval_script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eval_script.js b/eval_script.js index 84fc8bbd5..d82939f48 100644 --- a/eval_script.js +++ b/eval_script.js @@ -15,8 +15,8 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf ` const __emoji = "• " -const __emojiSuccess = "😋" -const __emojiFail = "🤪" +const __emojiSuccess = "😀" +const __emojiFail = "🙃" const __emojiTasks = "🕐" const __emojiDone = "✔️" const __showLine = 20 From d9f93108bb670f94382fb7f743ca8ee04db6e7fd Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 11 Mar 2020 12:52:57 +0800 Subject: [PATCH 0245/1191] Update README.md --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 55f6a388f..121099dde 100644 --- a/README.md +++ b/README.md @@ -32,11 +32,12 @@ hostname = api.m.jd.com Display taobao historical price ``` -# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 大概率会失效 +# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [Script] -http-response ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] -hostname = trade-acs.m.taobao.com,amdc.m.taobao.com +hostname = trade-acs.m.taobao.com # 以上还不生效或者频繁失效的可以添加以下规则,使用规则有可能误伤其他功能或者应用(一般不需要添加规则就能正常使用) # [Rule] @@ -90,11 +91,12 @@ hostname = api.m.jd.com Display taobao historical price ``` -# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 大概率会失效 +# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [rewrite_local] -^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body tb_price.js +^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body tb_price.js +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js [mitm] -hostname = trade-acs.m.taobao.com,amdc.m.taobao.com +hostname = trade-acs.m.taobao.com # 以上还不生效或者频繁失效的可以添加以下规则,使用规则有可能误伤其他功能或者应用(一般不需要添加规则就能正常使用) # [filter_local] @@ -144,4 +146,4 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf [rewrite_remote] https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf, tag=eval, enabled=true ``` -4.以上都配置好,脚本生效 \ No newline at end of file +4.以上都配置好,脚本生效 From f81156099c236fa437980a4704ad3715ed9fc9d7 Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 11 Mar 2020 12:57:48 +0800 Subject: [PATCH 0246/1191] fix --- eval_script.js | 1 - 1 file changed, 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index d82939f48..0b3acc192 100644 --- a/eval_script.js +++ b/eval_script.js @@ -8,7 +8,6 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf [eval_local] - // custom local... From dc886c623a57fee37e1a88fb97ca2c5016869d8c Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 11 Mar 2020 13:28:53 +0800 Subject: [PATCH 0247/1191] fix --- sub_eval.conf | 2 +- sub_script.conf | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sub_eval.conf b/sub_eval.conf index 789c845af..e1da88d74 100644 --- a/sub_eval.conf +++ b/sub_eval.conf @@ -1,5 +1,5 @@ //tb -####response ^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +####response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js //nf ####^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D eval https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js diff --git a/sub_script.conf b/sub_script.conf index 6e9c22f45..954532fc9 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,4 +1,4 @@ -hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com +hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com # eval_script.js 远程配置说明: # 1.添加注释格式为:####匹配正则 eval 脚本链接 @@ -9,8 +9,9 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js //tb -####^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail ^https?://amdc\.m\.taobao\.com/amdc/mobileDispatch eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js +####^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body eval_script.js +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js //nf ####^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D eval https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js From 00e97b29ef3043f732b1b531bd34f97a292aea2e Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 11 Mar 2020 14:35:28 +0800 Subject: [PATCH 0248/1191] update --- README.md | 4 ++-- sub_script.conf | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 121099dde..fd73a0a6d 100644 --- a/README.md +++ b/README.md @@ -129,8 +129,8 @@ Script management tool ``` -远程格式为: ####匹配正则 eval 脚本连接 -本地格式为: 匹配正则 eval 脚本连接 +远程格式为: ####脚本类型(request/response) 匹配正则 eval 脚本连接 +本地格式为: 脚本类型(request/response) 匹配正则 eval 脚本连接 [eval_remote] https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf diff --git a/sub_script.conf b/sub_script.conf index 954532fc9..114aa1d49 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,15 +1,15 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com # eval_script.js 远程配置说明: -# 1.添加注释格式为:####匹配正则 eval 脚本链接 +# 1.添加注释格式为:####脚本类型(request/response) 匹配正则 eval 脚本链接 # 2.修改原脚本路径为 eval_script.js 的脚本路径 //jd -####^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +####response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js //tb -####^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +####response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body eval_script.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js @@ -19,7 +19,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js //wb -####^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js -####^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +####response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +####response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js From 928b4b2f410746fe1619b57055a979059ce98842 Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 11 Mar 2020 14:36:49 +0800 Subject: [PATCH 0249/1191] update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fd73a0a6d..ebe46e6d2 100644 --- a/README.md +++ b/README.md @@ -146,4 +146,4 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf [rewrite_remote] https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf, tag=eval, enabled=true ``` -4.以上都配置好,脚本生效 +4.以上都配置好,示例脚本生效 From 8290d5b271452566b8e107dec5387b13b70fd8b9 Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 11 Mar 2020 14:39:50 +0800 Subject: [PATCH 0250/1191] update --- README.md | 2 +- sub_script.conf | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ebe46e6d2..84ab17128 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ Script management tool ``` -2.在 eval_script.js 中配置需要管理的脚本,可以配置远程和配置本地,提供一个远程示例 +2.在 eval_script.js 中配置需要管理的脚本,可以配置远程和配置本地,提供一个复写订阅适配 eval_script 的远程示例 ``` diff --git a/sub_script.conf b/sub_script.conf index 114aa1d49..16fe97085 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,9 +1,5 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com -# eval_script.js 远程配置说明: -# 1.添加注释格式为:####脚本类型(request/response) 匹配正则 eval 脚本链接 -# 2.修改原脚本路径为 eval_script.js 的脚本路径 - //jd ####response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js @@ -23,3 +19,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com ####response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js + +# eval_script.js 远程配置说明: +# 1.添加注释格式为:####脚本类型(request/response) 匹配正则 eval 脚本链接 +# 2.修改原脚本路径为 eval_script.js 的脚本路径 \ No newline at end of file From 9d14c09f2ed91aa0556b54e5d0e31fd54df0460e Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 11 Mar 2020 15:01:00 +0800 Subject: [PATCH 0251/1191] update --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 84ab17128..8c54818f5 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,6 @@ Display jd historical price # ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=(start|queryMaterialAdverts) - reject [Script] http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -# lite -# http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price_lite.js [MITM] hostname = api.m.jd.com ``` @@ -83,8 +81,6 @@ Display jd historical price ``` [rewrite_local] ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js -# lite -# ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price_lite.js [mitm] hostname = api.m.jd.com ``` From 17e934586ebf7267b0bef028023739820dd45a36 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 12 Mar 2020 16:08:25 +0800 Subject: [PATCH 0252/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8c54818f5..aa8ccc759 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ Script management tool 简单使用示例 -1.设置定时任务更新脚本,第一次需手动更新,确保脚本更新成功 +1.设置定时任务更新脚本,第一次需手动更新(使用橙色按钮),确保脚本更新成功 ``` [task_local] From 5c5e43d7d5162cec2e50ca0752e25976b3a48081 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 12 Mar 2020 16:09:34 +0800 Subject: [PATCH 0253/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aa8ccc759..9247b2fd1 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ DingDing clock in Script management tool -简单使用示例 +eval_script.js 简单使用示例 1.设置定时任务更新脚本,第一次需手动更新(使用橙色按钮),确保脚本更新成功 From ab8b0cceae1d2fabd9c9a870c8094fd7585873f9 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 12 Mar 2020 16:14:22 +0800 Subject: [PATCH 0254/1191] update --- README.md | 2 +- sub_eval.conf | 2 +- sub_script.conf | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9247b2fd1..320d1256c 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Remove weibo ads ``` [rewrite_local] ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) url script-response-body wb_ad.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) url script-response-body wb_ad.js [mitm] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` diff --git a/sub_eval.conf b/sub_eval.conf index e1da88d74..49acf4cb2 100644 --- a/sub_eval.conf +++ b/sub_eval.conf @@ -5,5 +5,5 @@ ####^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D eval https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js //wb -####response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +####response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js ####response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js diff --git a/sub_script.conf b/sub_script.conf index 16fe97085..6a94e39ae 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -15,10 +15,10 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js //wb -####response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js ####response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +####response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) url script-response-body eval_script.js # eval_script.js 远程配置说明: # 1.添加注释格式为:####脚本类型(request/response) 匹配正则 eval 脚本链接 From 4e1c0ae96222d15ad5417cf2213d4ff478b64a2c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 12 Mar 2020 16:31:56 +0800 Subject: [PATCH 0255/1191] Update README.md --- README.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 320d1256c..1a59b6083 100644 --- a/README.md +++ b/README.md @@ -110,21 +110,17 @@ DingDing clock in Script management tool - -eval_script.js 简单使用示例 +``` +简单使用示例 1.设置定时任务更新脚本,第一次需手动更新(使用橙色按钮),确保脚本更新成功 -``` [task_local] 0 0 * * * eval_script.js -``` 2.在 eval_script.js 中配置需要管理的脚本,可以配置远程和配置本地,提供一个复写订阅适配 eval_script 的远程示例 -``` - 远程格式为: ####脚本类型(request/response) 匹配正则 eval 脚本连接 本地格式为: 脚本类型(request/response) 匹配正则 eval 脚本连接 @@ -134,12 +130,13 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf [eval_local] // custom local... -``` 3.添加复写订阅,更新复写订阅 -``` [rewrite_remote] https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf, tag=eval, enabled=true -``` + + 4.以上都配置好,示例脚本生效 + +``` From de989f4fae91bc27ff05c7bc791d4b1214f536da Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 12 Mar 2020 16:34:04 +0800 Subject: [PATCH 0256/1191] update --- sub_script1.conf | 9 --------- sub_script2.conf | 12 ------------ sub_script3.conf | 1 - 3 files changed, 22 deletions(-) delete mode 100644 sub_script1.conf delete mode 100644 sub_script2.conf delete mode 100644 sub_script3.conf diff --git a/sub_script1.conf b/sub_script1.conf deleted file mode 100644 index 81889b8ce..000000000 --- a/sub_script1.conf +++ /dev/null @@ -1,9 +0,0 @@ -hostname = trade-acs.m.taobao.com, amdc.m.taobao.com, api.m.jd.com - -//jd -####^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js - -//tb -####^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -^https?://(trade-acs|amdc)\.m\.taobao\.com/(gw/mtop\.taobao\.detail\.getdetail|amdc/mobileDispatch) url script-response-body eval_script.js diff --git a/sub_script2.conf b/sub_script2.conf deleted file mode 100644 index 9f81215a0..000000000 --- a/sub_script2.conf +++ /dev/null @@ -1,12 +0,0 @@ -hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, ios.prod.ftl.netflix.com - -//nf -###https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js url ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js - -//wb -###https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js url ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) -###https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js url ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body eval_script.js diff --git a/sub_script3.conf b/sub_script3.conf deleted file mode 100644 index 6274b657d..000000000 --- a/sub_script3.conf +++ /dev/null @@ -1 +0,0 @@ -^https://r\.inews\.qq.com\/get(QQNewsUnreadList|RecommendList) url script-response-body eval_script.js From 812d99e8f2de7aab0da182d1edd694dc18c5ca28 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 12 Mar 2020 23:23:50 +0800 Subject: [PATCH 0257/1191] optimize --- eval_script.js | 97 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 64 insertions(+), 33 deletions(-) diff --git a/eval_script.js b/eval_script.js index 0b3acc192..c7d649544 100644 --- a/eval_script.js +++ b/eval_script.js @@ -27,6 +27,7 @@ const __log = false const __debug = false const __developmentMode = false + if (__isTask) { const ____getConf = (() => { return new Promise((resolve) => { @@ -46,7 +47,7 @@ if (__isTask) { content = content.concat(____parseRemoteConf(data.body)) } }); - content = content.concat(localConf) + content = localConf.concat(content) resolve({ content, result }) }) } else { @@ -152,33 +153,49 @@ if (!__isTask) { const __script = (() => { let script = null const keys = Object.keys(__confObj) - for (let i = keys.length; i--;) { + for (let i = 0, len = keys.length; i < len; i++) { if (script) break const key = keys[i] const value = __confObj[key] - for (let j = value.length; j--;) { + for (let j = 0, len = value.length; j < len; j++) { const match = value[j] + const regular = new RegExp(match.regular) if (__debug) { try { - if (__url.match(match.regular)) { - script = { url: key, match, content: __developmentMode ? key : __tool.read(key) } - break + if (regular.test(__url)) { + const type = match.type + if (type && type.length > 0) { + if (__tool.scriptType == type) { + script = { url: key, match, content: __developmentMode ? key : __tool.read(key) } + break + } + } else { + script = { url: key, match, content: __developmentMode ? key : __tool.read(key) } + break + } } } catch (error) { if (__debug) __tool.notify("[eval_script.js]", "", `Error regular : ${match.regular}\nRequest: ${__url}`) throw error } } else { - if (__url.match(match.regular)) { - script = { url: key, match, content: __developmentMode ? key : __tool.read(key) } - break + if (regular.test(__url)) { + const type = match.type + if (type && type.length > 0) { + if (__tool.scriptType == type) { + script = { url: key, match, content: __developmentMode ? key : __tool.read(key) } + break + } + } else { + script = { url: key, match, content: __developmentMode ? key : __tool.read(key) } + break + } } } } } return script })() - if (__script) { if (__script.content) { const type = __script.match.type @@ -189,7 +206,7 @@ if (!__isTask) { eval(__script.content) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}==${type}`, `Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } catch (error) { - if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match}\nRequest: ${__url}`) + if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match}\nRequest: ${__url}\nContent: ${__script.content}`) throw error } } else { @@ -205,7 +222,7 @@ if (!__isTask) { eval(__script.content) if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType} ${"request&&response"}`, `Execute script: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) } catch (error) { - if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) + if (__debug) __tool.notify("[eval_script.js]", `${__tool.method} ${__tool.scriptType}`, `Script execute error: ${error}\nScript: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}\nContent: ${__script.content}`) throw error } } else { @@ -328,28 +345,28 @@ function ____removeAnnotation(lines) { function ____parseConf(lines) { let confObj = {} for (let i = 0, len = lines.length; i < len; i++) { - const line = lines[i].replace(/^\s*/, "") - if (line.length > 0) { - const urlRegex = /.+\s+url\s+.+/ - const evalRegex = /.+\s+eval\s+.+/ - const avaliable = (() => { - return urlRegex.test(line) || evalRegex.test(line) - })() - if (avaliable) { - let remote = "" - let match = [] - if (urlRegex.test(line)) { - const value = line.split("url") - remote = value[0].replace(/\s/g, "") - match = ____parseMatch(value[1]) - } - if (evalRegex.test(line)) { - const value = line.split("eval") - remote = value[1].replace(/\s/g, "") - match = ____parseMatch(value[0]) - } + let line = lines[i].trim() + if (line.length > 0 && line.substring(0, 2) != "//" && line.substring(0, 1) != "#") { + const eval = /^(.+)\s+eval\s+(.+)$/ + const surge = /^http\s*-\s*(request|response)\s+(\S+)\s+(.+)$/ + const quanx = /^(\S+)\s+url\s+script\s*-\s*(\S+)\s*-\s*(?:header|body)\s+(\S+)$/ + if (surge.test(line)) { + const result = line.match(surge) + line = `${result[1].trim()} ${result[2].trim()} eval ${____surgeScriptPath(result[3].trim())}` + } else if (quanx.test(line)) { + const result = line.match(quanx) + line = `${result[2].trim()} ${result[1].trim()} eval ${result[3].trim()}` + } + if (eval.test(line)) { + const value = line.match(eval) + const remote = value[2].trim() + const match = ____parseMatch(value[1].trim()) if (remote.length > 0 && match.length > 0) { - confObj[remote] = match + if (confObj.hasOwnProperty(remote)) { + confObj[remote] = confObj[remote].concat(match) + } else { + confObj[remote] = match + } } else { return { obj: null, error: line } } @@ -361,6 +378,20 @@ function ____parseConf(lines) { return { obj: confObj, error: null } } +function ____surgeScriptPath(arg) { + let scriptPath = "" + const args = arg.split(",") + for (let i = 0, len = args.length; i < len; i++) { + const item = args[i].trim() + const path = /^script-path\s*=\s*(\S+)$/ + if (path.test(item)) { + scriptPath = item.match(path)[1] + break + } + } + return scriptPath +} + function ____parseMatch(match) { let matchs = [] const typeRegex = /(request|response)\s+\S+/g From 18aa6b817a4d32d1cb3a84cb2d9bc420a39472db Mon Sep 17 00:00:00 2001 From: goose Date: Fri, 13 Mar 2020 10:12:27 +0800 Subject: [PATCH 0258/1191] optimize --- eval_script.js | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/eval_script.js b/eval_script.js index c7d649544..c5f53b62d 100644 --- a/eval_script.js +++ b/eval_script.js @@ -14,21 +14,19 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf ` const __emoji = "• " -const __emojiSuccess = "😀" -const __emojiFail = "🙃" -const __emojiTasks = "🕐" const __emojiDone = "✔️" -const __showLine = 20 - -const __tool = new ____Tool() -const __isTask = __tool.isTask -const __concurrencyLimit = 5 +const __emojiTasks = "🕐" +const __emojiFail = "🙃" +const __emojiSuccess = "😀" const __log = false const __debug = false const __developmentMode = false +const __showLine = 20 +const __concurrencyLimit = 5 +const __tool = new ____Tool() -if (__isTask) { +if (__tool.isTask) { const ____getConf = (() => { return new Promise((resolve) => { const remoteConf = ____removeAnnotation(____extractConf(__conf, "eval_remote")) @@ -55,7 +53,6 @@ if (__isTask) { } }) }) - const begin = new Date() ____getConf() .then((conf) => { @@ -141,7 +138,7 @@ if (__isTask) { }) } -if (!__isTask) { +if (!__tool.isTask) { const __url = $request.url const __confObj = (() => { if (__developmentMode) { @@ -249,15 +246,6 @@ function ____timeDiff(begin, end) { return Math.ceil((end.getTime() - begin.getTime()) / 1000) } -async function ____sequenceQueue(urls, asyncHandle) { - let results = [] - for (let i = 0, len = urls.length; i < len; i++) { - let result = await asyncHandle(urls[i]) - results.push(result) - } - return results -} - function ____concurrentQueueLimit(list, limit, asyncHandle) { let results = [] const recursion = (arr) => { From 3baa38c9da3844b32e4a774d79e1a5db41e7f987 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 14 Mar 2020 12:06:07 +0800 Subject: [PATCH 0259/1191] Update README.md --- README.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/README.md b/README.md index 1a59b6083..7ee6a783b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,73 @@ +# eval_script.js 使用示例(适用于 Surge 和 QX ) + +``` +1.设置定时任务更新脚本,第一次需手动更新,脚本多的情况下有可能更新失败(Surge 和 QX 橙色按钮更新成功率最高),确保脚本更新成功 + +Surge: + +[Script] +cron "0 0 * * *" debug=1,script-path=eval_script.js + + +QX: + +[task_local] +0 0 * * * eval_script.js + + +2.在 eval_script.js 中配置需要管理的脚本,可以配置远程和配置本地,提供两个配置示例 + +远程格式为: #### 脚本类型(request/response) 匹配正则 eval 脚本连接 +本地格式为: 脚本类型(request/response) 匹配正则 eval 脚本连接 + +[eval_local] +response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js + +[eval_remote] +https://raw.githubusercontent.com/yichahucha/surge/master/sub_eval.conf + + +3.配置 App + +Surge: + +[Script] + +// http 请求脚本单独配置示例 +http-response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=eval_script.js + +http-request ^https://.*(? Date: Sat, 14 Mar 2020 17:25:10 +0800 Subject: [PATCH 0260/1191] Update README.md --- README.md | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/README.md b/README.md index 7ee6a783b..aa1d6b3db 100644 --- a/README.md +++ b/README.md @@ -178,35 +178,8 @@ DingDing clock in 0 9,18 * * 1-5 clock_in.js ``` - Script management tool ``` -简单使用示例 - -1.设置定时任务更新脚本,第一次需手动更新(使用橙色按钮),确保脚本更新成功 - [task_local] 0 0 * * * eval_script.js - - -2.在 eval_script.js 中配置需要管理的脚本,可以配置远程和配置本地,提供一个复写订阅适配 eval_script 的远程示例 - -远程格式为: ####脚本类型(request/response) 匹配正则 eval 脚本连接 -本地格式为: 脚本类型(request/response) 匹配正则 eval 脚本连接 - -[eval_remote] -https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf - -[eval_local] -// custom local... - - -3.添加复写订阅,更新复写订阅 - -[rewrite_remote] -https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf, tag=eval, enabled=true - - -4.以上都配置好,示例脚本生效 - ``` From f8aa29e1b6b6d5281cf2cae6e7eb780ee4625833 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 14 Mar 2020 17:31:38 +0800 Subject: [PATCH 0261/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aa1d6b3db..0962f726a 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ QX: 0 0 * * * eval_script.js -2.在 eval_script.js 中配置需要管理的脚本,可以配置远程和配置本地,提供两个配置示例 +2.在 eval_script.js 中配置需要管理的脚本,可以配置远程和配置本地,提供两个配置示例(也可以直接使用 surge 或 qx 脚本配置) 远程格式为: #### 脚本类型(request/response) 匹配正则 eval 脚本连接 本地格式为: 脚本类型(request/response) 匹配正则 eval 脚本连接 From fac0af314ceda07f8cff3342da6e430c3ed33201 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 14 Mar 2020 17:32:09 +0800 Subject: [PATCH 0262/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0962f726a..32fe099e7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# eval_script.js 使用示例(适用于 Surge 和 QX ) +# eval_script.js 使用示例(适用 Surge 和 QX ) ``` 1.设置定时任务更新脚本,第一次需手动更新,脚本多的情况下有可能更新失败(Surge 和 QX 橙色按钮更新成功率最高),确保脚本更新成功 From eaa25b0ad86bb6876c293ecc2ea7880af288de0f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 14 Mar 2020 20:26:35 +0800 Subject: [PATCH 0263/1191] Update README.md --- README.md | 70 ------------------------------------------------------- 1 file changed, 70 deletions(-) diff --git a/README.md b/README.md index 32fe099e7..dea8d2b37 100644 --- a/README.md +++ b/README.md @@ -1,73 +1,3 @@ -# eval_script.js 使用示例(适用 Surge 和 QX ) - -``` -1.设置定时任务更新脚本,第一次需手动更新,脚本多的情况下有可能更新失败(Surge 和 QX 橙色按钮更新成功率最高),确保脚本更新成功 - -Surge: - -[Script] -cron "0 0 * * *" debug=1,script-path=eval_script.js - - -QX: - -[task_local] -0 0 * * * eval_script.js - - -2.在 eval_script.js 中配置需要管理的脚本,可以配置远程和配置本地,提供两个配置示例(也可以直接使用 surge 或 qx 脚本配置) - -远程格式为: #### 脚本类型(request/response) 匹配正则 eval 脚本连接 -本地格式为: 脚本类型(request/response) 匹配正则 eval 脚本连接 - -[eval_local] -response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - -[eval_remote] -https://raw.githubusercontent.com/yichahucha/surge/master/sub_eval.conf - - -3.配置 App - -Surge: - -[Script] - -// http 请求脚本单独配置示例 -http-response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=eval_script.js - -http-request ^https://.*(? Date: Sat, 14 Mar 2020 22:19:40 +0800 Subject: [PATCH 0264/1191] Update sub_script.conf --- sub_script.conf | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/sub_script.conf b/sub_script.conf index 6a94e39ae..310c8481d 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,25 +1,16 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com -//jd -####response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js +# wb +####http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +####http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js -//tb -####response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body eval_script.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js +# nf +####http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +####http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -//nf -####^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D eval https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js +# jd +####http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -//wb -####response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -####response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) url script-response-body eval_script.js - -# eval_script.js 远程配置说明: -# 1.添加注释格式为:####脚本类型(request/response) 匹配正则 eval 脚本链接 -# 2.修改原脚本路径为 eval_script.js 的脚本路径 \ No newline at end of file +# tb +####http-response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +####http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js From 78837426fd69278d1787b15408a8d201aeabd739 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 14 Mar 2020 22:35:43 +0800 Subject: [PATCH 0265/1191] Update sub_script.conf --- sub_script.conf | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sub_script.conf b/sub_script.conf index 310c8481d..75416add1 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,16 +1,16 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com -# wb -####http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -####http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js - -# nf -####http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -####http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - # jd -####http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js # tb -####http-response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -####http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +# nf +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +# wb +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js From e32d0d7e68debe1d92c86dad1421c4e714b678b5 Mon Sep 17 00:00:00 2001 From: goose Date: Sat, 14 Mar 2020 23:09:42 +0800 Subject: [PATCH 0266/1191] optimize --- eval_script.js | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/eval_script.js b/eval_script.js index c5f53b62d..8c48465a9 100644 --- a/eval_script.js +++ b/eval_script.js @@ -3,8 +3,8 @@ const __conf = String.raw` [eval_remote] // custom remote... - -https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf +// https://raw.githubusercontent.com/nzw9314/QuantumultX/master/Js.conf +// https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf [eval_local] @@ -18,14 +18,14 @@ const __emojiDone = "✔️" const __emojiTasks = "🕐" const __emojiFail = "🙃" const __emojiSuccess = "😀" +const __showLine = 20 + const __log = false const __debug = false const __developmentMode = false -const __showLine = 20 const __concurrencyLimit = 5 const __tool = new ____Tool() - if (__tool.isTask) { const ____getConf = (() => { return new Promise((resolve) => { @@ -228,11 +228,11 @@ if (!__tool.isTask) { } } else { __tool.done({}) - if (__log) console.log(`Script not found: ${__script.url}\nRegular: ${__script.match.regular}\nRequest: ${__url}`) + if (__log) console.log(`script not found: ${__script.url}\nregular: ${__script.match.regular}\nrequest: ${__url}`) } } else { __tool.done({}) - if (__log) console.log(`Script not matched: ${__url}`) + if (__log) console.log(`script not matched: ${__url}`) } } @@ -275,14 +275,14 @@ function ____downloadFile(url) { if (!error) { const code = response.statusCode if (code == 200) { - console.log(`Update Success: ${url}`) + console.log(`update Success: ${url}`) resolve({ url, code, body, message: `${__emoji}${filename} update success` }) } else { - console.log(`Update Fail ${response.statusCode}: ${url}`) + console.log(`update Fail ${response.statusCode}: ${url}`) resolve({ url, code, body, message: `${__emoji}${filename} update fail` }) } } else { - console.log(`Update Fail ${error}`) + console.log(`update Fail ${error}`) resolve({ url, code: null, body: null, message: `${__emoji}${filename} update fail` }) } }) @@ -305,12 +305,24 @@ function ____parseRemoteConf(conf) { const lines = conf.split("\n") let newLines = [] for (let i = 0, len = lines.length; i < len; i++) { - let line = lines[i].replace(/^\s*/, "") - if (line.length > 0 && /^#{3}/.test(line)) { - line = line.replace(/^#*/, "") - line = line.replace(/^\s*/, "") - if (line.length > 0) { + const eval = /^(.+)\s+eval\s+(.+)$/ + const surge = /^http\s*-\s*(request|response)\s+(\S+)\s+(.+)$/ + const quanx = /^(\S+)\s+url\s+script\s*-\s*(\S+)\s*-\s*(?:header|body)\s+(\S+)$/ + let line = lines[i].trim() + if (line.length > 0) { + if (/^#{4}/.test(line)) { + line = line.replace(/^#*/, "") newLines.push(line) + } else if (/^(?!;|#|\/\/).*/.test(line)) { + if (eval.test(line) || surge.test(line)) { + newLines.push(line) + } + if (quanx.test(line)) { + const path = line.match(quanx)[3].trim() + if (/^https?:\/\/.+/.test(path)) { + newLines.push(line) + } + } } } } @@ -435,7 +447,7 @@ function ____Tool() { this.done = (obj) => { if (_isQuanX) $done(obj) if (_isSurge) $done(obj) - if (_node) console.log("Script Done."); + if (_node) console.log("script Done."); } this.notify = (title, subtitle, message) => { if (_isQuanX) $notify(title, subtitle, message) @@ -445,12 +457,12 @@ function ____Tool() { this.write = (value, key) => { if (_isQuanX) return $prefs.setValueForKey(value, key) if (_isSurge) return $persistentStore.write(value, key) - if (_node) console.log(`Write Success: ${key}`); + if (_node) console.log(`write success: ${key}`); } this.read = (key) => { if (_isQuanX) return $prefs.valueForKey(key) if (_isSurge) return $persistentStore.read(key) - if (_node) console.log(`Read Success: ${key}`); + if (_node) console.log(`read success: ${key}`); } this.get = (options, callback) => { if (_isQuanX) { From f21fe2b85886cc74451d7116d19e4f645857f5cd Mon Sep 17 00:00:00 2001 From: goose Date: Sat, 14 Mar 2020 23:10:41 +0800 Subject: [PATCH 0267/1191] optimize --- eval_script.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/eval_script.js b/eval_script.js index 8c48465a9..8fcea01bd 100644 --- a/eval_script.js +++ b/eval_script.js @@ -3,8 +3,6 @@ const __conf = String.raw` [eval_remote] // custom remote... -// https://raw.githubusercontent.com/nzw9314/QuantumultX/master/Js.conf -// https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf [eval_local] From 33afc156e0f1668d36bcb7a4740d9401d4000289 Mon Sep 17 00:00:00 2001 From: goose Date: Sat, 14 Mar 2020 23:13:26 +0800 Subject: [PATCH 0268/1191] optimize --- sub_script.conf | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sub_script.conf b/sub_script.conf index 75416add1..f24f98e84 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,16 +1,16 @@ -hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com +# hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com -# jd -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - -# tb -^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +# wb +http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js # nf -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -# wb -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +# jd +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js + +# tb +http-response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js From 086a7df311ddb6e1381eee82826b4b939db8f43a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 15 Mar 2020 10:23:56 +0800 Subject: [PATCH 0269/1191] Update README.md --- README.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/README.md b/README.md index dea8d2b37..36533fb0c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,62 @@ +# eval_script.js 使用示例 +``` +1.在 App 中添加配置如下,第一次需手动执行任务更新脚本,脚本多的情况下有可能更新失败(Surge 和 QX 橙色按钮更新成功率最高),确保脚本更新成功 + +Surge: + +[Script] +cron "0 0 * * *" debug=1,script-path=eval_script.js + +http-request ^https://.*(? Date: Sun, 15 Mar 2020 10:25:07 +0800 Subject: [PATCH 0270/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 36533fb0c..93cc4384b 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, api.m.jd.com, ios.pro https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf -3.以上都配置好,示例脚本生效,以后大部分情况下只需要在 eval_script.js 添加新脚本或者订阅新脚本,在对应App 配置文件中添加脚本的 hostname 即可 +3.以上都配置好,示例脚本生效,以后大部分情况下只需要在 eval_script.js 添加新脚本或者订阅新脚本,在对应 App 添加脚本的 hostname 即可 注意: From 9d3152e47e8cb41bf77bda9cc7d7105c4deb2312 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 15 Mar 2020 10:28:53 +0800 Subject: [PATCH 0271/1191] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 93cc4384b..b3e6c9aa4 100644 --- a/README.md +++ b/README.md @@ -37,11 +37,11 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, api.m.jd.com, ios.pro 本地格式为: 脚本类型(request/response) 匹配正则 eval 脚本连接 [eval_local] -// 添加 eval_script 格式的脚本 或者 直接使用 surge、qx 脚本配置 +// 添加 eval_script 格式脚本 或者 直接使用 surge、qx 脚本配置 +// issue eval https://t.me/joinchat/GNhmPg1pixfpvKyD0h-8YA [eval_remote] -// 添加 eval_script 格式远程配置 或者 qx 远程复写 - +// 添加 eval_script 格式远程 或者 qx 远程复写 https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf From 2abe1946aeb5d4da73b9008ccd6282f000e3cd12 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 15 Mar 2020 10:55:27 +0800 Subject: [PATCH 0272/1191] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b3e6c9aa4..4c78301b1 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ Surge: [Script] cron "0 0 * * *" debug=1,script-path=eval_script.js -http-request ^https://.*(? Date: Sun, 15 Mar 2020 11:14:07 +0800 Subject: [PATCH 0273/1191] Update README.md --- README.md | 118 +++++++++++++++++++++++++++--------------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index 4c78301b1..f1ee27804 100644 --- a/README.md +++ b/README.md @@ -1,62 +1,3 @@ -# eval_script.js 使用示例 -``` -1.在 App 中添加配置如下,第一次需手动执行任务更新脚本,脚本多的情况下有可能更新失败(Surge 和 QX 橙色按钮更新成功率最高),确保脚本更新成功 - -Surge: - -[Script] -cron "0 0 * * *" debug=1,script-path=eval_script.js - -http-request ^https://.*(? Date: Sun, 15 Mar 2020 11:17:00 +0800 Subject: [PATCH 0274/1191] optimize --- eval_script.js | 54 +++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/eval_script.js b/eval_script.js index 8fcea01bd..e11c8aa4e 100644 --- a/eval_script.js +++ b/eval_script.js @@ -327,19 +327,6 @@ function ____parseRemoteConf(conf) { return newLines } -function ____removeAnnotation(lines) { - if (lines.length > 0) { - let i = lines.length; - while (i--) { - const line = lines[i].replace(/^\s*/, "") - if (line.length == 0 || line.substring(0, 2) == "//" || line.substring(0, 1) == "#") { - lines.splice(i, 1) - } - } - } - return lines -} - function ____parseConf(lines) { let confObj = {} for (let i = 0, len = lines.length; i < len; i++) { @@ -376,20 +363,6 @@ function ____parseConf(lines) { return { obj: confObj, error: null } } -function ____surgeScriptPath(arg) { - let scriptPath = "" - const args = arg.split(",") - for (let i = 0, len = args.length; i < len; i++) { - const item = args[i].trim() - const path = /^script-path\s*=\s*(\S+)$/ - if (path.test(item)) { - scriptPath = item.match(path)[1] - break - } - } - return scriptPath -} - function ____parseMatch(match) { let matchs = [] const typeRegex = /(request|response)\s+\S+/g @@ -411,6 +384,33 @@ function ____parseMatch(match) { return matchs } +function ____surgeScriptPath(arg) { + let scriptPath = "" + const args = arg.split(",") + for (let i = 0, len = args.length; i < len; i++) { + const item = args[i].trim() + const path = /^script-path\s*=\s*(\S+)$/ + if (path.test(item)) { + scriptPath = item.match(path)[1] + break + } + } + return scriptPath +} + +function ____removeAnnotation(lines) { + if (lines.length > 0) { + let i = lines.length; + while (i--) { + const line = lines[i].replace(/^\s*/, "") + if (line.length == 0 || line.substring(0, 2) == "//" || line.substring(0, 1) == "#") { + lines.splice(i, 1) + } + } + } + return lines +} + function ____Tool() { _node = (() => { if (typeof require == "function") { From a40a4e3a5aebac3700651199b18c0cb8d70be149 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 15 Mar 2020 11:26:51 +0800 Subject: [PATCH 0275/1191] Update README.md --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f1ee27804..95c74ca5f 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ Script management tool ``` # eval_script.js 使用示例 -``` +```properties 1.在 App 中添加配置如下,第一次需手动执行任务更新脚本,脚本多的情况下有可能更新失败(Surge 和 QX 橙色按钮更新成功率最高),确保脚本更新成功 Surge: @@ -149,15 +149,14 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, api.m.jd.com, ios.pro 2.在 eval_script.js 中配置需要管理的脚本,支持本地和远程配置 -远程格式为: #### 脚本类型(request/response) 匹配正则 eval 脚本连接 -本地格式为: 脚本类型(request/response) 匹配正则 eval 脚本连接 +格式为: 脚本类型(request/response) 匹配正则 eval 脚本连接 [eval_local] -// 添加 eval_script 格式脚本 或者 直接使用 surge、qx 脚本配置 -// issue eval https://t.me/joinchat/GNhmPg1pixfpvKyD0h-8YA +# 添加 eval_script 格式脚本 或者 直接使用 surge、qx 脚本配置 +# issue eval https://t.me/joinchat/GNhmPg1pixfpvKyD0h-8YA [eval_remote] -// 添加 eval_script 格式远程 或者 qx 远程复写 +# 添加 eval_script 格式远程 或者 qx 远程复写 https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf From 969eb77cb5ae29730237c9fae74d104352858592 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 15 Mar 2020 11:34:02 +0800 Subject: [PATCH 0276/1191] Update README.md --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 95c74ca5f..7029d6107 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Surge Remove weibo ads -``` +```properties [Script] http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js @@ -9,7 +9,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` Display netflix ratings(IMDb、douaban) -``` +```properties [Script] http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js @@ -18,7 +18,7 @@ hostname = ios.prod.ftl.netflix.com ``` Display jd historical price -``` +```properties # 不生效或失效的检查一下配置有没有这两条复写,删除试试 # ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=start - reject # ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=(start|queryMaterialAdverts) - reject @@ -29,7 +29,7 @@ hostname = api.m.jd.com ``` Display taobao historical price -``` +```properties # 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [Script] http-response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js @@ -46,13 +46,13 @@ hostname = trade-acs.m.taobao.com ``` DingDing clock in -``` +```properties [Script] cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/surge/master/clock_in.js ``` Script management tool -``` +```properties [Script] cron "0 0 * * *" eval_script.js ``` @@ -60,7 +60,7 @@ cron "0 0 * * *" eval_script.js # Quan-X Remove weibo ads -``` +```properties [rewrite_local] ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body wb_launch.js ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) url script-response-body wb_ad.js @@ -69,7 +69,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` Display netflix ratings(IMDb、douaban) -``` +```properties [rewrite_local] ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header nf_rating.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body nf_rating.js @@ -78,7 +78,7 @@ hostname = ios.prod.ftl.netflix.com ``` Display jd historical price -``` +```properties [rewrite_local] ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js [mitm] @@ -86,7 +86,7 @@ hostname = api.m.jd.com ``` Display taobao historical price -``` +```properties # 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [rewrite_local] ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body tb_price.js @@ -103,7 +103,7 @@ hostname = trade-acs.m.taobao.com ``` DingDing clock in -``` +```properties [task_local] 0 9,18 * * 1-5 clock_in.js ``` From 69725e0ac91d8df112efe4ba4bac565f51a3f370 Mon Sep 17 00:00:00 2001 From: goose Date: Sun, 15 Mar 2020 11:40:48 +0800 Subject: [PATCH 0277/1191] optimize --- sub_eval.conf | 3 +++ sub_script.conf | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/sub_eval.conf b/sub_eval.conf index 49acf4cb2..409b20adc 100644 --- a/sub_eval.conf +++ b/sub_eval.conf @@ -1,6 +1,9 @@ //tb ####response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +//jd +####response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js + //nf ####^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D eval https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js diff --git a/sub_script.conf b/sub_script.conf index f24f98e84..75416add1 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -1,16 +1,16 @@ -# hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com - -# wb -http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js - -# nf -http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com # jd -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js # tb -http-response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +# nf +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +# wb +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js From d2c6fe06dfe0ac94c34abbb42cc4cdda7539a254 Mon Sep 17 00:00:00 2001 From: goose Date: Sun, 15 Mar 2020 11:42:45 +0800 Subject: [PATCH 0278/1191] update --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7029d6107..35d01976c 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, api.m.jd.com, ios.pro [eval_remote] # 添加 eval_script 格式远程 或者 qx 远程复写 +# https://raw.githubusercontent.com/yichahucha/surge/master/sub_eval.conf https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf From b6c257dbc7c35b43c4769ffb7e7ce2bd1eeb7bb4 Mon Sep 17 00:00:00 2001 From: goose Date: Sun, 15 Mar 2020 11:43:54 +0800 Subject: [PATCH 0279/1191] update --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 35d01976c..7a8ca3e71 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, api.m.jd.com, ios.pro [eval_remote] # 添加 eval_script 格式远程 或者 qx 远程复写 # https://raw.githubusercontent.com/yichahucha/surge/master/sub_eval.conf + https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf From 3b02706d24cca77858288c5f88cc5fc80d76877e Mon Sep 17 00:00:00 2001 From: goose Date: Sun, 15 Mar 2020 11:44:38 +0800 Subject: [PATCH 0280/1191] update --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 7a8ca3e71..f4ab425c6 100644 --- a/README.md +++ b/README.md @@ -147,9 +147,7 @@ QX: [mitm] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, api.m.jd.com, ios.prod.ftl.netflix.com, trade-acs.m.taobao.com -2.在 eval_script.js 中配置需要管理的脚本,支持本地和远程配置 - -格式为: 脚本类型(request/response) 匹配正则 eval 脚本连接 +2.在 eval_script.js 中配置需要管理的脚本,支持本地和远程配置,格式为: 脚本类型(request/response) 匹配正则 eval 脚本连接 [eval_local] # 添加 eval_script 格式脚本 或者 直接使用 surge、qx 脚本配置 From 8ae7ea849dc85baea3b09c485bb5c078d5ab820e Mon Sep 17 00:00:00 2001 From: goose Date: Sun, 15 Mar 2020 11:45:42 +0800 Subject: [PATCH 0281/1191] update --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f4ab425c6..7afadb786 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,7 @@ QX: [mitm] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, api.m.jd.com, ios.prod.ftl.netflix.com, trade-acs.m.taobao.com + 2.在 eval_script.js 中配置需要管理的脚本,支持本地和远程配置,格式为: 脚本类型(request/response) 匹配正则 eval 脚本连接 [eval_local] From 283bb70c6e84a5dbfce6c463ccaaeac9bcf6f3d7 Mon Sep 17 00:00:00 2001 From: goose Date: Sun, 15 Mar 2020 11:46:39 +0800 Subject: [PATCH 0282/1191] update --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 7afadb786..97f6d3a8e 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,6 @@ cron "0 0 * * *" debug=1,script-path=eval_script.js http-request ^https://.*(? Date: Sun, 15 Mar 2020 17:13:54 +0800 Subject: [PATCH 0283/1191] Update README.md --- README.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 97f6d3a8e..80c64873c 100644 --- a/README.md +++ b/README.md @@ -123,10 +123,8 @@ Surge: [Script] cron "0 0 * * *" debug=1,script-path=eval_script.js -http-request ^https://.*(? Date: Sun, 15 Mar 2020 17:18:37 +0800 Subject: [PATCH 0284/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 80c64873c..9228d9142 100644 --- a/README.md +++ b/README.md @@ -161,5 +161,5 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf ^https?://.*(? Date: Sun, 15 Mar 2020 21:09:05 +0800 Subject: [PATCH 0285/1191] Update README.md --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9228d9142..166fee7ca 100644 --- a/README.md +++ b/README.md @@ -123,8 +123,10 @@ Surge: [Script] cron "0 0 * * *" debug=1,script-path=eval_script.js -http-request ^https?://.*(? Date: Sun, 15 Mar 2020 21:32:44 +0800 Subject: [PATCH 0286/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 166fee7ca..5fbc35fc3 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Script management tool 0 0 * * * eval_script.js ``` -# eval_script.js 使用示例 +# 脚本管理 eval_script.js 使用示例 ```properties 1.在 App 中添加配置如下,第一次需手动执行任务更新脚本,脚本多的情况下有可能更新失败(Surge 和 QX 橙色按钮更新成功率最高),确保脚本更新成功 From 1e830adae853492859925ca50a76a126af5e754f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 15 Mar 2020 21:33:57 +0800 Subject: [PATCH 0287/1191] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 5fbc35fc3..cd660c325 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,6 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, api.m.jd.com, ios.pro [eval_local] # 添加 eval_script 格式脚本 或者 直接使用 surge、qx 脚本配置 -# issue eval https://t.me/joinchat/GNhmPg1pixfpvKyD0h-8YA [eval_remote] # 添加 eval_script 格式远程 或者 qx 远程复写 From d0e66984aec39aa485e69bfa51c213a4b0e727cd Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 15 Mar 2020 21:35:12 +0800 Subject: [PATCH 0288/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cd660c325..2e8f1885d 100644 --- a/README.md +++ b/README.md @@ -149,10 +149,10 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, api.m.jd.com, ios.pro 2.在 eval_script.js 中配置需要管理的脚本,支持本地和远程配置,格式为: 脚本类型(request/response) 匹配正则 eval 脚本连接 [eval_local] -# 添加 eval_script 格式脚本 或者 直接使用 surge、qx 脚本配置 +# 添加 eval_script 格式脚本 或者 使用 surge、qx 脚本配置 [eval_remote] -# 添加 eval_script 格式远程 或者 qx 远程复写 +# 添加 eval_script 格式远程 或者 其他远程复写 # https://raw.githubusercontent.com/yichahucha/surge/master/sub_eval.conf https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf From d41c1d33bece66864046f8a4ef51bbda88d0f01d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 15 Mar 2020 21:44:15 +0800 Subject: [PATCH 0289/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e8f1885d..ef5a6a515 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, api.m.jd.com, ios.pro # 添加 eval_script 格式脚本 或者 使用 surge、qx 脚本配置 [eval_remote] -# 添加 eval_script 格式远程 或者 其他远程复写 +# 添加 eval_script 格式远程 或者 使用 qx 远程复写 # https://raw.githubusercontent.com/yichahucha/surge/master/sub_eval.conf https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf From bfdd23069b528ba5d1e4ddf30c75ce64aa776f56 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 15 Mar 2020 21:51:24 +0800 Subject: [PATCH 0290/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ef5a6a515..5082aff6f 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, api.m.jd.com, ios.pro [eval_remote] # 添加 eval_script 格式远程 或者 使用 qx 远程复写 # https://raw.githubusercontent.com/yichahucha/surge/master/sub_eval.conf -https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf +# https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf 3.以上都配置好,示例脚本生效,以后大部分情况下只需要在 eval_script.js 添加新脚本或者订阅新脚本,在对应 App 添加脚本的 hostname 即可 From 55d800224c1df4e0c3e4cbf9da90787e232fa8e6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 15 Mar 2020 21:52:07 +0800 Subject: [PATCH 0291/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5082aff6f..9d25dce2f 100644 --- a/README.md +++ b/README.md @@ -153,8 +153,8 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, api.m.jd.com, ios.pro [eval_remote] # 添加 eval_script 格式远程 或者 使用 qx 远程复写 -# https://raw.githubusercontent.com/yichahucha/surge/master/sub_eval.conf # https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf +https://raw.githubusercontent.com/yichahucha/surge/master/sub_eval.conf 3.以上都配置好,示例脚本生效,以后大部分情况下只需要在 eval_script.js 添加新脚本或者订阅新脚本,在对应 App 添加脚本的 hostname 即可 From bc62723448cbc51a5ce97de615a56b1669734251 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 15 Mar 2020 21:54:57 +0800 Subject: [PATCH 0292/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d25dce2f..b28f34a7c 100644 --- a/README.md +++ b/README.md @@ -150,10 +150,10 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, api.m.jd.com, ios.pro [eval_local] # 添加 eval_script 格式脚本 或者 使用 surge、qx 脚本配置 +# response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js [eval_remote] # 添加 eval_script 格式远程 或者 使用 qx 远程复写 -# https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf https://raw.githubusercontent.com/yichahucha/surge/master/sub_eval.conf From 57577dfd29aa99545994609e5f47604b104e27cf Mon Sep 17 00:00:00 2001 From: goose Date: Sun, 15 Mar 2020 22:26:46 +0800 Subject: [PATCH 0293/1191] update --- sub_eval.conf | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/sub_eval.conf b/sub_eval.conf index 409b20adc..1d0d70ca8 100644 --- a/sub_eval.conf +++ b/sub_eval.conf @@ -1,12 +1,14 @@ -//tb -####response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +# tb +response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -//jd -####response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +# jd +response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -//nf -####^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D eval https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +# nf +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D eval https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -//wb -####response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js -####response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +# wb +response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js + +# hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com \ No newline at end of file From 92bc33c03488c6d8249440e4c921275002c5a5c8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 15 Mar 2020 22:37:11 +0800 Subject: [PATCH 0294/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b28f34a7c..2163a86b7 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Script management tool 0 0 * * * eval_script.js ``` -# 脚本管理 eval_script.js 使用示例 +# 脚本管理工具 eval_script.js 使用示例 ```properties 1.在 App 中添加配置如下,第一次需手动执行任务更新脚本,脚本多的情况下有可能更新失败(Surge 和 QX 橙色按钮更新成功率最高),确保脚本更新成功 From 8164465a50f649a15c950344c225d34ee6a188fc Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 15 Mar 2020 22:40:42 +0800 Subject: [PATCH 0295/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2163a86b7..b28f34a7c 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Script management tool 0 0 * * * eval_script.js ``` -# 脚本管理工具 eval_script.js 使用示例 +# 脚本管理 eval_script.js 使用示例 ```properties 1.在 App 中添加配置如下,第一次需手动执行任务更新脚本,脚本多的情况下有可能更新失败(Surge 和 QX 橙色按钮更新成功率最高),确保脚本更新成功 From c8b7d2155874879d02e8e13d4dc9e3a7546898c9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 16 Mar 2020 22:39:40 +0800 Subject: [PATCH 0296/1191] Update README.md --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b28f34a7c..3dad446f4 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,10 @@ cron "0 0 * * *" debug=1,script-path=eval_script.js http-request ^https://.*(? Date: Mon, 16 Mar 2020 22:41:00 +0800 Subject: [PATCH 0297/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3dad446f4..81e89217d 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ QX: ^https://.*(? Date: Wed, 18 Mar 2020 12:35:27 +0800 Subject: [PATCH 0298/1191] Update README.md --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 81e89217d..a77554a19 100644 --- a/README.md +++ b/README.md @@ -141,14 +141,12 @@ QX: 0 0 * * * eval_script.js [rewrite_local] -^https://.*(? Date: Wed, 18 Mar 2020 12:35:56 +0800 Subject: [PATCH 0299/1191] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index a77554a19..2ab744835 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,6 @@ QX: # request body # ^https?://.+/amdc/mobileDispatch url script-request-body eval_script.js - [mitm] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, api.m.jd.com, ios.prod.ftl.netflix.com, trade-acs.m.taobao.com From 978da5a792844a71d1dbd02770712af04d3bce6e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 18 Mar 2020 12:43:39 +0800 Subject: [PATCH 0300/1191] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2ab744835..c4b171a23 100644 --- a/README.md +++ b/README.md @@ -169,10 +169,10 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_eval.conf ^https?://.*(? Date: Thu, 19 Mar 2020 13:29:14 +0800 Subject: [PATCH 0301/1191] update --- nf_rating.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/nf_rating.js b/nf_rating.js index 7e53e5f13..932c71178 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -3,9 +3,9 @@ README:https://github.com/yichahucha/surge/tree/master */ const $tool = new Tool() -const consoleLog = false; const imdbApikeyCacheKey = "IMDbApikey"; const netflixTitleCacheKey = "NetflixTitle"; +const consoleLog = false; if (!$tool.isResponse) { let url = $request.url; @@ -27,7 +27,6 @@ if (!$tool.isResponse) { var IMDbApikey = $tool.read(imdbApikeyCacheKey); if (!IMDbApikey) updateIMDbApikey(); let obj = JSON.parse($response.body); - if (consoleLog) console.log("Netflix Original Body:\n" + $response.body); const videoID = obj.paths[0][1]; const video = obj.value.videos[videoID]; const map = getTitleMap(); @@ -60,18 +59,9 @@ if (!$tool.isResponse) { .then(message => msg = message) .catch(error => msg = error + "\n") .finally(() => { - let summary = obj.value.videos[videoID].summary; - if (summary && summary.imageTypeIdentifier && summary.imageTypeIdentifier.match(/^top/)) { - const ranking = `#${summary.supplementalMessage ? summary.supplementalMessage.match(/\d/g).join("") : ""}`; - const ratings = msg.split("\n") - let rating = msg - if (ratings.length > 1) rating = `${ratings[1].split(" ")[0].replace(/\s{2}/g, " ")} ${ratings[2].split(" ")[0].replace(/\s{2}/g, " ")}` - summary["supplementalMessage"] = `${ranking} ${rating}`; - } else { - summary["supplementalMessage"] = `${msg}${summary && summary.supplementalMessage ? "\n" + summary.supplementalMessage : ""}`; - } - if (consoleLog) console.log("Netflix Modified Body:\n" + JSON.stringify(obj)); + summary["supplementalMessage"] = `${msg}${summary && summary.supplementalMessage ? "\n" + summary.supplementalMessage : ""}`; $done({ body: JSON.stringify(obj) }); + if (consoleLog) console.log("Netflix Modified Body:\n" + JSON.stringify(obj)); }); } From f13ec1d72ab81f6f46e347375230144cadbb8fca Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 19 Mar 2020 13:34:29 +0800 Subject: [PATCH 0302/1191] update --- nf_rating.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nf_rating.js b/nf_rating.js index 932c71178..302cd7e84 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -3,9 +3,9 @@ README:https://github.com/yichahucha/surge/tree/master */ const $tool = new Tool() +const consoleLog = false; const imdbApikeyCacheKey = "IMDbApikey"; const netflixTitleCacheKey = "NetflixTitle"; -const consoleLog = false; if (!$tool.isResponse) { let url = $request.url; @@ -27,6 +27,7 @@ if (!$tool.isResponse) { var IMDbApikey = $tool.read(imdbApikeyCacheKey); if (!IMDbApikey) updateIMDbApikey(); let obj = JSON.parse($response.body); + if (consoleLog) console.log("Netflix Original Body:\n" + $response.body); const videoID = obj.paths[0][1]; const video = obj.value.videos[videoID]; const map = getTitleMap(); @@ -59,9 +60,10 @@ if (!$tool.isResponse) { .then(message => msg = message) .catch(error => msg = error + "\n") .finally(() => { + let summary = obj.value.videos[videoID].summary; summary["supplementalMessage"] = `${msg}${summary && summary.supplementalMessage ? "\n" + summary.supplementalMessage : ""}`; - $done({ body: JSON.stringify(obj) }); if (consoleLog) console.log("Netflix Modified Body:\n" + JSON.stringify(obj)); + $done({ body: JSON.stringify(obj) }); }); } From 63dfd8c4139f5ca693eec6135588614d90fb13ee Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 24 Mar 2020 18:30:24 +0800 Subject: [PATCH 0303/1191] Create sub_eval_conf --- sub_eval_conf | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sub_eval_conf diff --git a/sub_eval_conf b/sub_eval_conf new file mode 100644 index 000000000..97acb8e8b --- /dev/null +++ b/sub_eval_conf @@ -0,0 +1,2 @@ +http-request ^https://.*(? Date: Tue, 24 Mar 2020 18:30:42 +0800 Subject: [PATCH 0304/1191] Rename sub_eval_conf to sub_eval_conf.conf --- sub_eval_conf => sub_eval_conf.conf | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sub_eval_conf => sub_eval_conf.conf (100%) diff --git a/sub_eval_conf b/sub_eval_conf.conf similarity index 100% rename from sub_eval_conf rename to sub_eval_conf.conf From c58d22e73b4420b328a6c4afe5516009ec14eaa0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 24 Mar 2020 18:43:00 +0800 Subject: [PATCH 0305/1191] Rename sub_eval_conf.conf to sub_eval_conf.text --- sub_eval_conf.conf => sub_eval_conf.text | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sub_eval_conf.conf => sub_eval_conf.text (100%) diff --git a/sub_eval_conf.conf b/sub_eval_conf.text similarity index 100% rename from sub_eval_conf.conf rename to sub_eval_conf.text From eb576cb47b00bf709b7abbaa052249e5b3f83c8d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 24 Mar 2020 18:43:16 +0800 Subject: [PATCH 0306/1191] Rename sub_eval_conf.text to sub_eval_conf.txt --- sub_eval_conf.text => sub_eval_conf.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sub_eval_conf.text => sub_eval_conf.txt (100%) diff --git a/sub_eval_conf.text b/sub_eval_conf.txt similarity index 100% rename from sub_eval_conf.text rename to sub_eval_conf.txt From b5f436318f144e4d3dfe552ec2e9e93a14811629 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 25 Mar 2020 15:17:57 +0800 Subject: [PATCH 0307/1191] Update README.md --- README.md | 63 ------------------------------------------------------- 1 file changed, 63 deletions(-) diff --git a/README.md b/README.md index c4b171a23..5edfe34e5 100644 --- a/README.md +++ b/README.md @@ -113,66 +113,3 @@ Script management tool [task_local] 0 0 * * * eval_script.js ``` - -# 脚本管理 eval_script.js 使用示例 -```properties -1.在 App 中添加配置如下,第一次需手动执行任务更新脚本,脚本多的情况下有可能更新失败(Surge 和 QX 橙色按钮更新成功率最高),确保脚本更新成功 - -Surge: - -[Script] -cron "0 0 * * *" debug=1,script-path=eval_script.js - -http-request ^https://.*(? Date: Wed, 25 Mar 2020 19:13:16 +0800 Subject: [PATCH 0308/1191] update --- eval_script.js | 424 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 351 insertions(+), 73 deletions(-) diff --git a/eval_script.js b/eval_script.js index e11c8aa4e..e0a7817d5 100644 --- a/eval_script.js +++ b/eval_script.js @@ -1,16 +1,41 @@ const __conf = String.raw` -[eval_remote] +[Remote] // custom remote... +https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf -[eval_local] +[Local] // custom local... +[Hostname] +// custom hostname... +// www.baidu.com, www.google.com + + ` +// 是否开启 GitHub 更新 +const __isUpdateGithub = true +// GitHub Token( Token 优先级高,如果不使用 Token 请设置为空 "") +const __token = "" +// GitHub 账号 +const __username = "xxx" +// GitHub 密码 +const __password = "xxx" +// GitHub 用户名 +const __owner = "yichahucha" +// GitHub 仓库名 +const __repo = "surge" +// GitHub 文件路径(没有文件新生成,已有文件覆盖,路径为空 "" 不更新) +const __quanxPath = "eval_script/quanx.txt" +const __surgePath = "eval_script/surge.txt" +// GitHub 提交日志 +const __quanxCommit = "update" +const __surgeCommit = "update" + const __emoji = "• " const __emojiDone = "✔️" const __emojiTasks = "🕐" @@ -22,70 +47,85 @@ const __log = false const __debug = false const __developmentMode = false const __concurrencyLimit = 5 + const __tool = new ____Tool() +const __base64 = new ____Base64() if (__tool.isTask) { const ____getConf = (() => { return new Promise((resolve) => { - const remoteConf = ____removeAnnotation(____extractConf(__conf, "eval_remote")) - const localConf = ____removeAnnotation(____extractConf(__conf, "eval_local")) + const remoteConf = ____removeAnnotation(____extractConf(__conf, "Remote")) + const localConf = ____removeAnnotation(____extractConf(__conf, "Local")) + const hostnameConf = ____parseHostname(____removeAnnotation(____extractConf(__conf, "Hostname"))) if (remoteConf.length > 0) { console.log("Start updating conf...") if (__debug) __tool.notify("", "", `Start updating ${remoteConf.length} confs...`) ____concurrentQueueLimit(remoteConf, __concurrencyLimit, (url) => { return ____downloadFile(url) }) - .then(result => { + .then(results => { console.log("Stop updating conf.") - let content = [] - result.forEach(data => { + let contents = [] + let hostnames = [] + results.forEach(data => { + const parseRemoteResult = ____parseRemoteConf(data.body) if (data.body) { - content = content.concat(____parseRemoteConf(data.body)) + contents = contents.concat(parseRemoteResult.contents) + hostnames = hostnames.concat(parseRemoteResult.hostnames) } }); - content = localConf.concat(content) - resolve({ content, result }) + contents = localConf.concat(contents) + hostnames = hostnameConf.concat(hostnames) + resolve({ contents, hostnames, results }) }) } else { - resolve({ content: localConf, result: [] }) + resolve({ contents: localConf, hostnames: hostnameConf, results: [] }) } }) }) const begin = new Date() + const storeObj = {} ____getConf() + //check .then((conf) => { return new Promise((resolve, reject) => { - if (conf.content.length > 0) { - if (__log) console.log(conf.content) - resolve(conf) + if (conf.contents.length > 0) { + storeObj["confResults"] = conf.results + storeObj["confHostnames"] = conf.hostnames + if (__log) console.log(conf.contents) + resolve(conf.contents) } else { let message = "" - conf.result.forEach(data => { + conf.results.forEach(data => { message += message.length > 0 ? "\n" + data.message : data.message }); reject(message.length > 0 ? message : `Unavailable configuration! Please check!`) } }) }) - .then((conf) => { + //parse + .then((contents) => { return new Promise((resolve, reject) => { - const result = ____parseConf(conf.content) - if (result.obj) { - conf["obj"] = result.obj - if (__log) console.log(result.obj) - resolve(conf) + const parseResult = ____parseConf(contents) + if (parseResult.confMap) { + storeObj["confMap"] = parseResult.confMap + storeObj["quanxConfContents"] = parseResult.quanxConfContents + storeObj["surgeConfContents"] = parseResult.surgeConfContents + if (__log) console.log(parseResult.confMap) + if (__log) console.log("quanx\n" + parseResult.quanxConfContents.join("\n")); + if (__log) console.log("surge\n" + parseResult.surgeConfContents.join("\n")); + resolve(parseResult.confMap) } else { - reject(`Configuration information error: ${result.error}`) + reject(`Configuration information error: ${parseResult.error}`) } }) }) - .then((conf) => { - const confObj = conf.obj - const confResult = conf.result - const scriptUrls = Object.keys(confObj) - console.log("Start updating script...") + //download + .then((confMap) => { + const scriptUrls = Object.keys(confMap) __tool.notify("", "", `Start updating ${scriptUrls.length} scripts...`) - ____concurrentQueueLimit(scriptUrls, __concurrencyLimit, (url) => { + console.log("Start updating script...") + return ____concurrentQueueLimit(scriptUrls, __concurrencyLimit, (url) => { const urlRegex = /^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/ return new Promise((resolve) => { if (urlRegex.test(url)) { @@ -101,38 +141,75 @@ if (__tool.isTask) { } }) }) - .then(result => { - console.log("Stop updating script.") - __tool.write(JSON.stringify(confObj), "ScriptConfObjKey") - const resultInfo = (() => { - let message = "" - let success = 0 - let fail = 0 - confResult.concat(result).forEach(data => { - if (data.message.match("success")) success++ - if (data.message.match("fail")) fail++ - message += message.length > 0 ? "\n" + data.message : data.message - }); - return { message, count: { success, fail } } - })() - return resultInfo - }) - .then((resultInfo) => { - const messages = resultInfo.message.split("\n") - const detail = `${messages.slice(0, __showLine).join("\n")}${messages.length > 20 ? `\n${__emoji}......` : ""}` - const summary = `${__emojiSuccess}Success: ${resultInfo.count.success} ${__emojiFail}Fail: ${resultInfo.count.fail} ${__emojiTasks}Tasks: ${____timeDiff(begin, new Date())}s` - const nowDate = `${new Date().Format("yyyy-MM-dd HH:mm:ss")} last update` - const lastDate = __tool.read("ScriptLastUpdateDateKey") - console.log(`${summary}\n${resultInfo.message}\n${lastDate ? lastDate : nowDate}`) - __tool.notify(`${__emojiDone}Update Done`, summary, `${detail}\n${__emoji}${lastDate ? lastDate : nowDate}`) - __tool.write(nowDate, "ScriptLastUpdateDateKey") - __tool.done({}) - }) }) - .catch((error) => { + //write map + .then((scriptResults) => { + console.log("Stop updating script.") + storeObj["scriptResults"] = scriptResults + return __tool.write(JSON.stringify(storeObj.confMap), "ScriptConfObjKey") + }) + //update github + .then(() => { + if (__isUpdateGithub) { + const hostname = `${storeObj.confHostnames.length > 0 ? `hostname=${Array.from(new Set(storeObj.confHostnames)).join(",")}` : ""}` + const quanxUpdateContent = `${hostname}\n\n${Array.from(new Set(storeObj.quanxConfContents)).join("\n\n")}` + const surgeUpdateContent = `${hostname}\n\n${Array.from(new Set(storeObj.surgeConfContents)).join("\n\n")}` + const args = [{ path: __quanxPath, content: quanxUpdateContent, commit: __quanxCommit }, { path: __surgePath, content: surgeUpdateContent, commit: __surgeCommit }] + const update = async () => { + let results = [] + for (let i = 0, len = args.length; i < len; i++) { + const arg = args[i] + if (arg.path.length > 0) { + const result = await ____updateGitHub(arg.path, arg.content, arg.commit) + results.push(result) + } + } + return results + } + return update() + } else { + return null + } + }) + //notify + .then((githubResults) => { + const github = (() => { + let message = "" + if (githubResults && githubResults.length > 0) { + githubResults.forEach((result, index) => { + if (index == 0) message = "🟢" + result.message + message += message.length > 0 ? "\n" + result.url : result.url + }); + } + return message + })() + const confResults = storeObj.confResults + const scriptResults = storeObj.scriptResults + const resultInfo = (() => { + let message = "" + let success = 0 + let fail = 0 + confResults.concat(scriptResults).forEach(data => { + if (data.message.match("success")) success++ + if (data.message.match("fail")) fail++ + message += message.length > 0 ? "\n" + data.message : data.message + }); + return { message, count: { success, fail } } + })() + const messages = resultInfo.message.split("\n") + const detail = `${messages.slice(0, __showLine).join("\n")}${messages.length > 20 ? `\n${__emoji}......` : ""}` + const summary = `${__emojiSuccess}Success: ${resultInfo.count.success} ${__emojiFail}Fail: ${resultInfo.count.fail} ${__emojiTasks}Tasks: ${____timeDiff(begin, new Date())}s` + const nowDate = `${new Date().Format("yyyy-MM-dd HH:mm:ss")} last update` + const lastDate = __tool.read("ScriptLastUpdateDateKey") + console.log(`${summary}\n${resultInfo.message}\n${lastDate ? lastDate : nowDate}`) + __tool.notify(`${__emojiDone}Update Done`, summary, `${detail}\n${__emoji}${lastDate ? lastDate : nowDate}${github.length > 0 ? `\n\n${github}` : ""}`) + __tool.write(nowDate, "ScriptLastUpdateDateKey") __tool.done({}) - __tool.notify("[eval_script.js]", "", error) + }) + .catch((error) => { console.log(error) + __tool.notify("[eval_script.js]", "", error) + __tool.done({}) }) } @@ -234,6 +311,68 @@ if (!__tool.isTask) { } } +async function ____updateGitHub(path, content, message) { + const url = `https://api.github.com/repos/${__owner}/${__repo}/contents/${path}` + const options = { + url: url, + headers: { "Content-Type": "application/json; charset=utf-8", "User-Agent": "eval_script" } + } + if (__token.length > 0) { + options.headers["Authorization"] = `Token ${__token}` + } else { + options.headers["Authorization"] = `Basic ${__base64.encode(`${__username}:${__password}`)}` + } + const body = { + message: message, + content: __base64.encode(content) + } + const getContent = () => { + return new Promise(function (resolve, reject) { + options["method"] = "GET" + __tool.get(options, (error, response, body) => { + if (!error) { + if (__log) console.log(`getContent: ${response.status}\n${body}`) + body = JSON.parse(body) + if (response.status == 200) { + resolve(body.sha) + } else if (response.status == 404) { + resolve(null) + } else { + reject("GitHub update file failed: " + body.message) + } + } else { + reject("GitHub update file failed: " + error) + } + }) + }) + } + const updateContent = (sha) => { + return new Promise(function (resolve, reject) { + if (sha) body["sha"] = sha + options["body"] = JSON.stringify(body) + options["method"] = "PUT" + __tool.put(options, (error, response, body) => { + if (!error) { + if (__log) console.log(`updateContent: ${response.status}\n${body}`) + body = JSON.parse(body) + if (response.status == 200) { + resolve({ url: body.content.download_url, message: "GitHub update file successfully" }) + } else if (response.status == 201) { + resolve({ url: body.content.download_url, message: "GitHub creat file successfully" }) + } else { + reject("GitHub update file failed: " + body.message) + } + } else { + reject("GitHub update file failed: " + error) + } + }) + }) + } + const sha = await getContent() + const result = await updateContent(sha) + return result +} + function ____parseDevelopmentModeConf(conf) { const localConf = ____removeAnnotation(____extractConf(__conf, "eval_local")) const result = ____parseConf(localConf) @@ -287,6 +426,13 @@ function ____downloadFile(url) { }) } +function ____parseHostname(hostnames) { + if (hostnames.length > 0 && hostnames[0].length > 0) { + hostnames = hostnames[0].replace(/\s/g, "").split(",") + } + return hostnames +} + function ____extractConf(conf, type) { const rex = new RegExp("\\[" + type + "\\](.|\\n)*?(?=\\n($|\\[))", "g") let result = rex.exec(conf) @@ -302,6 +448,7 @@ function ____extractConf(conf, type) { function ____parseRemoteConf(conf) { const lines = conf.split("\n") let newLines = [] + let hostnames = [] for (let i = 0, len = lines.length; i < len; i++) { const eval = /^(.+)\s+eval\s+(.+)$/ const surge = /^http\s*-\s*(request|response)\s+(\S+)\s+(.+)$/ @@ -321,46 +468,70 @@ function ____parseRemoteConf(conf) { newLines.push(line) } } + if (/^hostname\s*=\s*.+/.test(line)) { + hostnames = line.replace(/\s/g, "").replace(/hostname=/, "").split(",") + } } } } - return newLines + return { contents: newLines, hostnames } } function ____parseConf(lines) { - let confObj = {} + let confMap = {} + let quanxConfContents = [] + let surgeConfContents = [] for (let i = 0, len = lines.length; i < len; i++) { let line = lines[i].trim() if (line.length > 0 && line.substring(0, 2) != "//" && line.substring(0, 1) != "#") { const eval = /^(.+)\s+eval\s+(.+)$/ const surge = /^http\s*-\s*(request|response)\s+(\S+)\s+(.+)$/ - const quanx = /^(\S+)\s+url\s+script\s*-\s*(\S+)\s*-\s*(?:header|body)\s+(\S+)$/ + const quanx = /^(\S+)\s+url\s+script\s*-\s*(\S+)\s+(\S+\.js)$/ if (surge.test(line)) { const result = line.match(surge) - line = `${result[1].trim()} ${result[2].trim()} eval ${____surgeScriptPath(result[3].trim())}` + // content + const requiresBody = ____surgeArg(result[3].trim()).requiresBody + surgeConfContents.push(`${line.replace(____surgeArg(result[3].trim()).scriptPath, "eval_script.js")}`) + quanxConfContents.push(`${result[2].trim()} url script-${result[1].trim()}-${requiresBody == "1" ? "body" : "header"} eval_script.js`) + //eval + line = `${result[1].trim()} ${result[2].trim()} eval ${____surgeArg(result[3].trim()).scriptPath}` } else if (quanx.test(line)) { const result = line.match(quanx) - line = `${result[2].trim()} ${result[1].trim()} eval ${result[3].trim()}` + const type = result[2].split("-") + //content + let requires = 0 + if (type[0].trim() == "response") { + requires = 1 + } else { + if (type[1].trim() == "body") { + requires = 1 + } + } + surgeConfContents.push(`http-${type[0].trim()} ${result[1].trim()} ${requires == 0 ? "" : `requires-body=${requires},`}script-path=eval_script.js`) + quanxConfContents.push(`${line.replace(result[3].trim(), "eval_script.js")}`) + //eval + line = `${type[0].trim()} ${result[1].trim()} eval ${result[3].trim()}` + } if (eval.test(line)) { const value = line.match(eval) const remote = value[2].trim() const match = ____parseMatch(value[1].trim()) if (remote.length > 0 && match.length > 0) { - if (confObj.hasOwnProperty(remote)) { - confObj[remote] = confObj[remote].concat(match) + if (confMap.hasOwnProperty(remote)) { + confMap[remote] = confMap[remote].concat(match) } else { - confObj[remote] = match + confMap[remote] = match } } else { - return { obj: null, error: line } + return { confMap: null, quanxConfContents, surgeConfContents, error: line } } } else { - return { obj: null, error: line } + return { confMap: null, quanxConfContents, surgeConfContents, error: line } } } } - return { obj: confObj, error: null } + return { confMap, quanxConfContents, surgeConfContents, error: null } } function ____parseMatch(match) { @@ -384,18 +555,21 @@ function ____parseMatch(match) { return matchs } -function ____surgeScriptPath(arg) { - let scriptPath = "" +function ____surgeArg(arg) { + let surgeArg = {} const args = arg.split(",") for (let i = 0, len = args.length; i < len; i++) { const item = args[i].trim() const path = /^script-path\s*=\s*(\S+)$/ + const requires = /^requires-body\s*=\s*(\S+)$/ if (path.test(item)) { - scriptPath = item.match(path)[1] - break + surgeArg["scriptPath"] = item.match(path)[1] + } + if (requires.test(item)) { + surgeArg["requiresBody"] = item.match(requires)[1] } } - return scriptPath + return surgeArg } function ____removeAnnotation(lines) { @@ -471,6 +645,11 @@ function ____Tool() { if (_isSurge) $httpClient.get(options, (error, response, body) => { callback(error, _status(response), body) }) if (_node) _node.request(options, (error, response, body) => { callback(error, _status(response), body) }) } + this.put = (options, callback) => { + if (_isQuanX) $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) + if (_isSurge) $httpClient.put(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request(options, (error, response, body) => { callback(error, _status(response), body) }) + } this.post = (options, callback) => { if (_isQuanX) { if (typeof options == "string") options = { url: options } @@ -492,6 +671,105 @@ function ____Tool() { } } +function ____Base64() { + // private property + _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + // public method for encoding + this.encode = function (input) { + var output = ""; + var chr1, chr2, chr3, enc1, enc2, enc3, enc4; + var i = 0; + input = _utf8_encode(input); + while (i < input.length) { + chr1 = input.charCodeAt(i++); + chr2 = input.charCodeAt(i++); + chr3 = input.charCodeAt(i++); + enc1 = chr1 >> 2; + enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); + enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); + enc4 = chr3 & 63; + if (isNaN(chr2)) { + enc3 = enc4 = 64; + } else if (isNaN(chr3)) { + enc4 = 64; + } + output = output + + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + + _keyStr.charAt(enc3) + _keyStr.charAt(enc4); + } + return output; + } + // public method for decoding + this.decode = function (input) { + var output = ""; + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0; + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); + while (i < input.length) { + enc1 = _keyStr.indexOf(input.charAt(i++)); + enc2 = _keyStr.indexOf(input.charAt(i++)); + enc3 = _keyStr.indexOf(input.charAt(i++)); + enc4 = _keyStr.indexOf(input.charAt(i++)); + chr1 = (enc1 << 2) | (enc2 >> 4); + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); + chr3 = ((enc3 & 3) << 6) | enc4; + output = output + String.fromCharCode(chr1); + if (enc3 != 64) { + output = output + String.fromCharCode(chr2); + } + if (enc4 != 64) { + output = output + String.fromCharCode(chr3); + } + } + output = _utf8_decode(output); + return output; + } + // private method for UTF-8 encoding + _utf8_encode = function (string) { + string = string.replace(/\r\n/g, "\n"); + var utftext = ""; + for (var n = 0; n < string.length; n++) { + var c = string.charCodeAt(n); + if (c < 128) { + utftext += String.fromCharCode(c); + } else if ((c > 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + + } + return utftext; + } + // private method for UTF-8 decoding + _utf8_decode = function (utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + while (i < utftext.length) { + c = utftext.charCodeAt(i); + if (c < 128) { + string += String.fromCharCode(c); + i++; + } else if ((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i + 1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } else { + c2 = utftext.charCodeAt(i + 1); + c3 = utftext.charCodeAt(i + 2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + } + return string; + } +} + Date.prototype.Format = function (fmt) { var o = { "M+": this.getMonth() + 1, From 8bb6e7238e937ba7011c7c06f080139449e597cf Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 25 Mar 2020 19:15:21 +0800 Subject: [PATCH 0309/1191] Delete sub_eval_conf.txt --- sub_eval_conf.txt | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 sub_eval_conf.txt diff --git a/sub_eval_conf.txt b/sub_eval_conf.txt deleted file mode 100644 index 97acb8e8b..000000000 --- a/sub_eval_conf.txt +++ /dev/null @@ -1,2 +0,0 @@ -http-request ^https://.*(? Date: Wed, 25 Mar 2020 23:40:41 +0800 Subject: [PATCH 0310/1191] Update sub_script.conf --- sub_script.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sub_script.conf b/sub_script.conf index 75416add1..148941c84 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -13,4 +13,4 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com # wb ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js From 15300258a5b21eab649c21cb41998f39327063d8 Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 25 Mar 2020 23:53:39 +0800 Subject: [PATCH 0311/1191] update --- eval_script.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/eval_script.js b/eval_script.js index e0a7817d5..47570d34a 100644 --- a/eval_script.js +++ b/eval_script.js @@ -155,6 +155,7 @@ if (__tool.isTask) { const quanxUpdateContent = `${hostname}\n\n${Array.from(new Set(storeObj.quanxConfContents)).join("\n\n")}` const surgeUpdateContent = `${hostname}\n\n${Array.from(new Set(storeObj.surgeConfContents)).join("\n\n")}` const args = [{ path: __quanxPath, content: quanxUpdateContent, commit: __quanxCommit }, { path: __surgePath, content: surgeUpdateContent, commit: __surgeCommit }] + console.log("Start updating github...") const update = async () => { let results = [] for (let i = 0, len = args.length; i < len; i++) { @@ -164,6 +165,7 @@ if (__tool.isTask) { results.push(result) } } + console.log("Stop updating github.") return results } return update() @@ -201,7 +203,7 @@ if (__tool.isTask) { const summary = `${__emojiSuccess}Success: ${resultInfo.count.success} ${__emojiFail}Fail: ${resultInfo.count.fail} ${__emojiTasks}Tasks: ${____timeDiff(begin, new Date())}s` const nowDate = `${new Date().Format("yyyy-MM-dd HH:mm:ss")} last update` const lastDate = __tool.read("ScriptLastUpdateDateKey") - console.log(`${summary}\n${resultInfo.message}\n${lastDate ? lastDate : nowDate}`) + console.log(`\n${summary}\n${resultInfo.message}\n${lastDate ? lastDate : nowDate}${github.length > 0 ? `\n\n${github}` : ""}`) __tool.notify(`${__emojiDone}Update Done`, summary, `${detail}\n${__emoji}${lastDate ? lastDate : nowDate}${github.length > 0 ? `\n\n${github}` : ""}`) __tool.write(nowDate, "ScriptLastUpdateDateKey") __tool.done({}) @@ -412,14 +414,14 @@ function ____downloadFile(url) { if (!error) { const code = response.statusCode if (code == 200) { - console.log(`update Success: ${url}`) + console.log(`update success: ${url}`) resolve({ url, code, body, message: `${__emoji}${filename} update success` }) } else { - console.log(`update Fail ${response.statusCode}: ${url}`) + console.log(`update fail ${response.statusCode}: ${url}`) resolve({ url, code, body, message: `${__emoji}${filename} update fail` }) } } else { - console.log(`update Fail ${error}`) + console.log(`update fail ${error}`) resolve({ url, code: null, body: null, message: `${__emoji}${filename} update fail` }) } }) @@ -493,12 +495,12 @@ function ____parseConf(lines) { const requiresBody = ____surgeArg(result[3].trim()).requiresBody surgeConfContents.push(`${line.replace(____surgeArg(result[3].trim()).scriptPath, "eval_script.js")}`) quanxConfContents.push(`${result[2].trim()} url script-${result[1].trim()}-${requiresBody == "1" ? "body" : "header"} eval_script.js`) - //eval + // eval line = `${result[1].trim()} ${result[2].trim()} eval ${____surgeArg(result[3].trim()).scriptPath}` } else if (quanx.test(line)) { const result = line.match(quanx) const type = result[2].split("-") - //content + // content let requires = 0 if (type[0].trim() == "response") { requires = 1 @@ -509,7 +511,7 @@ function ____parseConf(lines) { } surgeConfContents.push(`http-${type[0].trim()} ${result[1].trim()} ${requires == 0 ? "" : `requires-body=${requires},`}script-path=eval_script.js`) quanxConfContents.push(`${line.replace(result[3].trim(), "eval_script.js")}`) - //eval + // eval line = `${type[0].trim()} ${result[1].trim()} eval ${result[3].trim()}` } From b85385adf1277385048834a3acf99a0ec77c4123 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 26 Mar 2020 09:28:13 +0800 Subject: [PATCH 0312/1191] commit from INSOMNIA --- eval_script/quanx.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 eval_script/quanx.txt diff --git a/eval_script/quanx.txt b/eval_script/quanx.txt new file mode 100644 index 000000000..f3ca61040 --- /dev/null +++ b/eval_script/quanx.txt @@ -0,0 +1 @@ +你好 \ No newline at end of file From 93ff6bc44a4d7c2cec2413e1db16a306ed44ac4b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 26 Mar 2020 09:45:19 +0800 Subject: [PATCH 0313/1191] update --- quanx.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 quanx.txt diff --git a/quanx.txt b/quanx.txt new file mode 100644 index 000000000..2cc192cd4 --- /dev/null +++ b/quanx.txt @@ -0,0 +1,15 @@ +hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js + +^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body eval_script.js + +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js + +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js + +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) url script-response-body eval_script.js \ No newline at end of file From 2604afb74b96e74c259b99d8682652c0627ae9cf Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 26 Mar 2020 09:46:03 +0800 Subject: [PATCH 0314/1191] update From 2696d86bd69688d05ad288e5d7511c61629a3383 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 26 Mar 2020 09:46:06 +0800 Subject: [PATCH 0315/1191] update --- 22.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 22.txt diff --git a/22.txt b/22.txt new file mode 100644 index 000000000..91a50ec5a --- /dev/null +++ b/22.txt @@ -0,0 +1,15 @@ +hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js + +http-response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=eval_script.js + +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js + +http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=eval_script.js + +http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js + +http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=eval_script.js + +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) requires-body=1,script-path=eval_script.js \ No newline at end of file From 7b5f7570335f66b14e41a7ccb13be2f4a902d84e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 26 Mar 2020 09:47:59 +0800 Subject: [PATCH 0316/1191] update From 84c157672230c8dc91ab34aa57ab270f780e6978 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 26 Mar 2020 09:48:02 +0800 Subject: [PATCH 0317/1191] update --- surge.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 surge.txt diff --git a/surge.txt b/surge.txt new file mode 100644 index 000000000..91a50ec5a --- /dev/null +++ b/surge.txt @@ -0,0 +1,15 @@ +hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js + +http-response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=eval_script.js + +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js + +http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=eval_script.js + +http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js + +http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=eval_script.js + +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) requires-body=1,script-path=eval_script.js \ No newline at end of file From 27d0229c8cffe4a6e6472cea7aeeaee28b2fed20 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 26 Mar 2020 09:49:21 +0800 Subject: [PATCH 0318/1191] Delete quanx.txt --- eval_script/quanx.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 eval_script/quanx.txt diff --git a/eval_script/quanx.txt b/eval_script/quanx.txt deleted file mode 100644 index f3ca61040..000000000 --- a/eval_script/quanx.txt +++ /dev/null @@ -1 +0,0 @@ -你好 \ No newline at end of file From ec575e6edfe13d61b7c4786ec5b49cd55f81033f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 26 Mar 2020 09:49:30 +0800 Subject: [PATCH 0319/1191] Delete 22.txt --- 22.txt | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 22.txt diff --git a/22.txt b/22.txt deleted file mode 100644 index 91a50ec5a..000000000 --- a/22.txt +++ /dev/null @@ -1,15 +0,0 @@ -hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com - -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js - -http-response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=eval_script.js - -http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js - -http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=eval_script.js - -http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js - -http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=eval_script.js - -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) requires-body=1,script-path=eval_script.js \ No newline at end of file From ff1ad4259398395188b5fdf17f53bb94ae4f76fe Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 26 Mar 2020 09:49:45 +0800 Subject: [PATCH 0320/1191] Delete quanx.txt --- quanx.txt | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 quanx.txt diff --git a/quanx.txt b/quanx.txt deleted file mode 100644 index 2cc192cd4..000000000 --- a/quanx.txt +++ /dev/null @@ -1,15 +0,0 @@ -hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com - -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js - -^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body eval_script.js - -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js - -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js - -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) url script-response-body eval_script.js \ No newline at end of file From f3880d0325b229aa504f9cdebc7c894bfd782ec8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 26 Mar 2020 09:49:56 +0800 Subject: [PATCH 0321/1191] Delete surge.txt --- surge.txt | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 surge.txt diff --git a/surge.txt b/surge.txt deleted file mode 100644 index 91a50ec5a..000000000 --- a/surge.txt +++ /dev/null @@ -1,15 +0,0 @@ -hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com - -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js - -http-response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=eval_script.js - -http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js - -http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=eval_script.js - -http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js - -http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=eval_script.js - -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) requires-body=1,script-path=eval_script.js \ No newline at end of file From 012e0107aaa46dff16fdcf043c2e8cc60b686653 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 26 Mar 2020 09:50:41 +0800 Subject: [PATCH 0322/1191] update --- eval_sub/quanx.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 eval_sub/quanx.txt diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt new file mode 100644 index 000000000..2cc192cd4 --- /dev/null +++ b/eval_sub/quanx.txt @@ -0,0 +1,15 @@ +hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js + +^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body eval_script.js + +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js + +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js + +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) url script-response-body eval_script.js \ No newline at end of file From 0c1c5cf2f68cceaa75f152d7d977eae4421f656a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 26 Mar 2020 09:50:44 +0800 Subject: [PATCH 0323/1191] update --- eval_sub/surge.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 eval_sub/surge.txt diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt new file mode 100644 index 000000000..91a50ec5a --- /dev/null +++ b/eval_sub/surge.txt @@ -0,0 +1,15 @@ +hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js + +http-response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=eval_script.js + +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js + +http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=eval_script.js + +http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js + +http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=eval_script.js + +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) requires-body=1,script-path=eval_script.js \ No newline at end of file From a505fff7a9b173e0853372ca4e14a12b6b4e6d96 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 26 Mar 2020 09:54:10 +0800 Subject: [PATCH 0324/1191] update --- eval_script.js | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/eval_script.js b/eval_script.js index 47570d34a..8464b7778 100644 --- a/eval_script.js +++ b/eval_script.js @@ -19,7 +19,7 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf // 是否开启 GitHub 更新 const __isUpdateGithub = true -// GitHub Token( Token 优先级高,如果不使用 Token 请设置为空 "") +// GitHub Token(如果使用账号密码 Token 请设置为空 "") const __token = "" // GitHub 账号 const __username = "xxx" @@ -29,10 +29,12 @@ const __password = "xxx" const __owner = "yichahucha" // GitHub 仓库名 const __repo = "surge" -// GitHub 文件路径(没有文件新生成,已有文件覆盖,路径为空 "" 不更新) -const __quanxPath = "eval_script/quanx.txt" -const __surgePath = "eval_script/surge.txt" -// GitHub 提交日志 +// GitHub 分支(不指定就使用默认分支) +const __branch = "master" +// GitHub 文件路径(没有文件新创建,已有文件覆盖更新,路径为空 "" 不更新) +const __quanxPath = "eval_sub/quanx.txt" +const __surgePath = "eval_sub/surge.txt" +// GitHub 更新日志 const __quanxCommit = "update" const __surgeCommit = "update" @@ -317,19 +319,16 @@ async function ____updateGitHub(path, content, message) { const url = `https://api.github.com/repos/${__owner}/${__repo}/contents/${path}` const options = { url: url, - headers: { "Content-Type": "application/json; charset=utf-8", "User-Agent": "eval_script" } + headers: { "Content-Type": "application/json; charset=utf-8", "User-Agent": "eval_script.js" } } if (__token.length > 0) { options.headers["Authorization"] = `Token ${__token}` } else { options.headers["Authorization"] = `Basic ${__base64.encode(`${__username}:${__password}`)}` } - const body = { - message: message, - content: __base64.encode(content) - } const getContent = () => { return new Promise(function (resolve, reject) { + if (__branch.length > 0) options.url += `?ref=${__branch}` options["method"] = "GET" __tool.get(options, (error, response, body) => { if (!error) { @@ -350,7 +349,13 @@ async function ____updateGitHub(path, content, message) { } const updateContent = (sha) => { return new Promise(function (resolve, reject) { + const body = { + message: message, + content: __base64.encode(content) + } + if (__branch) body["branch"] = __branch if (sha) body["sha"] = sha + options.url = url options["body"] = JSON.stringify(body) options["method"] = "PUT" __tool.put(options, (error, response, body) => { From f5bed449711ac6316405d394d2269150a02649fc Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 26 Mar 2020 11:43:03 +0800 Subject: [PATCH 0325/1191] update From 82ed94b12931f1656ebd2e2c1edbd6848df2e2af Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 26 Mar 2020 11:43:06 +0800 Subject: [PATCH 0326/1191] update From a78fd66888d6a3829b784efce4f086d420113872 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 26 Mar 2020 11:45:43 +0800 Subject: [PATCH 0327/1191] update From e43d615396af9bf7340964e1afed79549abbe042 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 26 Mar 2020 11:45:50 +0800 Subject: [PATCH 0328/1191] update From 732d49c2943aea62fd8b29e65fcd93e733e6b947 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:17:26 +0800 Subject: [PATCH 0329/1191] Update README.md --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/README.md b/README.md index 5edfe34e5..b73a39a79 100644 --- a/README.md +++ b/README.md @@ -113,3 +113,59 @@ Script management tool [task_local] 0 0 * * * eval_script.js ``` + +# eval_script.js 使用示例(QuanX举例,Surge 同理) + +```properties +1.设置任务 + +[task_local] +0 0 * * * eval_script.js + +2.配置脚本 + +[Remote] +# 可以使用 QuanX 远程复写(如果订阅不包含 hostname,需配置 [Hostname] ) + +https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf + + +[Local] +# 可以使用 Surge 或者 QuanX 格式脚本(需配置 [Hostname]) + +# jd(Surge) +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js + +# tb(QuanX) +^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + + +[Hostname] + +api.m.jd.com, trade-acs.m.taobao.com + + +3.配置 GitHub + +# GitHub Token(如果使用账号密码 Token 请设置为空 "") +const __token = "" +# GitHub 账号 +const __username = "xxx" +# GitHub 密码 +const __password = "xxx" +# GitHub 用户名 +const __owner = "yichahucha" +# GitHub 仓库名 +const __repo = "surge" +# GitHub 分支(不指定就使用默认分支) +const __branch = "master" +# GitHub 文件路径(没有文件新创建,已有文件覆盖更新) +# 默认生成两个文件,不需要的路径设置为空 “” +const __quanxPath = "eval_sub/quanx.txt" +const __surgePath = "eval_sub/surge.txt" + +4.执行任务更新脚本 + +5.在 QuanX 订阅 GitHub 生成的文件 +``` From 24ed437a73ad5f709667c907c356c7d248c79f72 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:17:53 +0800 Subject: [PATCH 0330/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b73a39a79..fcb6eb47a 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Script management tool 0 0 * * * eval_script.js ``` -# eval_script.js 使用示例(QuanX举例,Surge 同理) +# eval_script.js 使用示例(QuanX 举例,Surge 同理) ```properties 1.设置任务 From b70c9bb20333a64537fb018ecccb4b380bd0d42d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:20:12 +0800 Subject: [PATCH 0331/1191] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fcb6eb47a..606bd417d 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Script management tool 0 0 * * * eval_script.js ``` -# eval_script.js 使用示例(QuanX 举例,Surge 同理) +# eval_script.js 使用示例(QuanX举例,Surge 同理) ```properties 1.设置任务 @@ -122,6 +122,7 @@ Script management tool [task_local] 0 0 * * * eval_script.js + 2.配置脚本 [Remote] @@ -129,7 +130,6 @@ Script management tool https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf - [Local] # 可以使用 Surge 或者 QuanX 格式脚本(需配置 [Hostname]) @@ -140,7 +140,6 @@ http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - [Hostname] api.m.jd.com, trade-acs.m.taobao.com @@ -165,7 +164,9 @@ const __branch = "master" const __quanxPath = "eval_sub/quanx.txt" const __surgePath = "eval_sub/surge.txt" + 4.执行任务更新脚本 + 5.在 QuanX 订阅 GitHub 生成的文件 ``` From 01266fc7bfa2a049a8b8acd0deb8935c3f078768 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:35:36 +0800 Subject: [PATCH 0332/1191] update From b3e0ea5bda42e9f20fca4f8b54b9784aa9e377d3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:35:38 +0800 Subject: [PATCH 0333/1191] update From 216b8cf9d0f28cbfdac7bd1e2cb07169bf75d9b8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:36:48 +0800 Subject: [PATCH 0334/1191] update From be3fb5abc9af8fb000219a451f7d8fc750626656 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:36:50 +0800 Subject: [PATCH 0335/1191] update From 9b9e26296c81d042f3e638b2beb0d1c43ea4f38f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:37:31 +0800 Subject: [PATCH 0336/1191] update From f7184e969af7d56ee4072e8d8309039f25a4bd61 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:37:34 +0800 Subject: [PATCH 0337/1191] update From e7232d4c7e0d6eeeb9383b2bc25d1cb45e795f2d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:39:15 +0800 Subject: [PATCH 0338/1191] update From beadac8d6ae3b4045eac34f7c82eb70c3685314c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:39:17 +0800 Subject: [PATCH 0339/1191] update From fa2c4d0cd56b1f873d55daeec7552efbf155d9fd Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:51:30 +0800 Subject: [PATCH 0340/1191] update From fcc91220b7b2962699c5ad404cdeea0c2917da96 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:51:33 +0800 Subject: [PATCH 0341/1191] update From bf3cacff9d576ef70e87055bc2d1240b7bfd76ae Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:55:39 +0800 Subject: [PATCH 0342/1191] update From 222687e56669eb195c03fa04e492b2ef02085923 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:55:42 +0800 Subject: [PATCH 0343/1191] update From 6e9b34cbcbe7d776c8a4c02f7301300a6364f92f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:56:50 +0800 Subject: [PATCH 0344/1191] update From 2425a49354b39029222349327643c74f70811e45 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:56:52 +0800 Subject: [PATCH 0345/1191] update From e6786e056aa5a8d07f2116aa641ac07d6b5584f1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:01:34 +0800 Subject: [PATCH 0346/1191] update From 2ac83a97e1584b7d5b83f124e6b7b52082dfb642 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:01:36 +0800 Subject: [PATCH 0347/1191] update From 36a479eff4b7213a0a54ed2fb9da2cbc1d00eb9a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:11:24 +0800 Subject: [PATCH 0348/1191] update From aaf121560e294a817c5a75cb864559c74708ad48 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:11:27 +0800 Subject: [PATCH 0349/1191] update From 384e7dc9bc623ee23b576d23bab16f679095eec7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:13:39 +0800 Subject: [PATCH 0350/1191] update From d1e82a9bec8e172323aaff4d72cba04c59575028 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:13:42 +0800 Subject: [PATCH 0351/1191] update From 802c1cf21491a667d16de269c34960aedde1cd95 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:15:09 +0800 Subject: [PATCH 0352/1191] update From b2c5af9919a0bddea30aae2f0cb583350aa542ac Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:15:11 +0800 Subject: [PATCH 0353/1191] update From feb1e00d6a4187c27d17930e6a6278c66e082192 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:17:36 +0800 Subject: [PATCH 0354/1191] update From 64b55459864585471381dbd8296d0ea846d6cffb Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:17:38 +0800 Subject: [PATCH 0355/1191] update From a5f20acb97bc15cbbfe11e31225101ed35393416 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:19:52 +0800 Subject: [PATCH 0356/1191] update From 7802d84acf80b2a5ddc2c5a4b16aed0a2207a0ef Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:19:55 +0800 Subject: [PATCH 0357/1191] update From 2b5cd98582e1a175cd2b4127905a777a7a1421d2 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:31:57 +0800 Subject: [PATCH 0358/1191] update --- eval_sub/quanx.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index 2cc192cd4..3e52a96bb 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,4 +1,4 @@ -hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js From 0642033565d5f38742434406eead62ec99350653 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:32:00 +0800 Subject: [PATCH 0359/1191] update --- eval_sub/surge.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index 91a50ec5a..3539ca250 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,4 +1,4 @@ -hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js From aa8aab1ab60476d70d87c3e37159b396fcaf446c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:39:15 +0800 Subject: [PATCH 0360/1191] update From 06da633418cb1cd72778d27b26ef3b1413ff795d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:39:17 +0800 Subject: [PATCH 0361/1191] update From 047146959f7751942a8ecdc8574f47ec3f6cc05c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:41:47 +0800 Subject: [PATCH 0362/1191] update From c80487a83a4eb7a201218f489a5d4d830327009f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:41:50 +0800 Subject: [PATCH 0363/1191] update From bfa0335c1865dbd1264e68bf7592bb7f6cbb9fee Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:44:40 +0800 Subject: [PATCH 0364/1191] update From 7488a82330e0b17b4e82b8b74651b8ba76a781fa Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:44:42 +0800 Subject: [PATCH 0365/1191] update From f8108405c7ae2a4b746e5b35f0e03f6e5a80264f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:52:14 +0800 Subject: [PATCH 0366/1191] update From 6b696df212fbb4bfeb9fd6d520b2c1e7dcf111cf Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:52:17 +0800 Subject: [PATCH 0367/1191] update From 65bbb5468dc86506306c91c1eafa132f01ef3465 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:53:45 +0800 Subject: [PATCH 0368/1191] update From cc4e209648688d64fffc46dba040d0b773ea5c45 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:53:48 +0800 Subject: [PATCH 0369/1191] update From f5320378d7bc2fb8641da575126afa11fd43570f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:55:38 +0800 Subject: [PATCH 0370/1191] update --- eval_sub/quanx.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index 3e52a96bb..2cc192cd4 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,4 +1,4 @@ - +hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js From 9191311d571dfab1368e647906cb7915ef005c81 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:55:41 +0800 Subject: [PATCH 0371/1191] update --- eval_sub/surge.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index 3539ca250..91a50ec5a 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,4 +1,4 @@ - +hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js From 349899f4dfd97585606097f02055c2ea3c00596e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:57:08 +0800 Subject: [PATCH 0372/1191] update From cdc587833edb3bcba8094cf735a31e455151f4cb Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:57:11 +0800 Subject: [PATCH 0373/1191] update From d8e51b70fa835bc7b1927c1cfb581db6b91409a1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:58:25 +0800 Subject: [PATCH 0374/1191] update From 0b653b5be3add67c6fa5b7cced545d0d77d229c0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:58:28 +0800 Subject: [PATCH 0375/1191] update From 35139c66e8a17cefcb9c6aa6806bc29dae089283 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:59:36 +0800 Subject: [PATCH 0376/1191] update From a93affc470fd3fab208bbe2f7208f66a6b934894 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:59:39 +0800 Subject: [PATCH 0377/1191] update From 03b164b900d09fd63ac9912edb0d1d50b26fd237 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 16:00:31 +0800 Subject: [PATCH 0378/1191] update From 6517182356a912d06e322ebb84405047669730a0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 16:00:33 +0800 Subject: [PATCH 0379/1191] update From dc07190b2eeb4de4ed05e9fe8431366aff22fd30 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 16:04:24 +0800 Subject: [PATCH 0380/1191] update From fc9e67caededcb2042a4f412630b8de783f719b1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 16:05:11 +0800 Subject: [PATCH 0381/1191] update From ac546750566e07d03db9358364612a551b4e6ddd Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 16:06:36 +0800 Subject: [PATCH 0382/1191] update From 412b9222af9b4a5447f91b93a667d3edc73dcda6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 16:07:05 +0800 Subject: [PATCH 0383/1191] update From 3f81fa6cf6f910f563b1b18d99cbec88d753f00e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 16:07:15 +0800 Subject: [PATCH 0384/1191] update From 5de24ae61cd0522684728f36c03faccbaa6f86bf Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 16:07:50 +0800 Subject: [PATCH 0385/1191] update From 42ae193269dce2ad20a7c98496c22128c5c53d1e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 16:08:15 +0800 Subject: [PATCH 0386/1191] update From 4c029b4b8a357686bd7aeb914858793c2f571bc0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 16:08:17 +0800 Subject: [PATCH 0387/1191] update From 5dc95060826502f58b0f68d4f5b073498f7e46b4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 16:09:45 +0800 Subject: [PATCH 0388/1191] update From fd472e68922cf777557a33f0a14531effcd3a2c2 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 16:09:48 +0800 Subject: [PATCH 0389/1191] update From 3c532d623c8218f863ff5cc2ba423475e9817d12 Mon Sep 17 00:00:00 2001 From: goose Date: Fri, 27 Mar 2020 16:13:18 +0800 Subject: [PATCH 0390/1191] update --- eval_script.js | 51 ++++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/eval_script.js b/eval_script.js index 8464b7778..b2220b98a 100644 --- a/eval_script.js +++ b/eval_script.js @@ -38,11 +38,13 @@ const __surgePath = "eval_sub/surge.txt" const __quanxCommit = "update" const __surgeCommit = "update" -const __emoji = "• " -const __emojiDone = "✔️" -const __emojiTasks = "🕐" +const __emojiDone = "" const __emojiFail = "🙃" const __emojiSuccess = "😀" +const __emojiTasks = "🕐" +const __emojiUpdateSuccess = "🟢" +const __emojiUpdateFail = "🟠" +const __emojiGitHub = "🔵" const __showLine = 20 const __log = false @@ -139,7 +141,7 @@ if (__tool.isTask) { }) } else { __tool.write(url, url) - resolve({ body: url, url, message: `${__emoji}${url} function set success` }) + resolve({ body: url, url, message: `${__emojiUpdateSuccess}${url} function set successfully` }) } }) }) @@ -181,8 +183,8 @@ if (__tool.isTask) { let message = "" if (githubResults && githubResults.length > 0) { githubResults.forEach((result, index) => { - if (index == 0) message = "🟢" + result.message - message += message.length > 0 ? "\n" + result.url : result.url + if (index == 0) message = result.message + message += message.length > 0 ? "\n" + __emojiGitHub + result.url : __emojiGitHub + result.url }); } return message @@ -201,12 +203,13 @@ if (__tool.isTask) { return { message, count: { success, fail } } })() const messages = resultInfo.message.split("\n") - const detail = `${messages.slice(0, __showLine).join("\n")}${messages.length > 20 ? `\n${__emoji}......` : ""}` - const summary = `${__emojiSuccess}Success: ${resultInfo.count.success} ${__emojiFail}Fail: ${resultInfo.count.fail} ${__emojiTasks}Tasks: ${____timeDiff(begin, new Date())}s` - const nowDate = `${new Date().Format("yyyy-MM-dd HH:mm:ss")} last update` + const detail = `${messages.slice(0, __showLine).join("\n")}${messages.length > 20 ? `\n${__emojiUpdateSuccess}......` : ""}` + const summary = `${__emojiSuccess}success: ${resultInfo.count.success} ${__emojiFail}fail: ${resultInfo.count.fail} ${__emojiTasks}tasks: ${____timeDiff(begin, new Date())}s` + const nowDate = `${new Date().Format("yyyy-MM-dd HH:mm:ss")} last updated` const lastDate = __tool.read("ScriptLastUpdateDateKey") - console.log(`\n${summary}\n${resultInfo.message}\n${lastDate ? lastDate : nowDate}${github.length > 0 ? `\n\n${github}` : ""}`) - __tool.notify(`${__emojiDone}Update Done`, summary, `${detail}\n${__emoji}${lastDate ? lastDate : nowDate}${github.length > 0 ? `\n\n${github}` : ""}`) + const date = `${__emojiTasks}${lastDate ? lastDate : nowDate}` + console.log(`\n${summary}\n${resultInfo.message}${github.length > 0 ? `\n${github}` : ""}\n${date}`) + __tool.notify(`${__emojiDone}Update Done`, summary, `${detail}${github.length > 0 ? `\n${github}` : ""}\n${date}`) __tool.write(nowDate, "ScriptLastUpdateDateKey") __tool.done({}) }) @@ -339,10 +342,10 @@ async function ____updateGitHub(path, content, message) { } else if (response.status == 404) { resolve(null) } else { - reject("GitHub update file failed: " + body.message) + reject("GitHub update failed: " + body.message) } } else { - reject("GitHub update file failed: " + error) + reject("GitHub update failed: " + error) } }) }) @@ -363,14 +366,14 @@ async function ____updateGitHub(path, content, message) { if (__log) console.log(`updateContent: ${response.status}\n${body}`) body = JSON.parse(body) if (response.status == 200) { - resolve({ url: body.content.download_url, message: "GitHub update file successfully" }) + resolve({ url: body.content.download_url, message: `${__emojiGitHub}GitHub updated successfully` }) } else if (response.status == 201) { - resolve({ url: body.content.download_url, message: "GitHub creat file successfully" }) + resolve({ url: body.content.download_url, message: `${__emojiGitHub}GitHub file created successfully` }) } else { - reject("GitHub update file failed: " + body.message) + reject("GitHub update failed: " + body.message) } } else { - reject("GitHub update file failed: " + error) + reject("GitHub update failed: " + error) } }) }) @@ -419,15 +422,15 @@ function ____downloadFile(url) { if (!error) { const code = response.statusCode if (code == 200) { - console.log(`update success: ${url}`) - resolve({ url, code, body, message: `${__emoji}${filename} update success` }) + console.log(`updated successfully: ${url}`) + resolve({ url, code, body, message: `${__emojiUpdateSuccess}${filename} updated successfully` }) } else { - console.log(`update fail ${response.statusCode}: ${url}`) - resolve({ url, code, body, message: `${__emoji}${filename} update fail` }) + console.log(`update failed ${response.statusCode}: ${url}`) + resolve({ url, code, body, message: `${__emojiUpdateFail}${filename} update failed` }) } } else { - console.log(`update fail ${error}`) - resolve({ url, code: null, body: null, message: `${__emoji}${filename} update fail` }) + console.log(`updated faile ${error}`) + resolve({ url, code: null, body: null, message: `${__emojiUpdateFail}${filename} update failed` }) } }) }) @@ -626,7 +629,7 @@ function ____Tool() { this.done = (obj) => { if (_isQuanX) $done(obj) if (_isSurge) $done(obj) - if (_node) console.log("script Done."); + if (_node) console.log("script done."); } this.notify = (title, subtitle, message) => { if (_isQuanX) $notify(title, subtitle, message) From d5bdace4dd738ca95d1498c95f2cb961ada73da8 Mon Sep 17 00:00:00 2001 From: goose Date: Fri, 27 Mar 2020 16:16:20 +0800 Subject: [PATCH 0391/1191] update --- eval_script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index b2220b98a..52d1f95c3 100644 --- a/eval_script.js +++ b/eval_script.js @@ -45,7 +45,7 @@ const __emojiTasks = "🕐" const __emojiUpdateSuccess = "🟢" const __emojiUpdateFail = "🟠" const __emojiGitHub = "🔵" -const __showLine = 20 +const __showLine = 15 const __log = false const __debug = false From 4f24e9783b9b6d1a82b4b0950ee9f00883c26334 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 16:20:41 +0800 Subject: [PATCH 0392/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 606bd417d..9495b2b27 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Script management tool 0 0 * * * eval_script.js ``` -# eval_script.js 使用示例(QuanX举例,Surge 同理) +# eval_script.js 使用示例(QuanX 举例) ```properties 1.设置任务 From 7623ff779c4a2728093eec6ae2b6967ab756c8a2 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:41:33 +0800 Subject: [PATCH 0393/1191] update From 1347ac2e2570c117051a2317c718a772046066e1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:41:36 +0800 Subject: [PATCH 0394/1191] update From 711d3f4388c7764bde6d8a7458a3efe0a444a179 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:42:26 +0800 Subject: [PATCH 0395/1191] update From 03a6c5d66f01cb56c5798bab1e8208b883565577 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:42:28 +0800 Subject: [PATCH 0396/1191] update From 2707dcb514debf0a1999ff964dfb940008003df3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:43:32 +0800 Subject: [PATCH 0397/1191] update From 5d2937d993c82126356efe88850d00afa0bd2a13 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:43:35 +0800 Subject: [PATCH 0398/1191] update From 0275adcf896220cefafe0e05aeaaff735ade9a57 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:44:23 +0800 Subject: [PATCH 0399/1191] update From 53811a02f02321a2e77e0189c3f4bc715b83846d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:44:26 +0800 Subject: [PATCH 0400/1191] update From eb8b754930f6302e6ba3ad69a6b1835b802001f4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:45:52 +0800 Subject: [PATCH 0401/1191] update From 74ec983872ad5af82faab49966dd3cebf75c7f3b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:45:55 +0800 Subject: [PATCH 0402/1191] update From 13da83e4e637314959d538ff159150871a49cc51 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:47:04 +0800 Subject: [PATCH 0403/1191] update From 54b2c7cb54c2094d1240364110c5f9b03f3c228b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:47:06 +0800 Subject: [PATCH 0404/1191] update From b117e7d98b71f6f988912a6e45ad58a867207995 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:50:28 +0800 Subject: [PATCH 0405/1191] update From 294269df8e7b38ac84ee3fd41397b66e71a0c1dd Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:50:31 +0800 Subject: [PATCH 0406/1191] update From d63b40dff1d03e03599e6b2f3228288bd4fe095c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:51:40 +0800 Subject: [PATCH 0407/1191] update From 4f25c446663f520ec69983a9b2f3461e693465b9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:51:43 +0800 Subject: [PATCH 0408/1191] update From e6feb87ebf8e1225b98e5ba37afda028b17d969f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:52:08 +0800 Subject: [PATCH 0409/1191] update From bc114f20a45be6d760256981384dc5bb5b285a0b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:52:11 +0800 Subject: [PATCH 0410/1191] update From 5044f0c538ab9e17089b9dd9a89cb94a7239ce52 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:52:44 +0800 Subject: [PATCH 0411/1191] update From 0567a5e8fee842938dfbf9a29f3f61e448d2879b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:52:47 +0800 Subject: [PATCH 0412/1191] update From 14b72c31cd586c43144ad2cd2bd55046102cc283 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:47:23 +0800 Subject: [PATCH 0413/1191] update From 2f46563fa1083f514a799b77c2450cce2c2f7448 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:47:26 +0800 Subject: [PATCH 0414/1191] update From 4f1bdfa08c74c14c83ed56425c97e05e63f50378 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:51:24 +0800 Subject: [PATCH 0415/1191] update From 4274f80cfd0e359cf75de3a3a6e7b344cf084316 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:51:28 +0800 Subject: [PATCH 0416/1191] update From 98836cb2ac5f1a85bfbedd999ea59a2bad626e45 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:55:31 +0800 Subject: [PATCH 0417/1191] update From 3bbdd0b68f92435aa3a72a220ae084b47e2c9947 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:55:34 +0800 Subject: [PATCH 0418/1191] update From 99735ae571fa4276d775ec9a942e418cfa4b0b08 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:56:56 +0800 Subject: [PATCH 0419/1191] update From 32c74956004e871db7c6a53509c1bd95400b2232 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:56:59 +0800 Subject: [PATCH 0420/1191] update From 3daf0a4606582998d6134decb04c48b654747b41 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:57:39 +0800 Subject: [PATCH 0421/1191] update From 6d3c7345b9cf1d0dafc84b40c11865d0e7f76ae3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:57:42 +0800 Subject: [PATCH 0422/1191] update From 617ab6be60bdfebd3a61d0cf5b311fcaf50fbb1c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:58:30 +0800 Subject: [PATCH 0423/1191] update From c3b289a024511908b816f6702f117cd09c55b85b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:58:32 +0800 Subject: [PATCH 0424/1191] update From a4f151a2699b734907a0bdcc6c41baa7fc3dcd2f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:58:59 +0800 Subject: [PATCH 0425/1191] update From ff575982a383adba275738ad7f843360a5d657ef Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:59:02 +0800 Subject: [PATCH 0426/1191] update From 84a3f48784e059f79f24be0218507e3116bae2e5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:59:34 +0800 Subject: [PATCH 0427/1191] update From cff4388f9dd14fd44a023d77c4358e5ec494cf81 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:59:37 +0800 Subject: [PATCH 0428/1191] update From 0c3b57273deee3e6a292427f3beea1c8f913021e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:59:56 +0800 Subject: [PATCH 0429/1191] update From 89aa9a240b8e4f8aabca709523cc7d991d08b030 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:59:58 +0800 Subject: [PATCH 0430/1191] update From fef2050faf37eb51619c308461f08f0bca65edab Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 22:02:25 +0800 Subject: [PATCH 0431/1191] update From e1c958b028782ddd8b22296d2817eff390c7fad7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 22:02:28 +0800 Subject: [PATCH 0432/1191] update From 6cacd42db7d2197009a02fb168fe27352943a4ea Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 22:02:47 +0800 Subject: [PATCH 0433/1191] update From c4871b88f61c1c07aa94e598cb355cdbabe79ac3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 22:02:50 +0800 Subject: [PATCH 0434/1191] update From 1018418d453bfec0bea42129fe83b335d39c538e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 22:03:59 +0800 Subject: [PATCH 0435/1191] update From 0a3f461d0f3a805e8cf97be10f9291bf22090b66 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 22:04:03 +0800 Subject: [PATCH 0436/1191] update From 1c49cbcecad5d041325e52fc28d9ca1bdc71a557 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 22:04:47 +0800 Subject: [PATCH 0437/1191] update From 22a4bc1fdab480dcdd0169ea61e41a5d2a55f825 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 22:04:49 +0800 Subject: [PATCH 0438/1191] update From 751987775dab20b5fb9771e0c536eca1ece85952 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 22:06:03 +0800 Subject: [PATCH 0439/1191] update From 939d7f4422570b0b466a865302deba18a7fd26d5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Mar 2020 22:06:06 +0800 Subject: [PATCH 0440/1191] update From c8ecded52eed5d9193e6f8399977c9feba8ad242 Mon Sep 17 00:00:00 2001 From: goose Date: Sat, 28 Mar 2020 14:01:38 +0800 Subject: [PATCH 0441/1191] fix --- nf_rating.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nf_rating.js b/nf_rating.js index 302cd7e84..ff3d65077 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -4,8 +4,8 @@ README:https://github.com/yichahucha/surge/tree/master const $tool = new Tool() const consoleLog = false; -const imdbApikeyCacheKey = "IMDbApikey"; -const netflixTitleCacheKey = "NetflixTitle"; +const imdbApikeyCacheKey = "ImdbApikeyCacheKey"; +const netflixTitleCacheKey = "NetflixTitleCacheKey"; if (!$tool.isResponse) { let url = $request.url; @@ -191,7 +191,6 @@ function errorTip() { function IMDbApikeys() { const apikeys = [ - "PlzBanMe", "4e89234e", "f75e0253", "d8bb2d6b", "ae64ce8d", "7218d678", "b2650e38", "8c4a29ab", @@ -201,7 +200,8 @@ function IMDbApikeys() { "9cc1a9b7", "e53c2c11", "f6dfce0e", "b9db622f", "e6bde2b9", "d324dbab", - "d7904fa3", "aeaf88b9"]; + "d7904fa3", "aeaf88b9", + "4e89234e",]; return apikeys; } From 63494bebbd71ee98ed6a84a610e9bbfa2b17dbec Mon Sep 17 00:00:00 2001 From: goose Date: Sat, 28 Mar 2020 14:21:39 +0800 Subject: [PATCH 0442/1191] fix --- nf_rating.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/nf_rating.js b/nf_rating.js index ff3d65077..7b8cefd08 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -17,10 +17,12 @@ if (!$tool.isResponse) { const isEnglish = url.match(/languages=en/) ? true : false; if (!title && !isEnglish) { const currentSummary = urlDecode.match(/\["videos","(\d+)","current","summary"\]/); - url = url.replace("&path=" + encodeURIComponent(currentSummary[0]), ""); + if (currentSummary) { + url = url.replace("&path=" + encodeURIComponent(currentSummary[0]), ""); + } url = url.replace(/&languages=(.*?)&/, "&languages=en-US&"); } - url += "&path=" + encodeURIComponent(`[${videos[0]},"details"]`); + // url += "&path=" + encodeURIComponent(`[${videos[0]},"details"]`); $done({ url }); } else { var IMDbApikeys = IMDbApikeys(); @@ -38,13 +40,13 @@ if (!$tool.isResponse) { } let year = null; let type = video.summary.type; - // if (type == "movie") { - // year = video.details.releaseYear; - // } if (type == "show") { type = "series"; } - delete video.details; + // if (type == "movie") { + // year = video.details.releaseYear; + // } + // delete video.details; const requestRatings = async () => { const IMDb = await requestIMDbRating(title, year, type); const Douban = await requestDoubanRating(IMDb.id); From ff62d8c8830776a674bbb0cc15ac84675f099bbe Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 28 Mar 2020 14:29:37 +0800 Subject: [PATCH 0443/1191] update From c74acfd1d203b07e2c5ecd16711e42409f7d7f6d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 28 Mar 2020 14:29:40 +0800 Subject: [PATCH 0444/1191] update From 10a64f222821671cfb88967767cc0ab72903fe36 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 28 Mar 2020 14:30:14 +0800 Subject: [PATCH 0445/1191] update From 90c51f67e9009b1903180b4a385c389c277fedf1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 28 Mar 2020 14:30:18 +0800 Subject: [PATCH 0446/1191] update From 6f740929b572b6aecead4a02f470348d7e7ad2ca Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 28 Mar 2020 14:32:39 +0800 Subject: [PATCH 0447/1191] update From eab07e0e6d33ed521393a56ba6a2a460197e200a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 28 Mar 2020 14:32:42 +0800 Subject: [PATCH 0448/1191] update From 2de8c101350a70a155c9e3282ee3ab8ba01d8bad Mon Sep 17 00:00:00 2001 From: goose Date: Sat, 28 Mar 2020 14:34:21 +0800 Subject: [PATCH 0449/1191] update --- eval_script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eval_script.js b/eval_script.js index 52d1f95c3..b9b2b4d97 100644 --- a/eval_script.js +++ b/eval_script.js @@ -42,9 +42,9 @@ const __emojiDone = "" const __emojiFail = "🙃" const __emojiSuccess = "😀" const __emojiTasks = "🕐" -const __emojiUpdateSuccess = "🟢" -const __emojiUpdateFail = "🟠" -const __emojiGitHub = "🔵" +const __emojiUpdateSuccess = "- " +const __emojiUpdateFail = "- " +const __emojiGitHub = "- " const __showLine = 15 const __log = false From b2ac394ed984f00d3e8e9db877b2f0ede49c53c0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 31 Mar 2020 00:29:05 +0800 Subject: [PATCH 0450/1191] update From 60e46b50d41468774301512babc09980df289da4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 31 Mar 2020 00:29:08 +0800 Subject: [PATCH 0451/1191] update From 95e4b51922a345355a211205d418f03e6c0f3f33 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 1 Apr 2020 23:01:01 +0800 Subject: [PATCH 0452/1191] update From 51973dd54f48aa159e796397b1c2e78b11204494 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 1 Apr 2020 23:01:03 +0800 Subject: [PATCH 0453/1191] update From d53e58058a70b6ad6f10fc3f4a252502a205b5ce Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 1 Apr 2020 23:01:32 +0800 Subject: [PATCH 0454/1191] update From df24d31c79c0d328073eb2da8311f858547e9542 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 1 Apr 2020 23:01:33 +0800 Subject: [PATCH 0455/1191] update From 066c9b49af2d04e43f1a92dac35a30364617944e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 1 Apr 2020 23:01:59 +0800 Subject: [PATCH 0456/1191] update From 9e415c1041c318c84d75083e9a9fef8ef1417192 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 1 Apr 2020 23:02:02 +0800 Subject: [PATCH 0457/1191] update From 86a768fe53fa372747b630b14ca005fc6d2c9efe Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 1 Apr 2020 23:02:08 +0800 Subject: [PATCH 0458/1191] update From 6cd646ebaf5477fc4e210e93f1434dfad8b9d597 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 1 Apr 2020 23:02:09 +0800 Subject: [PATCH 0459/1191] update From 840acb03c9b1ab8ee9785c71980b8b6491dfb784 Mon Sep 17 00:00:00 2001 From: tern Date: Wed, 1 Apr 2020 23:02:32 +0800 Subject: [PATCH 0460/1191] update --- eval_script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eval_script.js b/eval_script.js index b9b2b4d97..11635e612 100644 --- a/eval_script.js +++ b/eval_script.js @@ -42,9 +42,9 @@ const __emojiDone = "" const __emojiFail = "🙃" const __emojiSuccess = "😀" const __emojiTasks = "🕐" -const __emojiUpdateSuccess = "- " -const __emojiUpdateFail = "- " -const __emojiGitHub = "- " +const __emojiUpdateSuccess = "🟢" +const __emojiUpdateFail = "🟠 " +const __emojiGitHub = "🔵" const __showLine = 15 const __log = false From 6d60ab9f056de1f9b87fd4ba2d055642d546b598 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 1 Apr 2020 23:05:06 +0800 Subject: [PATCH 0461/1191] update From 5a819eb0d04c6bfdcb467beea9bbf2091b4e559e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 1 Apr 2020 23:05:08 +0800 Subject: [PATCH 0462/1191] update From 1a4a16a3092f0d09ac2ac639a98c7c18de00352e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 1 Apr 2020 23:05:31 +0800 Subject: [PATCH 0463/1191] update From af18c4b82c6ab28eac463fbdba4b57dc26e36bb8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 1 Apr 2020 23:05:33 +0800 Subject: [PATCH 0464/1191] update From f6bb954147eaa81fa8380fc4867116b711b30489 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 1 Apr 2020 23:06:02 +0800 Subject: [PATCH 0465/1191] update From 88daf3dd5fe0589d211dfb03f7d0c22b512772b4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 1 Apr 2020 23:06:03 +0800 Subject: [PATCH 0466/1191] update From 18c7a088b5d731b0db7c77a10453a652c91f91e3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 1 Apr 2020 23:13:26 +0800 Subject: [PATCH 0467/1191] update From 7b5e3bd5e72b11b677ccaed4b5563a45cf043338 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 1 Apr 2020 23:13:29 +0800 Subject: [PATCH 0468/1191] update From 4ee87de145cb7745d383209abcf4e48c5c859a43 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 2 Apr 2020 00:00:35 +0800 Subject: [PATCH 0469/1191] update From dae16007ae2ef352117b5b9c17ca94a84fca624c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 2 Apr 2020 00:00:37 +0800 Subject: [PATCH 0470/1191] update From 4b173f53d3370fb468c84c996996857777fdc306 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 2 Apr 2020 02:31:03 +0800 Subject: [PATCH 0471/1191] update From 8b628422fa95d31d7a5c052a598805413a97fefb Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 2 Apr 2020 02:31:05 +0800 Subject: [PATCH 0472/1191] update From 64e0a2950cf36ea4ba9ed662dc92a88fd7d1236f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 3 Apr 2020 00:00:11 +0800 Subject: [PATCH 0473/1191] update From e5ccaa82ab313bedde21cb0199ffdd6657d18245 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 3 Apr 2020 00:00:12 +0800 Subject: [PATCH 0474/1191] update From 0f0994e1c82565b23e4dc6e78786d22e13699b8e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 3 Apr 2020 00:07:18 +0800 Subject: [PATCH 0475/1191] update From fcf0e4c5311a6bfae1e11087c2883fb536f1a2a6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 3 Apr 2020 00:07:19 +0800 Subject: [PATCH 0476/1191] update From 3366e4e2a8308670e3ffc56492ad80bb3830d0d0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 11:14:36 +0800 Subject: [PATCH 0477/1191] update From 4d0cff28ab7e62453995a1e761d3f3bff779bcaf Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 11:14:39 +0800 Subject: [PATCH 0478/1191] update From 0eb79cd7a0c79dab3ee0ba0cf767a323d9151f15 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:19:18 +0800 Subject: [PATCH 0479/1191] update --- eval_sub/quanx.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index 2cc192cd4..68a541cae 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,11 +1,13 @@ hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +^https?://.+/amdc/mobileDispatch url script-request-body eval_script.js + +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js + ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body eval_script.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js - ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js From 2c1acc6069c9c26436762fe9025f26374dba2db2 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:19:21 +0800 Subject: [PATCH 0480/1191] update --- eval_sub/surge.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index 91a50ec5a..6187175a0 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,11 +1,13 @@ hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +http-request ^https?://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js + +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js + http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js http-response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=eval_script.js -http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js - http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=eval_script.js http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js From 3d27310ca828d5900a81c52c445fa18d1c1d9d8c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:30:02 +0800 Subject: [PATCH 0481/1191] update From 00ff1d1ac6c46b438fd414cd9256d7d55cc2ce09 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:30:03 +0800 Subject: [PATCH 0482/1191] update From 6f2550f619033d31d1cc328b52f3e5bb9fa76ea6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:30:30 +0800 Subject: [PATCH 0483/1191] update From fba6d2e7ecd736036c631d9f0d1cd934625ccb49 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:30:31 +0800 Subject: [PATCH 0484/1191] update From ff5ba62e963cfa3a2dfecc7e771c3f65512265fc Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:31:01 +0800 Subject: [PATCH 0485/1191] update From eb960ad0b4c816ae1a0f19a1810972cc023080be Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:31:02 +0800 Subject: [PATCH 0486/1191] update From 61b9ac61a0f4cdb2538055562450a8e6cd261209 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:31:03 +0800 Subject: [PATCH 0487/1191] update From f2a040b99485bc601e407d00db9e3c83e5416504 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:31:05 +0800 Subject: [PATCH 0488/1191] update From 72a43517efc2ba63dd1fe5fe4849c0550d6b4c80 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:31:31 +0800 Subject: [PATCH 0489/1191] update From 5c766ae5d3d329ab39c7bc5e61a8b4586cff9f03 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:31:32 +0800 Subject: [PATCH 0490/1191] update From e1b836b28ffcbed526f96d773ce624791c80f6c9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:42:16 +0800 Subject: [PATCH 0491/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9495b2b27..2a7297e53 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Display taobao historical price ```properties # 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [Script] -http-response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-request ^https?://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] hostname = trade-acs.m.taobao.com @@ -89,7 +89,7 @@ Display taobao historical price ```properties # 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [rewrite_local] -^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body tb_price.js +^https?://.+/amdc/mobileDispatch url script-request-body tb_price.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js [mitm] hostname = trade-acs.m.taobao.com From 49be8634df9d3ed112a2be100f18da3f064aa3f6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:43:30 +0800 Subject: [PATCH 0492/1191] Update sub_script.conf --- sub_script.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sub_script.conf b/sub_script.conf index 148941c84..61f315f24 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -4,7 +4,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js # tb -^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^https?://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js # nf From 140c82550d6458038ba7e90c01c56a7a9948e903 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:56:32 +0800 Subject: [PATCH 0493/1191] update --- eval_sub/quanx.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index 68a541cae..07fa88365 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,13 +1,11 @@ hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js + ^https?://.+/amdc/mobileDispatch url script-request-body eval_script.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js - -^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body eval_script.js - ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js From 638e15d03755b9d24e91966578d7c6f58310fba2 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:56:33 +0800 Subject: [PATCH 0494/1191] update --- eval_sub/surge.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index 6187175a0..cbed462ac 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,13 +1,11 @@ hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js + http-request ^https?://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js - -http-response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch requires-body=1,script-path=eval_script.js - http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=eval_script.js http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js From 759216d782f1c7dea645525a902d19b507fe7971 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:56:49 +0800 Subject: [PATCH 0495/1191] update From baf2adaee0306d451ed49365c285494b2a8f1423 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:56:51 +0800 Subject: [PATCH 0496/1191] update From 51348e04979c87b399f972a41a0805b8890900c0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:57:00 +0800 Subject: [PATCH 0497/1191] update From 3c799075be5bb7e5aa45d14eaa3c3d4d252a2ff3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:57:02 +0800 Subject: [PATCH 0498/1191] update From 9cd0d7effc0ce5a4666304fd498485cc54c8503a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 17:04:05 +0800 Subject: [PATCH 0499/1191] update From d6ca771e13b1df1cf9d9313e5729db59d69c6e9a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 17:04:08 +0800 Subject: [PATCH 0500/1191] update From f2f595d8d17d1bf0f76a7e69aa014a69feab703f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 17:05:26 +0800 Subject: [PATCH 0501/1191] update From 5e913dc906341c5191a9f5b94899919fc37ae407 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 17:05:29 +0800 Subject: [PATCH 0502/1191] update From 0ddc879667fd3ff445f7a58d9e2d71a5f1b04e69 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 19:57:14 +0800 Subject: [PATCH 0503/1191] Update wb_ad.js --- wb_ad.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wb_ad.js b/wb_ad.js index 9780bf2f4..361083a94 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -114,7 +114,9 @@ if ( } if (url.indexOf(path19) != -1) { - delete body.expandable_view; + let obj = JSON.parse(body); + delete obj.expandable_view; + body = JSON.stringify(obj); } $done({ body }); From 8d9089d36b15ca412adf8357d5ae5e01731a914a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 19:59:02 +0800 Subject: [PATCH 0504/1191] update From f1749c3e1f33c16e23ac1b848628c6ad8a63ede1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 19:59:03 +0800 Subject: [PATCH 0505/1191] update From fb1413154e992ab7a160137c4abc15ea5f01be4b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 19:59:31 +0800 Subject: [PATCH 0506/1191] update From bb06f60ed0354054d8bcd85f8e35bf8f882536e0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 19:59:32 +0800 Subject: [PATCH 0507/1191] update From 3640f5feee221179ad8e49872b67ec4d67f1b786 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 20:00:01 +0800 Subject: [PATCH 0508/1191] update From 67019516d0aa8f7da571f986b3e0703efe14229e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 20:00:03 +0800 Subject: [PATCH 0509/1191] update From d6429ec148ccd6d0f86b69c8415429b1f2a1c8d6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 20:00:31 +0800 Subject: [PATCH 0510/1191] update From 4d4926267802ef1efdafc7477a1558f542f32286 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 20:00:32 +0800 Subject: [PATCH 0511/1191] update From 72f40fff9733ec055549aacd4e083a327de5f485 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 20:01:01 +0800 Subject: [PATCH 0512/1191] update From 53d53f61639d210cf963284f597d2c794c2b6ce6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 20:01:03 +0800 Subject: [PATCH 0513/1191] update From 2c42d6b6eb0a8b8698c36ee1b1c593b667e831bc Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 20:01:31 +0800 Subject: [PATCH 0514/1191] update From 63f6c447f8db41f0acf03cb985e109ad3ad86b6c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 20:01:33 +0800 Subject: [PATCH 0515/1191] update From 0fddba86b753544f84f7861863e37f8cdb4b9d33 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 20:02:01 +0800 Subject: [PATCH 0516/1191] update From 4905a25a4c1775fde40bf598b48abe797c411a59 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 20:02:03 +0800 Subject: [PATCH 0517/1191] update From 6f18ac5d05f6deeedb55fb12b78d1fc4ecd9a536 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 20:02:07 +0800 Subject: [PATCH 0518/1191] update From cbde97dbf43cf5b67d21a04305544a52abaa599b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 20:02:10 +0800 Subject: [PATCH 0519/1191] update From ee9502faa8e7a4a47229641a45e5ace5a3c384e4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 20:02:31 +0800 Subject: [PATCH 0520/1191] update From 258b23fa71d6229d460dde1e7a892ddad848774d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 4 Apr 2020 20:02:33 +0800 Subject: [PATCH 0521/1191] update From b81ffa12dcdab3846c019f49b27a2f0880048f35 Mon Sep 17 00:00:00 2001 From: tern Date: Sat, 4 Apr 2020 23:08:19 +0800 Subject: [PATCH 0522/1191] update --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2a7297e53..f89d34c5d 100644 --- a/README.md +++ b/README.md @@ -170,3 +170,5 @@ const __surgePath = "eval_sub/surge.txt" 5.在 QuanX 订阅 GitHub 生成的文件 ``` + +[Issue Group](https://t.me/joinchat/GNhmPg1pixfpvKyD0h-8YA) From bfa34a31a280716bb7f0c65646abb8a8dbb02a2c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 5 Apr 2020 00:00:06 +0800 Subject: [PATCH 0523/1191] update From 2c5ab7e8912e47eecc6484a3571bff4e810471a2 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 5 Apr 2020 00:00:09 +0800 Subject: [PATCH 0524/1191] update From d60d2836c710f5e3a16c9f819d80c33217e237cc Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 5 Apr 2020 00:58:44 +0800 Subject: [PATCH 0525/1191] update From e6c7f7c84fecc16d2d5d39702df7a9e043acd1ef Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 5 Apr 2020 00:58:46 +0800 Subject: [PATCH 0526/1191] update From 556667d0851fd0f8f1112824bdff43fb98daa225 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 5 Apr 2020 03:15:53 +0800 Subject: [PATCH 0527/1191] update From 2438cbe25536087bb986d0bae3185150d67727f0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 5 Apr 2020 03:15:56 +0800 Subject: [PATCH 0528/1191] update From d13ff11247976ade998fe9a882605387a64bff56 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 00:00:12 +0800 Subject: [PATCH 0529/1191] update From dea76d67856df947624106c491db38f976321a1c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 00:00:13 +0800 Subject: [PATCH 0530/1191] update From c32a0fda866432fa35855c1d6f3e848ab0518732 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 01:14:04 +0800 Subject: [PATCH 0531/1191] update From 9e2496430f6116c7619e0bfe3b5dab2ad700a6c3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 01:14:06 +0800 Subject: [PATCH 0532/1191] update From fd25e745b12800a59112a1fe8ac8b68f931a2069 Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 6 Apr 2020 11:57:10 +0800 Subject: [PATCH 0533/1191] fix --- tb_price.js | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/tb_price.js b/tb_price.js index 9a457d28b..33db510d6 100644 --- a/tb_price.js +++ b/tb_price.js @@ -28,19 +28,23 @@ if (url.indexOf(path1) != -1) { body = $base64.encode(JSON.stringify(obj)) $done({ body }) } else { + let headers = $response.headers let body = $request.body - let json = Qs2Json(body) - let domain = json.domain.split(" ") - let i = domain.length; - while (i--) { - const block = "trade-acs.m.taobao.com" - const element = domain[i]; - if (element == block) { - domain.splice(i, 1); + console.log(headers["User-Agent"]) + if (headers["User-Agent"].indexOf("%E6%89%8B%E6%9C%BA%E6%B7%98%E5%AE%9D") != -1) { + let json = Qs2Json(body) + let domain = json.domain.split(" ") + let i = domain.length; + while (i--) { + const block = "trade-acs.m.taobao.com" + const element = domain[i]; + if (element == block) { + domain.splice(i, 1); + } } + json.domain = domain.join(" ") + body = Json2Qs(json) } - json.domain = domain.join(" ") - body = Json2Qs(json) $done({ body }) } } From 33505adcdfc52f4f9bb81c1f3cd79dcdade154e9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 11:57:36 +0800 Subject: [PATCH 0534/1191] update From 69577137e2abd246ca8f798fe3ecb1d45dda82da Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 11:57:37 +0800 Subject: [PATCH 0535/1191] update From 78ac99bfe8526c897e6f6033aacfa69c47ad40ab Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 11:58:01 +0800 Subject: [PATCH 0536/1191] update From 41620df0b4535cc483e51f52aa28467395df25d2 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 11:58:03 +0800 Subject: [PATCH 0537/1191] update From e2ef569e053e164026ea4b7216634e1202779dc0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 11:58:31 +0800 Subject: [PATCH 0538/1191] update From 2a7db6e3e0ea303cfbb99a0590ba951282a24132 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 11:58:33 +0800 Subject: [PATCH 0539/1191] update From cf5c1248e2eca2789cc97e7fda0bb106fb88efea Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 11:59:02 +0800 Subject: [PATCH 0540/1191] update From 4128b8eda4d83fda4118c46f8778c0589e1e6ef3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 11:59:04 +0800 Subject: [PATCH 0541/1191] update From a546c58dfd122e33c6389ae498a04c871c86a922 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 11:59:32 +0800 Subject: [PATCH 0542/1191] update From c833d5db51c4104143fd6bfd8c62003be0a64fb4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 11:59:33 +0800 Subject: [PATCH 0543/1191] update From 0cc284791d3c05942aa5ba52821bab123fdabe53 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 12:00:02 +0800 Subject: [PATCH 0544/1191] update From eddffbd28c6d8e45e2191c51e8e70ce8eb05eb65 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 12:00:04 +0800 Subject: [PATCH 0545/1191] update From a82a88aa2dba486d7e8ad86197f61007f6fb5d26 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:00:39 +0800 Subject: [PATCH 0546/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f89d34c5d..55e90ba3f 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ Script management tool 2.配置脚本 [Remote] -# 可以使用 QuanX 远程复写(如果订阅不包含 hostname,需配置 [Hostname] ) +# 可以使用 QuanX 远程重写(如果远程重写不包含 hostname,需配置 [Hostname] ) https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf @@ -168,7 +168,7 @@ const __surgePath = "eval_sub/surge.txt" 4.执行任务更新脚本 -5.在 QuanX 订阅 GitHub 生成的文件 +5.使用 GitHub 生成的文件链接,在 QuanX 添加远程重写 ``` [Issue Group](https://t.me/joinchat/GNhmPg1pixfpvKyD0h-8YA) From c40095f2ddd182d157a7983ca3a900fc4b3d13f4 Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 6 Apr 2020 21:02:55 +0800 Subject: [PATCH 0547/1191] fix --- tb_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price.js b/tb_price.js index 33db510d6..c3d725138 100644 --- a/tb_price.js +++ b/tb_price.js @@ -30,7 +30,7 @@ if (url.indexOf(path1) != -1) { } else { let headers = $response.headers let body = $request.body - console.log(headers["User-Agent"]) + $tool.notify("", "", headers["User-Agent"]) if (headers["User-Agent"].indexOf("%E6%89%8B%E6%9C%BA%E6%B7%98%E5%AE%9D") != -1) { let json = Qs2Json(body) let domain = json.domain.split(" ") From c7442b0ba7d9354db23e4b3d95d0b1eb424f99e6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:03:44 +0800 Subject: [PATCH 0548/1191] update From ddaf8e9dec218a508a5b0a299c461278a315f432 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:03:48 +0800 Subject: [PATCH 0549/1191] update From 5488ae85cd41a29f76d23e6449a6e66ae322df54 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:04:48 +0800 Subject: [PATCH 0550/1191] update From e88a217758c0f047f7e8e87a839666f7b6914e14 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:04:50 +0800 Subject: [PATCH 0551/1191] update From 0ce8e6ee72c7e7e6a253e7783e33a3301f450d21 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:06:02 +0800 Subject: [PATCH 0552/1191] update From 4b3b5516f38256bcc02a9c28a060cbdcf86d03f5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:06:04 +0800 Subject: [PATCH 0553/1191] update From 610a202cd00ba96f49941809c15289d2f5c0a92e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:06:27 +0800 Subject: [PATCH 0554/1191] update From 653aa97947e723e6c8c9921b78524358f75b3c7a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:06:30 +0800 Subject: [PATCH 0555/1191] update From ca2d5191644718fb2c302edba786473cda7c1e1e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:08:06 +0800 Subject: [PATCH 0556/1191] Update tb_price.js --- tb_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price.js b/tb_price.js index c3d725138..e0bf314f2 100644 --- a/tb_price.js +++ b/tb_price.js @@ -28,7 +28,7 @@ if (url.indexOf(path1) != -1) { body = $base64.encode(JSON.stringify(obj)) $done({ body }) } else { - let headers = $response.headers + let headers = $request.headers let body = $request.body $tool.notify("", "", headers["User-Agent"]) if (headers["User-Agent"].indexOf("%E6%89%8B%E6%9C%BA%E6%B7%98%E5%AE%9D") != -1) { From 223981341653f1ba5d6c2467856a334f481ba134 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:08:22 +0800 Subject: [PATCH 0557/1191] update From 4cf91788b1452021a76a5d3da5cb66e7face0320 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:08:26 +0800 Subject: [PATCH 0558/1191] update From 60260d492feab9f2eb7a815ad40ba5d9f1232dd8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:09:54 +0800 Subject: [PATCH 0559/1191] update From 803922e53ed1bfaedb897de47c393bbc7cdef339 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:09:57 +0800 Subject: [PATCH 0560/1191] update From 2c5a34129a6c638a2a0630fa89d8b5688622638f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:11:12 +0800 Subject: [PATCH 0561/1191] update From 15a6279e57c480c956a073be16b4a3ee7e7f1272 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:11:15 +0800 Subject: [PATCH 0562/1191] update From c94bc77be204c83a1d6a38d79bd03607517872e3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:13:32 +0800 Subject: [PATCH 0563/1191] update From c095c993b17e6806867f003ac9acab0f82d52cb3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:13:33 +0800 Subject: [PATCH 0564/1191] update From 282fa66272983f03751795e257373467bc4c64ee Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:14:01 +0800 Subject: [PATCH 0565/1191] update From 4dea2875ef5a4cad24cbf6c92d54c256a41fd00c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:14:02 +0800 Subject: [PATCH 0566/1191] update From 300f5ed316d223380dad3ba028027542428bbad0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:14:32 +0800 Subject: [PATCH 0567/1191] update From d4d5a91b59b0784c553975610753b3c8c6c89201 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:14:33 +0800 Subject: [PATCH 0568/1191] update From 704ae4b2d38edb773d0c85b7daf6e3a203ca31ad Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:15:01 +0800 Subject: [PATCH 0569/1191] update From 91095a3b2981bb526e73a0638d0525b1617d52ce Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:15:02 +0800 Subject: [PATCH 0570/1191] update From e1f558e4ce0c09a244e31d716751ad0ea56cea9e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:15:04 +0800 Subject: [PATCH 0571/1191] update From 64044d78822d957c52db1379f07310e5e84bedbf Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:15:31 +0800 Subject: [PATCH 0572/1191] update From e25b52b29d55f3d67a4f1cc0f99b4771d999351d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:15:33 +0800 Subject: [PATCH 0573/1191] update From f399c3c4bea6a3c6531302c8a56c4c95ad6d7ac1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:16:01 +0800 Subject: [PATCH 0574/1191] update From 5c5b13ba320a344ca3a93f8f347e3ac4818bb0ee Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:16:52 +0800 Subject: [PATCH 0575/1191] Update tb_price.js --- tb_price.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tb_price.js b/tb_price.js index e0bf314f2..e991cd30b 100644 --- a/tb_price.js +++ b/tb_price.js @@ -32,6 +32,7 @@ if (url.indexOf(path1) != -1) { let body = $request.body $tool.notify("", "", headers["User-Agent"]) if (headers["User-Agent"].indexOf("%E6%89%8B%E6%9C%BA%E6%B7%98%E5%AE%9D") != -1) { + $tool.notify("", "", "修改") let json = Qs2Json(body) let domain = json.domain.split(" ") let i = domain.length; From 19a33836cf1c0665b3fadfd846dcc771488e58f0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:18:07 +0800 Subject: [PATCH 0576/1191] update From b2e2da1c760c26eaea16543b7b4d6402b0060ba7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:18:09 +0800 Subject: [PATCH 0577/1191] update From 54062465d70ea3a9b773abc39ac0ab8df80a1f0f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:19:32 +0800 Subject: [PATCH 0578/1191] update From dab9d759fe6ee9e34699d84a73551d65dd9e93e7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:19:33 +0800 Subject: [PATCH 0579/1191] update From c7b377adbb2eef27ebbdcdd54ee6780453f4fef8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:19:49 +0800 Subject: [PATCH 0580/1191] update From c4a490617318be9efd343e60eec8aacc1a30db80 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:25:01 +0800 Subject: [PATCH 0581/1191] Update README.md --- README.md | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/README.md b/README.md index 55e90ba3f..889711507 100644 --- a/README.md +++ b/README.md @@ -36,13 +36,6 @@ http-request ^https?://.+/amdc/mobileDispatch requires-body=1,script-path=https: http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] hostname = trade-acs.m.taobao.com - -# 以上还不生效或者频繁失效的可以添加以下规则,使用规则有可能误伤其他功能或者应用(一般不需要添加规则就能正常使用) -# [Rule] -# IP-CIDR, 203.119.144.0/23, REJECT, no-resolve -# IP-CIDR, 203.119.175.0/24, REJECT, no-resolve -# IP-CIDR, 106.11.162.0/24, REJECT, no-resolve -# IP-CIDR, 47.102.83.0/24, REJECT, no-resolve ``` DingDing clock in @@ -93,13 +86,6 @@ Display taobao historical price ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js [mitm] hostname = trade-acs.m.taobao.com - -# 以上还不生效或者频繁失效的可以添加以下规则,使用规则有可能误伤其他功能或者应用(一般不需要添加规则就能正常使用) -# [filter_local] -# ip-cidr, 203.119.144.0/23, reject -# ip-cidr, 203.119.175.0/24, reject -# ip-cidr, 106.11.162.0/24, reject -# ip-cidr, 47.102.83.0/24, reject ``` DingDing clock in From 039b90cf8c80a2084e15903013a9ae5d06739a11 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:25:55 +0800 Subject: [PATCH 0582/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 889711507..cee5002d1 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Display taobao historical price ```properties # 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [Script] -http-request ^https?://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] hostname = trade-acs.m.taobao.com @@ -82,7 +82,7 @@ Display taobao historical price ```properties # 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [rewrite_local] -^https?://.+/amdc/mobileDispatch url script-request-body tb_price.js +^http://.+/amdc/mobileDispatch url script-request-body tb_price.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js [mitm] hostname = trade-acs.m.taobao.com From 89a6d83f8a35a0ff8c8f07bba840c2c4f4a76102 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:26:58 +0800 Subject: [PATCH 0583/1191] Update sub_script.conf --- sub_script.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sub_script.conf b/sub_script.conf index 61f315f24..d5debcf20 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -4,7 +4,7 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js # tb -^https?://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js # nf From dd286c9ce63bde67f39e3710eb330783e7c63c36 Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 6 Apr 2020 21:28:34 +0800 Subject: [PATCH 0584/1191] fix --- tb_price.js | 2 -- tb_price_lite.js | 23 +++++++++++++---------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/tb_price.js b/tb_price.js index e991cd30b..28a96f9e8 100644 --- a/tb_price.js +++ b/tb_price.js @@ -30,9 +30,7 @@ if (url.indexOf(path1) != -1) { } else { let headers = $request.headers let body = $request.body - $tool.notify("", "", headers["User-Agent"]) if (headers["User-Agent"].indexOf("%E6%89%8B%E6%9C%BA%E6%B7%98%E5%AE%9D") != -1) { - $tool.notify("", "", "修改") let json = Qs2Json(body) let domain = json.domain.split(" ") let i = domain.length; diff --git a/tb_price_lite.js b/tb_price_lite.js index b6edc5e49..abf060b35 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -28,19 +28,22 @@ if (url.indexOf(path1) != -1) { body = $base64.encode(JSON.stringify(obj)) $done({ body }) } else { + let headers = $request.headers let body = $request.body - let json = Qs2Json(body) - let domain = json.domain.split(" ") - let i = domain.length; - while (i--) { - const block = "trade-acs.m.taobao.com" - const element = domain[i]; - if (element == block) { - domain.splice(i, 1); + if (headers["User-Agent"].indexOf("%E6%89%8B%E6%9C%BA%E6%B7%98%E5%AE%9D") != -1) { + let json = Qs2Json(body) + let domain = json.domain.split(" ") + let i = domain.length; + while (i--) { + const block = "trade-acs.m.taobao.com" + const element = domain[i]; + if (element == block) { + domain.splice(i, 1); + } } + json.domain = domain.join(" ") + body = Json2Qs(json) } - json.domain = domain.join(" ") - body = Json2Qs(json) $done({ body }) } } From 4e636adecb305373263f9efb173771a16b06e192 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:31:10 +0800 Subject: [PATCH 0585/1191] update --- eval_sub/quanx.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index 07fa88365..0186315e2 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -2,7 +2,7 @@ hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api. ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js -^https?://.+/amdc/mobileDispatch url script-request-body eval_script.js +^http://.+/amdc/mobileDispatch url script-request-body eval_script.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js From 9870d0e5578c33cf007d9243f870dddf20d4dcc6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:31:11 +0800 Subject: [PATCH 0586/1191] update --- eval_sub/surge.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index cbed462ac..028ee743a 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -2,7 +2,7 @@ hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api. http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js -http-request ^https?://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js +http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js From 5de68a3fab8547098ea11664f2a690b42766b288 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:34:04 +0800 Subject: [PATCH 0587/1191] update From 92e9c82166bae019695b72ef353aeabb9ae34ce8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:34:06 +0800 Subject: [PATCH 0588/1191] update From a0e7defcdf6f5b45ec3fe9fcb03c69fbf8dce20d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:34:31 +0800 Subject: [PATCH 0589/1191] update From d49e9be767c14019e453c69214afebbe9ceb08f1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:34:32 +0800 Subject: [PATCH 0590/1191] update From a04118c54bb170041a1f692068172e9aa5a97491 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:35:01 +0800 Subject: [PATCH 0591/1191] update From a51c767cb8c929750613c9910a299ce461bc1b4b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:35:02 +0800 Subject: [PATCH 0592/1191] update From aaf948c722317d2a472232204a12963a5b9b25c7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:35:31 +0800 Subject: [PATCH 0593/1191] update From 040d73fa01b9a141c0890de187cb70bf55da26a0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:35:32 +0800 Subject: [PATCH 0594/1191] update From 03009f784116a8050e01807e4c6819c95d09c6cc Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:35:33 +0800 Subject: [PATCH 0595/1191] update From 0c6d832ed26b3e6b7836525847867070797fc2ac Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:36:01 +0800 Subject: [PATCH 0596/1191] update From 570c7e261ae32894de287c4c6b4958df2f48a8d3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:36:02 +0800 Subject: [PATCH 0597/1191] update From 61a86f18531a7422f613aac5eb8ca77435ddedaa Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:36:03 +0800 Subject: [PATCH 0598/1191] update From 37dacb2bd34b41730e75d373a8daf3550a810c04 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:36:31 +0800 Subject: [PATCH 0599/1191] update From 24dc9425dee2be2b511bc41ad050d9db1a7035e6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:41:52 +0800 Subject: [PATCH 0600/1191] update From 024b326669238d8c448a32624fd332cf33e7a20e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:41:55 +0800 Subject: [PATCH 0601/1191] update From 0edcb522bd070d4e004f9169cb5b5b65e36ab465 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 7 Apr 2020 00:40:27 +0800 Subject: [PATCH 0602/1191] update From 8e2645fafd068998e2c45698bf47e1a34226f268 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 7 Apr 2020 00:40:28 +0800 Subject: [PATCH 0603/1191] update From 86da7e0df4f2bc9798d51e45731b4f0fa2fb6454 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 8 Apr 2020 21:26:48 +0800 Subject: [PATCH 0604/1191] update From fe98ad34ced984b6dcb2fccb4fd9507a95cb300f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 8 Apr 2020 21:26:51 +0800 Subject: [PATCH 0605/1191] update From 6eda22a37d362634bf9573b204c81e532e344c2f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 8 Apr 2020 21:27:32 +0800 Subject: [PATCH 0606/1191] update From 661d766c92861f28f1161d74be3d72c99eab781d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 8 Apr 2020 21:27:35 +0800 Subject: [PATCH 0607/1191] update From b4e3e7c4bff053906a21cf5b96d27523c9f1868c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 8 Apr 2020 21:38:21 +0800 Subject: [PATCH 0608/1191] Update README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cee5002d1..f95237786 100644 --- a/README.md +++ b/README.md @@ -120,15 +120,15 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf # 可以使用 Surge 或者 QuanX 格式脚本(需配置 [Hostname]) # jd(Surge) -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +# http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js # tb(QuanX) -^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +# ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +# ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [Hostname] -api.m.jd.com, trade-acs.m.taobao.com +# api.m.jd.com, trade-acs.m.taobao.com 3.配置 GitHub @@ -155,6 +155,7 @@ const __surgePath = "eval_sub/surge.txt" 5.使用 GitHub 生成的文件链接,在 QuanX 添加远程重写 + ``` [Issue Group](https://t.me/joinchat/GNhmPg1pixfpvKyD0h-8YA) From 295efae5fd2e18abe4e624b729625fb4200a80d5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 9 Apr 2020 00:00:03 +0800 Subject: [PATCH 0609/1191] update From 9a0c7c91d25c2308f99a4333f957e77d4d7592d4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 9 Apr 2020 00:00:04 +0800 Subject: [PATCH 0610/1191] update From 0eaeecf075dc0e71e2b41b8b2e76e20d5af2b85e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 9 Apr 2020 00:00:04 +0800 Subject: [PATCH 0611/1191] update From 988269b23766717dd70add84b76414b2a2a06259 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 9 Apr 2020 00:00:06 +0800 Subject: [PATCH 0612/1191] update From 57c4078d2112b5b31c2520a5b39d1754c0ca4170 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 00:00:04 +0800 Subject: [PATCH 0613/1191] update From d468e1eca7a955c52e622e30566bbf1c5e44c50a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 00:00:06 +0800 Subject: [PATCH 0614/1191] update From cd9d94398c85a5f8a721a05b2c553f2911d77e54 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 00:00:07 +0800 Subject: [PATCH 0615/1191] update From 7bedb74befbc46e285737d7e752d01f4fb1bafb3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 00:00:09 +0800 Subject: [PATCH 0616/1191] update From 8c1cd4eb9819bbf10ca4d148f01c6b32b97d08a7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:41:31 +0800 Subject: [PATCH 0617/1191] update From 25e850f747e9887ef404f4a91822ffd5872eab39 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:41:33 +0800 Subject: [PATCH 0618/1191] update From 8984a0a41e189f4a88e33d5962587609c3ab69df Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:41:52 +0800 Subject: [PATCH 0619/1191] update From fa904bbbd83642b0b22edbcda3f0fc146f3ea5c2 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:41:54 +0800 Subject: [PATCH 0620/1191] update From 37a03eea03d2901f0508cdf0c89c6e6a3f563057 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:45:15 +0800 Subject: [PATCH 0621/1191] update --- eval_sub/quanx.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index 0186315e2..549b0c18a 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,5 +1,7 @@ hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +^https?://api\\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js + ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js ^http://.+/amdc/mobileDispatch url script-request-body eval_script.js From 599bd0202bd46c85c575e6a1fadc66521ed28cb8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:45:19 +0800 Subject: [PATCH 0622/1191] update --- eval_sub/surge.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index 028ee743a..0857b07e0 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,5 +1,7 @@ hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +http-response ^https?://api\\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js + http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js From 1b335e062a85cf34483cdf57e3428248516cda54 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:49:30 +0800 Subject: [PATCH 0623/1191] update From b9716a87a04fdf71b93b7bab1ec10bea25a61bed Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:49:33 +0800 Subject: [PATCH 0624/1191] update From beaf4d79b9dde8a3ebcc1e8982fcdf7ec05927de Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:52:27 +0800 Subject: [PATCH 0625/1191] update From bf7381dc0e460d31eff55d72ecef57c47db8de16 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:52:30 +0800 Subject: [PATCH 0626/1191] update From b09689203d5e7a5208e9c42c71c38f5bc634e389 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:53:07 +0800 Subject: [PATCH 0627/1191] update From 6c6ea962640700ff2b36bc4444d86ed8b86cddaa Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:53:10 +0800 Subject: [PATCH 0628/1191] update From d78499d0b6740c91dd9f907cb593250fcb385dce Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:53:52 +0800 Subject: [PATCH 0629/1191] update From 2118b57cded6a5c67f15fbb31defcea64c2b3765 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:53:55 +0800 Subject: [PATCH 0630/1191] update From b73b7345661d9c970125183b7335895a740b2437 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:54:16 +0800 Subject: [PATCH 0631/1191] update From 089fef41cf5f8d0aa0f5dfb7bfede12b5dc7ee3b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:54:19 +0800 Subject: [PATCH 0632/1191] update From 64399832484e2020c318c2fa89f1645c20277852 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:54:44 +0800 Subject: [PATCH 0633/1191] update --- eval_sub/quanx.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index 549b0c18a..e6176fbd6 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,6 +1,6 @@ hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -^https?://api\\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js +^https?://api\\.jd\.com/ssclient\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js From 844082a07e746acbcd8568e07bc51db2c759f26b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:54:47 +0800 Subject: [PATCH 0634/1191] update --- eval_sub/surge.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index 0857b07e0..a051c077f 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,6 +1,6 @@ hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -http-response ^https?://api\\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js +http-response ^https?://api\\.jd\.com/ssclient\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js From 6d4fdaadb50704039761bc2f09087bcbed2ed199 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:57:51 +0800 Subject: [PATCH 0635/1191] update From 35ffc36585e01f6461fff5a391308bf7e6d301f7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:57:54 +0800 Subject: [PATCH 0636/1191] update From 037dca2a9fb97aa91ee611756f5b4c142158e22b Mon Sep 17 00:00:00 2001 From: goose Date: Fri, 10 Apr 2020 17:01:56 +0800 Subject: [PATCH 0637/1191] update --- eval_script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index 11635e612..3d57ea615 100644 --- a/eval_script.js +++ b/eval_script.js @@ -366,7 +366,7 @@ async function ____updateGitHub(path, content, message) { if (__log) console.log(`updateContent: ${response.status}\n${body}`) body = JSON.parse(body) if (response.status == 200) { - resolve({ url: body.content.download_url, message: `${__emojiGitHub}GitHub updated successfully` }) + resolve({ url: body.content.download_url, message: `${__emojiGitHub}GitHub updated successfully${sha != body.content.sha ? " (file changes)" : ""}` }) } else if (response.status == 201) { resolve({ url: body.content.download_url, message: `${__emojiGitHub}GitHub file created successfully` }) } else { From 09d747817a34ba305f4f5aec4514804a514c5a07 Mon Sep 17 00:00:00 2001 From: goose Date: Fri, 10 Apr 2020 21:42:27 +0800 Subject: [PATCH 0638/1191] fix --- jd_price.js | 6 +++--- jd_price_lite.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/jd_price.js b/jd_price.js index 905e94ec3..947765cd5 100644 --- a/jd_price.js +++ b/jd_price.js @@ -68,11 +68,11 @@ function priceSummary(data) { listPriceDetail.pop() let list = listPriceDetail.concat(historySummary(data.single)) list.forEach((item, index) => { - if (index == 2) { + if (item.Name == "双11价格") { item.Name = "双十一价格" - } else if (index == 3) { + } else if (item.Name == "618价格") { item.Name = "六一八价格" - } else if (index == 4) { + } else if (item.Name == "30天最低价") { item.Name = "三十天最低" } summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date}${getSpace(8)}${item.Difference}` diff --git a/jd_price_lite.js b/jd_price_lite.js index 751237f00..530de143c 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -49,11 +49,11 @@ function priceSummary(data) { listPriceDetail.pop() let list = listPriceDetail.concat(historySummary(data.single)) list.forEach((item, index) => { - if (index == 2) { + if (item.Name == "双11价格") { item.Name = "双十一价格" - } else if (index == 3) { + } else if (item.Name == "618价格") { item.Name = "六一八价格" - } else if (index == 4) { + } else if (item.Name == "30天最低价") { item.Name = "三十天最低" } summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` From a2331982575b736878d0e18b1b83ae0c4d51eb52 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 21:45:56 +0800 Subject: [PATCH 0639/1191] update From f87bbfd633a117632933894383eac5fdac583e57 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 21:45:58 +0800 Subject: [PATCH 0640/1191] update From 55d3ec398fe195790827f4a5bed9761bfad88ce9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 21:46:01 +0800 Subject: [PATCH 0641/1191] update From f1a74d8e0befaadb6e514b12b99b238e6008add0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 21:46:02 +0800 Subject: [PATCH 0642/1191] update From e29c571e942d854429a33fd8541775669978491e Mon Sep 17 00:00:00 2001 From: goose Date: Fri, 10 Apr 2020 21:48:01 +0800 Subject: [PATCH 0643/1191] fix --- tb_price.js | 6 +++--- tb_price_lite.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tb_price.js b/tb_price.js index 28a96f9e8..2b9ed0a9d 100644 --- a/tb_price.js +++ b/tb_price.js @@ -170,11 +170,11 @@ function priceSummary(data) { listPriceDetail.pop() let list = listPriceDetail.concat(historySummary(data.single)) list.forEach((item, index) => { - if (index == 2) { + if (item.Name == "双11价格") { item.Name = "双十一价格" - } else if (index == 3) { + } else if (item.Name == "618价格") { item.Name = "六一八价格" - } else if (index == 4) { + } else if (item.Name == "30天最低价") { item.Name = "三十天最低" } summary += `\n${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` diff --git a/tb_price_lite.js b/tb_price_lite.js index abf060b35..d7d212ce1 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -82,11 +82,11 @@ function priceSummary(data) { listPriceDetail.pop() let list = listPriceDetail.concat(historySummary(data.single)) list.forEach((item, index) => { - if (index == 2) { + if (item.Name == "双11价格") { item.Name = "双十一价格" - } else if (index == 3) { + } else if (item.Name == "618价格") { item.Name = "六一八价格" - } else if (index == 4) { + } else if (item.Name == "30天最低价") { item.Name = "三十天最低" } summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` From 0f653567ab1e60d14de2ee72b1ff3d01a0132ae8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 21:50:02 +0800 Subject: [PATCH 0644/1191] update From 99fa014c6fa34732eb6550cbc038efcf43726b23 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 21:50:04 +0800 Subject: [PATCH 0645/1191] update From c610d250247032a020903520a35254537373077e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 21:50:31 +0800 Subject: [PATCH 0646/1191] update From cf67f430330c52b9059bb77e263ffcd257603126 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 21:50:32 +0800 Subject: [PATCH 0647/1191] update From d10e8bc6d25ec287d77c943f65c52a9de2b1f9d6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 21:51:09 +0800 Subject: [PATCH 0648/1191] update From bf0350717b19b4cfb9279e48cc35e22f14725c63 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 21:51:11 +0800 Subject: [PATCH 0649/1191] update From 18db717f5eef5160da8845bf00b910fd11680a8c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 21:51:32 +0800 Subject: [PATCH 0650/1191] update From 8905a684234e634f6a4f97e872aafe6aa2b17fac Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 21:51:34 +0800 Subject: [PATCH 0651/1191] update From 6065d1e972698e336d09e5cc9e3e787a74fdfbd0 Mon Sep 17 00:00:00 2001 From: goose Date: Fri, 10 Apr 2020 22:24:40 +0800 Subject: [PATCH 0652/1191] remove stream video ad --- wb_ad.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/wb_ad.js b/wb_ad.js index 361083a94..4c9410800 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -21,6 +21,7 @@ const path16 = "/page"; const path17 = "/statuses/friends_timeline"; const path18 = "/!/photos/pic_recommend_status"; const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; const url = $request.url; var body = $response.body; @@ -30,7 +31,8 @@ if ( url.indexOf(path2) != -1 || url.indexOf(path10) != -1 || url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 ) { let obj = JSON.parse(body); if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); @@ -126,8 +128,11 @@ function filter_timeline_statuses(statuses) { let i = statuses.length; while (i--) { let element = statuses[i]; - if (is_timeline_likerecommend(element.title)) statuses.splice(i, 1); - if (is_timeline_ad(element)) statuses.splice(i, 1); + if (is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element)) { + statuses.splice(i, 1); + } } } return statuses; @@ -190,3 +195,7 @@ function is_timeline_ad(mblog) { function is_timeline_likerecommend(title) { return title && title.type && title.type == "likerecommend" ? true : false; } + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1 +} \ No newline at end of file From a8370b4c2bff96f3f5c2d31cc6c180895a196a9d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:28:51 +0800 Subject: [PATCH 0653/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f95237786..d05bd6bba 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Remove weibo ads ```properties [Script] http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js [MITM] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` @@ -56,7 +56,7 @@ Remove weibo ads ```properties [rewrite_local] ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) url script-response-body wb_ad.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body wb_ad.js [mitm] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` From 61bf34a7bc4122ac2f2f0f2f26d5eeec29743c59 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:30:36 +0800 Subject: [PATCH 0654/1191] update From b6147ab33f85e36395d52e97075885d97b0a50e4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:30:38 +0800 Subject: [PATCH 0655/1191] update From 87934d552137eb097308e41161a0496490bab608 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:31:02 +0800 Subject: [PATCH 0656/1191] update From 6a5cfea278b581c99fad38ca819c050f7cfdc66e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:31:04 +0800 Subject: [PATCH 0657/1191] update From c1973d72fc46f526ab82ed0209bd58746cc1b7e0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:31:31 +0800 Subject: [PATCH 0658/1191] update From 336b1b054245aca0bad53d45601b20a53cd821e5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:31:33 +0800 Subject: [PATCH 0659/1191] update From af4b8ab2b6d33f2e0af899ab00b42f4bb8499bcd Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:33:44 +0800 Subject: [PATCH 0660/1191] update From b63d47267dd10774a7871403a875f092c1cd156b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:33:46 +0800 Subject: [PATCH 0661/1191] update From 2f52f34d5431f88120b6eef5da49e96687e2369c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:34:04 +0800 Subject: [PATCH 0662/1191] update From d271cf0f255a187f590d18a1fdd99459ab9a947d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:34:06 +0800 Subject: [PATCH 0663/1191] update From 2e89f81d265261141b739670e17972fdd1bae3bd Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:35:04 +0800 Subject: [PATCH 0664/1191] update From 621b49c76ba47b4b7da59b71d1b89a7f66fcf648 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:35:06 +0800 Subject: [PATCH 0665/1191] update From 76f4e9553f678b323e3176a7135ffc0e40bf7b30 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:35:31 +0800 Subject: [PATCH 0666/1191] update From dec54ddb25b8652ce85ad8cf281c2533c0197e71 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:35:32 +0800 Subject: [PATCH 0667/1191] update From cd33cb7d603605a31e378a829cca5f906871eab6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:36:29 +0800 Subject: [PATCH 0668/1191] update From 4e983ca375ef90e6811ec54d84d6b7b6c454c784 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:36:31 +0800 Subject: [PATCH 0669/1191] update From 4f442fca1b3f2c15b9138d0d99eb74d1879dc13f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:36:32 +0800 Subject: [PATCH 0670/1191] update From c2747ed5f2afc81de0dfa17b2b1325941add625a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:36:33 +0800 Subject: [PATCH 0671/1191] update From 00d232a6d2405d48679293d477137e3264235bed Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:37:01 +0800 Subject: [PATCH 0672/1191] update From 0526469d899f2af4a650f75bdd22a713c7c6de8b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:37:03 +0800 Subject: [PATCH 0673/1191] update From 2390c061ea9edc749e28019d94e54fd89cac614b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:37:33 +0800 Subject: [PATCH 0674/1191] update From fe51af4ca5895905d925d77f3b11307b480cf9b9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:37:34 +0800 Subject: [PATCH 0675/1191] update From af10b1ad2398a84e7c415963d65b44c918aace17 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:38:08 +0800 Subject: [PATCH 0676/1191] update From 09577336489c2661cc6e96157d33f56002b57567 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:38:10 +0800 Subject: [PATCH 0677/1191] update From b999cf55e4c67674c36798475d427baae88c0cf1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:38:34 +0800 Subject: [PATCH 0678/1191] update From 87ae1c9658f5d70632a98405df912cacd8cec3b6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:38:36 +0800 Subject: [PATCH 0679/1191] update From 0e0567b29ced01a7f448000c296a56e59bbdba62 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:39:03 +0800 Subject: [PATCH 0680/1191] update From 47801bdf070cf332c4f9844267db77b3297014b5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:39:04 +0800 Subject: [PATCH 0681/1191] update From b1d8aa373128d1ef6ca0e1a25837c17708e09e15 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:39:33 +0800 Subject: [PATCH 0682/1191] update From 59fae807df8ff161c424eef897da5d8037d49540 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:39:36 +0800 Subject: [PATCH 0683/1191] update From 4dc8a965b2faf21fbc64323c9dc212fa24bd69a5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:40:01 +0800 Subject: [PATCH 0684/1191] update From 0d1f5aabd51226a0a854d2edff8748fd8f9e30a9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:40:03 +0800 Subject: [PATCH 0685/1191] update From 5a008fec58c7e6422b7b051ebd350edc1a6fe7b1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:40:32 +0800 Subject: [PATCH 0686/1191] update From 8f8dee8061c961c1f2278b25f78cb4904d343f79 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:40:34 +0800 Subject: [PATCH 0687/1191] update From 54566260db6be5901c7c98877855a68380ec0509 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:41:06 +0800 Subject: [PATCH 0688/1191] update From fe96e28e5ef7f049c30bed4ad96fe40f525af0bc Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:41:07 +0800 Subject: [PATCH 0689/1191] update From e2f6d2990db458172197cafe2a895ab8ff450f21 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:41:31 +0800 Subject: [PATCH 0690/1191] update From 40599117cfd16d4519b3edf0eae14b70e1e3af83 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:41:33 +0800 Subject: [PATCH 0691/1191] update From 6a2f36be03e3b6bfe3c60f0ab8b93ce032684d32 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:42:03 +0800 Subject: [PATCH 0692/1191] update From ee03c886da61b8d783e93276ae66465701c94706 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:42:05 +0800 Subject: [PATCH 0693/1191] update From b80fa066aeaebfe0fe5a3b2b6a753c8affe42b37 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:42:32 +0800 Subject: [PATCH 0694/1191] update From ba9e106091ab1b1e495ebd594b33e2cf15c2bea5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:42:33 +0800 Subject: [PATCH 0695/1191] update From 6b782b55d9e694970f810dbf77749756aa34ff5b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:43:05 +0800 Subject: [PATCH 0696/1191] update From 4948fcc810f2d944341a5d0cbb4d17502a64c37a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:43:07 +0800 Subject: [PATCH 0697/1191] update From ee6763521373e110d53b79c8be051d48de445fc6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:43:32 +0800 Subject: [PATCH 0698/1191] update From 12b592771f58259699cb2f43c8e2754ee2eebce4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:43:34 +0800 Subject: [PATCH 0699/1191] update From f658534ab3438cb4ddcad68bb3b815bbee29a275 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:44:09 +0800 Subject: [PATCH 0700/1191] update From d643a62806d3a1d11f62390d08c430c440fb1c85 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:44:11 +0800 Subject: [PATCH 0701/1191] update From 7a5b8e8435571f76d3ce621ec484f9de69989dc0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:44:31 +0800 Subject: [PATCH 0702/1191] update From 8fc0c78ed7285e8117e3add3fb5896380a6f7960 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:44:34 +0800 Subject: [PATCH 0703/1191] update From f83ad2ca45cb0ee0a56882c4527f333909d63e10 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 23:13:14 +0800 Subject: [PATCH 0704/1191] Update sub_script.conf --- sub_script.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sub_script.conf b/sub_script.conf index d5debcf20..001f064b5 100644 --- a/sub_script.conf +++ b/sub_script.conf @@ -13,4 +13,4 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com # wb ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js From dfac5f74d715a26a9ccbe6530625b3556518ca54 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 23:43:44 +0800 Subject: [PATCH 0705/1191] update --- eval_sub/quanx.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index e6176fbd6..53c1a128c 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -14,4 +14,4 @@ hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api. ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) url script-response-body eval_script.js \ No newline at end of file +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file From 1f6ad857e5ff9205c398f02f02c913675be4a978 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 23:43:46 +0800 Subject: [PATCH 0706/1191] update --- eval_sub/surge.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index a051c077f..fa5d2ffee 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -14,4 +14,4 @@ http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22vid http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=eval_script.js -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) requires-body=1,script-path=eval_script.js \ No newline at end of file +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js \ No newline at end of file From 2336098295dc34d86d7a8722e1f6547080615f0b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 23:44:02 +0800 Subject: [PATCH 0707/1191] update From e7a31d113085cf96c9d1b005f6ed860d8ec17858 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 23:44:04 +0800 Subject: [PATCH 0708/1191] update From 2fd64799db4573598d29a27b1b4082c1c157ff5a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 23:44:32 +0800 Subject: [PATCH 0709/1191] update From 1d4f333fe53870f2b71b60f701ceab85df86c711 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 23:44:33 +0800 Subject: [PATCH 0710/1191] update From ed5780c438a725492ff20c48e3fe96c746e5398a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 23:45:01 +0800 Subject: [PATCH 0711/1191] update From 3db5d7fa306abdc1fad447e2ac30dbc5d8532958 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Apr 2020 23:45:02 +0800 Subject: [PATCH 0712/1191] update From e4ed907b436a0a245249404c2b1e5a69fddadf43 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 00:00:07 +0800 Subject: [PATCH 0713/1191] update From 5679b76287bdcbd4848e72eea812bd8b4b53e34d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 00:00:09 +0800 Subject: [PATCH 0714/1191] update From f848cd2165162de2e2fb282328516f083ce96b8a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 21:55:59 +0800 Subject: [PATCH 0715/1191] update --- eval_sub/quanx.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index 53c1a128c..3c626d92b 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,7 +1,5 @@ hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -^https?://api\\.jd\.com/ssclient\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js - ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js ^http://.+/amdc/mobileDispatch url script-request-body eval_script.js From dfd8026ceb709e9b52f6d5862ab96fd9bf487432 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 21:56:02 +0800 Subject: [PATCH 0716/1191] update --- eval_sub/surge.txt | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index fa5d2ffee..7c854e87b 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,7 +1,5 @@ hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -http-response ^https?://api\\.jd\.com/ssclient\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js - http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js @@ -14,4 +12,18 @@ http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22vid http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=eval_script.js -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js \ No newline at end of file +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js + +eval_script.js = type=http-response,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),requires-body=1,script-path=eval_script.js + +eval_script.js = type=http-request,pattern=^http://.+/amdc/mobileDispatch,requires-body=1,script-path=eval_script.js + +eval_script.js = type=http-response,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,requires-body=1,script-path=eval_script.js + +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + +eval_script.js = type=http-response,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,requires-body=1,script-path=eval_script.js + +eval_script.js = type=http-response,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),requires-body=1,script-path=eval_script.js + +eval_script.js = type=http-response,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),requires-body=1,script-path=eval_script.js \ No newline at end of file From aa0080e59a06432697c8ffa468658a7640749abe Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:01:24 +0800 Subject: [PATCH 0717/1191] update From 433a13143cb1b90c0efaee8e2e546872db8ae318 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:01:27 +0800 Subject: [PATCH 0718/1191] update --- eval_sub/surge.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index 7c854e87b..bd155b3b7 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -14,16 +14,16 @@ http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/w http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js -eval_script.js = type=http-response,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),requires-body=1,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js -eval_script.js = type=http-request,pattern=^http://.+/amdc/mobileDispatch,requires-body=1,script-path=eval_script.js +eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js -eval_script.js = type=http-response,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,requires-body=1,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -eval_script.js = type=http-response,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,requires-body=1,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -eval_script.js = type=http-response,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),requires-body=1,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js -eval_script.js = type=http-response,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),requires-body=1,script-path=eval_script.js \ No newline at end of file +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From 2e3d483c8bdb13cf6da0207b87af052736d5ab80 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:02:39 +0800 Subject: [PATCH 0719/1191] update --- eval_sub/quanx.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index 3c626d92b..1d26647c3 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,4 +1,4 @@ -hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js From e2121f64d984b421aa789e01c07a02b8e74d55b6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:02:42 +0800 Subject: [PATCH 0720/1191] update --- eval_sub/surge.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index bd155b3b7..b7e181fe2 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,4 +1,4 @@ -hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js From 44594250faee483f8c1ca08a9a05d5c7772bf2f8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:03:39 +0800 Subject: [PATCH 0721/1191] update --- eval_sub/quanx.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index 1d26647c3..e2623bf78 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,7 +1,5 @@ -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js - ^http://.+/amdc/mobileDispatch url script-request-body eval_script.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js From b9c178fe177d4da57bc4e91a44a84e951fe643e2 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:03:42 +0800 Subject: [PATCH 0722/1191] update --- eval_sub/surge.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index b7e181fe2..91d950346 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,7 +1,5 @@ -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js - http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js @@ -14,8 +12,6 @@ http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/w http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js - eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js From 8441c6dfb10bf94d609218df4b9aa589c742f7dd Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:04:34 +0800 Subject: [PATCH 0723/1191] update From 374439bf9e7fc139c525f8a77ade7acfcd81ad92 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:04:36 +0800 Subject: [PATCH 0724/1191] update From 709f32ab3d599b0313e7a11c0ab19ac18e43736d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:06:56 +0800 Subject: [PATCH 0725/1191] update From 8643b1fd85bec487bee0aaed39141b35603922e5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:06:59 +0800 Subject: [PATCH 0726/1191] update From 982c7b654f5e82c51053de2757c9817985731979 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:07:39 +0800 Subject: [PATCH 0727/1191] update --- eval_sub/quanx.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index e2623bf78..f7084bed4 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,9 +1,5 @@ -^http://.+/amdc/mobileDispatch url script-request-body eval_script.js - -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js - ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js From 7b13455b72b5575e550f05857b97c0e7f0b30e95 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:07:42 +0800 Subject: [PATCH 0728/1191] update --- eval_sub/surge.txt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index 91d950346..1af8ebf79 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,9 +1,5 @@ -http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js - -http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js - http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=eval_script.js http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js @@ -12,10 +8,6 @@ http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/w http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js -eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js - eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js From 4db7238fa16f7ac9e4d77e1f6e096f99a910e153 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:08:38 +0800 Subject: [PATCH 0729/1191] update --- eval_sub/quanx.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index f7084bed4..e2623bf78 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,5 +1,9 @@ +^http://.+/amdc/mobileDispatch url script-request-body eval_script.js + +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js + ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js From f20f997cb6860b7f85bff19be919baf589bef638 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:08:41 +0800 Subject: [PATCH 0730/1191] update --- eval_sub/surge.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index 1af8ebf79..91d950346 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,5 +1,9 @@ +http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js + +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js + http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=eval_script.js http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js @@ -8,6 +12,10 @@ http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/w http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js +eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js + eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js From 3eefd6cca4ef910cc32f8ddccbd666efdc445297 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:09:35 +0800 Subject: [PATCH 0731/1191] update From 5b1b2b260da5e8ccd4fde9b6f7cbdaab334c7b69 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:09:38 +0800 Subject: [PATCH 0732/1191] update From 9462299d5a4a032af1c024d7024d8a94634ed342 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:10:12 +0800 Subject: [PATCH 0733/1191] update --- eval_sub/quanx.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index e2623bf78..1d26647c3 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,5 +1,7 @@ +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js + ^http://.+/amdc/mobileDispatch url script-request-body eval_script.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js From b8c5b4a9bccb4f7e7b3f3fb6f4cc0d0ff4b203c3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:10:15 +0800 Subject: [PATCH 0734/1191] update --- eval_sub/surge.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index 91d950346..b7e181fe2 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,5 +1,7 @@ +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js + http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js @@ -12,6 +14,8 @@ http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/w http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js + eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js From f0ff134f3d755d2a58e0138183b45dbdf9cd0742 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:11:05 +0800 Subject: [PATCH 0735/1191] update --- eval_sub/quanx.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index 1d26647c3..e2623bf78 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,7 +1,5 @@ -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js - ^http://.+/amdc/mobileDispatch url script-request-body eval_script.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js From a1dc938659b4cfe1fef89b5b61861d7a9dc0a5b6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:11:08 +0800 Subject: [PATCH 0736/1191] update --- eval_sub/surge.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index b7e181fe2..91d950346 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,7 +1,5 @@ -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js - http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js @@ -14,8 +12,6 @@ http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/w http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js - eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js From d392bd1806f9d358c8d3d4e6c24cdde4d4f9dd27 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:13:34 +0800 Subject: [PATCH 0737/1191] update --- eval_sub/quanx.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index e2623bf78..6db72edf0 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -6,8 +6,4 @@ ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js - -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js - -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js \ No newline at end of file From b2351f3999212455752581b46f25ee5dfad27603 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:13:38 +0800 Subject: [PATCH 0738/1191] update --- eval_sub/surge.txt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index 91d950346..63eef83cf 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -8,18 +8,10 @@ http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22vide http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js -http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=eval_script.js - -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js - eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js \ No newline at end of file From 984fcec5524f6a9534429d9f588007a083d4b21d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:15:12 +0800 Subject: [PATCH 0739/1191] update --- eval_sub/quanx.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index 6db72edf0..3c626d92b 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,4 +1,6 @@ +hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js ^http://.+/amdc/mobileDispatch url script-request-body eval_script.js @@ -6,4 +8,8 @@ ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js \ No newline at end of file +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js + +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js + +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file From e05dd2735052e2ad238d7752e626bc9e5223c417 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:15:15 +0800 Subject: [PATCH 0740/1191] update --- eval_sub/surge.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index 63eef83cf..bd155b3b7 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,4 +1,6 @@ +hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js @@ -8,10 +10,20 @@ http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22vide http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js +http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=eval_script.js + +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js + eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js \ No newline at end of file +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From bbb69225a41be947357d4ef806de73704c3024dc Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:42:48 +0800 Subject: [PATCH 0741/1191] update --- eval_sub/quanx.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index 3c626d92b..1d26647c3 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,4 +1,4 @@ -hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js From a097d2fdc75c94bf506eb4563a3f7b7d167d12d4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:42:51 +0800 Subject: [PATCH 0742/1191] update --- eval_sub/surge.txt | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index bd155b3b7..ba380ea34 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,29 +1,29 @@ -hostname=api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js -http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js +http-http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js -http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js +http-http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js -http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=eval_script.js +http-http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js -http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js +http-http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=eval_script.js -http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=eval_script.js +http-http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js +http-http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js +http-http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js -eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=11.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js +eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=22.js -eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=33.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=44.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=55.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=66.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=77.js \ No newline at end of file From ac0f5e62e27ba8537a7c1350bb3b2f90f05b7064 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:43:44 +0800 Subject: [PATCH 0743/1191] update From f2ced496ad92768845219c3e78737ec1fd8cd4ab Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:43:47 +0800 Subject: [PATCH 0744/1191] update --- eval_sub/surge.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index ba380ea34..04efde3b0 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,18 +1,18 @@ -http-http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js -http-http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js +http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js -http-http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js -http-http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=eval_script.js +http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=eval_script.js -http-http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js +http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js -http-http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=eval_script.js +http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=eval_script.js -http-http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=11.js From 1ccf0a30a64210816e859fafef4d785381166f7e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:47:27 +0800 Subject: [PATCH 0745/1191] update From d477203c3c12bf909c185d1d8bb1f480e3f6b83f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:47:30 +0800 Subject: [PATCH 0746/1191] update From 6a9660278a508405b0ec5d3714c498a86346d6c5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:50:12 +0800 Subject: [PATCH 0747/1191] update From 0b44c20402e17c24eba2aa5280df573652531982 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:50:15 +0800 Subject: [PATCH 0748/1191] update From 63570975a43dd1d3240712984533ddcb66aae16e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:51:57 +0800 Subject: [PATCH 0749/1191] update From 64abf05561434c83e955cf668742bab0c5347982 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:52:01 +0800 Subject: [PATCH 0750/1191] update --- eval_sub/surge.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index 04efde3b0..b7e181fe2 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -14,16 +14,16 @@ http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/w http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=11.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js -eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=22.js +eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=33.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js -eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=44.js +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=55.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=66.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=77.js \ No newline at end of file +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From 427c0a6ae55d066279b7abe3f14fe12b13ee3af7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:53:37 +0800 Subject: [PATCH 0751/1191] update --- eval_sub/quanx.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index 1d26647c3..c0110c0d4 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,4 +1,4 @@ - +hostname=www.baidu.com,www.google.com ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js From 224014089bfc15cd115288c30b6af68b6de42e1a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:53:40 +0800 Subject: [PATCH 0752/1191] update --- eval_sub/surge.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index b7e181fe2..761095ec3 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,4 +1,4 @@ - +hostname=www.baidu.com,www.google.com http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js From 56ee0b81d7bdcc6555f92bcfd2bdc7d0fecf6213 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:55:16 +0800 Subject: [PATCH 0753/1191] update --- eval_sub/quanx.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index c0110c0d4..6e12235af 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,4 +1,4 @@ -hostname=www.baidu.com,www.google.com +hostname = www.baidu.com,www.google.com ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js From 041267c4d7cabed66ea2c672c594a3d5f1f42d1e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 22:55:19 +0800 Subject: [PATCH 0754/1191] update --- eval_sub/surge.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index 761095ec3..756e2a798 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,4 +1,4 @@ -hostname=www.baidu.com,www.google.com +hostname = www.baidu.com,www.google.com http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js From 7e162dbe9b5f278e3e7f6b2c5f724b7130d933a1 Mon Sep 17 00:00:00 2001 From: goose Date: Sat, 11 Apr 2020 22:58:25 +0800 Subject: [PATCH 0755/1191] support surge's new syntax --- eval_script.js | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/eval_script.js b/eval_script.js index 3d57ea615..bde3b3804 100644 --- a/eval_script.js +++ b/eval_script.js @@ -155,7 +155,7 @@ if (__tool.isTask) { //update github .then(() => { if (__isUpdateGithub) { - const hostname = `${storeObj.confHostnames.length > 0 ? `hostname=${Array.from(new Set(storeObj.confHostnames)).join(",")}` : ""}` + const hostname = `${storeObj.confHostnames.length > 0 ? `hostname = ${Array.from(new Set(storeObj.confHostnames)).join(",")}` : ""}` const quanxUpdateContent = `${hostname}\n\n${Array.from(new Set(storeObj.quanxConfContents)).join("\n\n")}` const surgeUpdateContent = `${hostname}\n\n${Array.from(new Set(storeObj.surgeConfContents)).join("\n\n")}` const args = [{ path: __quanxPath, content: quanxUpdateContent, commit: __quanxCommit }, { path: __surgePath, content: surgeUpdateContent, commit: __surgeCommit }] @@ -462,6 +462,7 @@ function ____parseRemoteConf(conf) { for (let i = 0, len = lines.length; i < len; i++) { const eval = /^(.+)\s+eval\s+(.+)$/ const surge = /^http\s*-\s*(request|response)\s+(\S+)\s+(.+)$/ + const newSurge = /^\S+.js\s+=\s(.+)$/ const quanx = /^(\S+)\s+url\s+script\s*-\s*(\S+)\s*-\s*(?:header|body)\s+(\S+)$/ let line = lines[i].trim() if (line.length > 0) { @@ -469,7 +470,7 @@ function ____parseRemoteConf(conf) { line = line.replace(/^#*/, "") newLines.push(line) } else if (/^(?!;|#|\/\/).*/.test(line)) { - if (eval.test(line) || surge.test(line)) { + if (eval.test(line) || surge.test(line) || newSurge.test(line)) { newLines.push(line) } if (quanx.test(line)) { @@ -496,16 +497,19 @@ function ____parseConf(lines) { if (line.length > 0 && line.substring(0, 2) != "//" && line.substring(0, 1) != "#") { const eval = /^(.+)\s+eval\s+(.+)$/ const surge = /^http\s*-\s*(request|response)\s+(\S+)\s+(.+)$/ + const newSurge = /^\S+.js\s+=\s(.+)$/ const quanx = /^(\S+)\s+url\s+script\s*-\s*(\S+)\s+(\S+\.js)$/ if (surge.test(line)) { const result = line.match(surge) // content const requiresBody = ____surgeArg(result[3].trim()).requiresBody - surgeConfContents.push(`${line.replace(____surgeArg(result[3].trim()).scriptPath, "eval_script.js")}`) + surgeConfContents.splice(i, 0, `${line.replace(____surgeArg(result[3].trim()).scriptPath, "eval_script.js")}`); + surgeConfContents.push(`eval_script.js = type=http-${result[1].trim()},${requiresBody ? `requires-body=${requiresBody},` : ""}pattern=${result[2].trim()},script-path=eval_script.js`) quanxConfContents.push(`${result[2].trim()} url script-${result[1].trim()}-${requiresBody == "1" ? "body" : "header"} eval_script.js`) // eval line = `${result[1].trim()} ${result[2].trim()} eval ${____surgeArg(result[3].trim()).scriptPath}` - } else if (quanx.test(line)) { + } + else if (quanx.test(line)) { const result = line.match(quanx) const type = result[2].split("-") // content @@ -517,11 +521,21 @@ function ____parseConf(lines) { requires = 1 } } - surgeConfContents.push(`http-${type[0].trim()} ${result[1].trim()} ${requires == 0 ? "" : `requires-body=${requires},`}script-path=eval_script.js`) + surgeConfContents.splice(i, 0, `http-${type[0].trim()} ${result[1].trim()} ${requires == 0 ? "" : `requires-body=${requires},`}script-path=eval_script.js`) + surgeConfContents.push(`eval_script.js = type=http-${type[0].trim()},${requires == 0 ? "" : `requires-body=${requires},`}pattern=${result[1].trim()},script-path=eval_script.js`) quanxConfContents.push(`${line.replace(result[3].trim(), "eval_script.js")}`) // eval line = `${type[0].trim()} ${result[1].trim()} eval ${result[3].trim()}` - + } + else if (newSurge.test(line)) { + //content + const result = line.match(newSurge) + const surgeArg = ____surgeArg(result[1].trim()) + surgeConfContents.splice(i, 0, `${surgeArg.type} ${surgeArg.pattern} ${surgeArg.requiresBody ? `requires-body=${surgeArg.requiresBody},` : ""}script-path=eval_script.js`) + surgeConfContents.push(`eval_script.js = ${result[1].replace(surgeArg.scriptPath, "eval_script.js")}`) + quanxConfContents.push(`${surgeArg.pattern} url script-${surgeArg.type.replace("http-", "")}-${(surgeArg.requiresBody && surgeArg.requiresBody == "1") ? "body" : "header"} eval_script.js`) + // eval + line = `${surgeArg.type.replace("http-", "")} ${surgeArg.pattern} eval ${surgeArg.scriptPath}` } if (eval.test(line)) { const value = line.match(eval) @@ -572,12 +586,20 @@ function ____surgeArg(arg) { const item = args[i].trim() const path = /^script-path\s*=\s*(\S+)$/ const requires = /^requires-body\s*=\s*(\S+)$/ + const pattern = /^pattern\s*=\s*(\S+)$/ + const type = /^type\s*=\s*(\S+)$/ if (path.test(item)) { surgeArg["scriptPath"] = item.match(path)[1] } if (requires.test(item)) { surgeArg["requiresBody"] = item.match(requires)[1] } + if (pattern.test(item)) { + surgeArg["pattern"] = item.match(pattern)[1] + } + if (type.test(item)) { + surgeArg["type"] = item.match(type)[1] + } } return surgeArg } From 8e89a3bfb453b72d1fff7fda23d893cf059de5d2 Mon Sep 17 00:00:00 2001 From: goose Date: Sat, 11 Apr 2020 23:00:39 +0800 Subject: [PATCH 0756/1191] support surge's new syntax --- eval_script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eval_script.js b/eval_script.js index bde3b3804..16b86ef44 100644 --- a/eval_script.js +++ b/eval_script.js @@ -17,9 +17,9 @@ https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf ` -// 是否开启 GitHub 更新 +// 是否更新 GitHub(如果开启 true,需配置 token 或 账号密码) const __isUpdateGithub = true -// GitHub Token(如果使用账号密码 Token 请设置为空 "") +// GitHub Token(如果使用账号密码 token 请设置为空 "") const __token = "" // GitHub 账号 const __username = "xxx" From fe2ba7dcc92f791dd7f1bbe1d24b66b65e272d3b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:04:49 +0800 Subject: [PATCH 0757/1191] update --- eval_sub/quanx.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt index 6e12235af..90bab29b4 100644 --- a/eval_sub/quanx.txt +++ b/eval_sub/quanx.txt @@ -1,4 +1,4 @@ -hostname = www.baidu.com,www.google.com +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js From 92c503a5e088c149480775d662dc09e1e05e06c9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:04:52 +0800 Subject: [PATCH 0758/1191] update --- eval_sub/surge.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt index 756e2a798..4d65ee7ad 100644 --- a/eval_sub/surge.txt +++ b/eval_sub/surge.txt @@ -1,4 +1,4 @@ -hostname = www.baidu.com,www.google.com +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js From bcf36b54a9ea0d44193526f5e3597be2966529da Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:10:05 +0800 Subject: [PATCH 0759/1191] update From 0b9ab3f6c4b1f51aa3db84880010eda7c26aa7a0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:10:08 +0800 Subject: [PATCH 0760/1191] update From ae82a1a40121c05765f239a0fd6a375ef381551f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:10:33 +0800 Subject: [PATCH 0761/1191] update From 89ea0f99e54d90a6f9e80af5dc24d3a5fa7dfe34 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:10:34 +0800 Subject: [PATCH 0762/1191] update From 5f43cd8a6d6f7e5e4daed51714479c0b33f1db25 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:11:01 +0800 Subject: [PATCH 0763/1191] update From 82f8bbcb98733dfb2a60ef02decfde6cdb81b5d5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:11:03 +0800 Subject: [PATCH 0764/1191] update From deeb772a29464c4dd27f8554c58cfd192cce8b13 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:11:32 +0800 Subject: [PATCH 0765/1191] update From 02deba4d248ab749d87e473e6997d861c857d633 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:11:33 +0800 Subject: [PATCH 0766/1191] update From 8e1f78dbdd3247f87af49021b820397f61c6cef2 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:12:07 +0800 Subject: [PATCH 0767/1191] update From 176ebe86ed0c2c55207cad1f89e38070b55d0442 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:12:09 +0800 Subject: [PATCH 0768/1191] update From 518e59db4b403896cb9ebcf2331bf1e5ffea803f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:14:32 +0800 Subject: [PATCH 0769/1191] update From 661cf97f0362fa886cc85649468c9958c0b5d436 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:14:36 +0800 Subject: [PATCH 0770/1191] update From 86b775a07a63e00f991ed44c68d03b8d5a4e216a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:19:25 +0800 Subject: [PATCH 0771/1191] update --- eval_remote/quanx.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 eval_remote/quanx.txt diff --git a/eval_remote/quanx.txt b/eval_remote/quanx.txt new file mode 100644 index 000000000..90bab29b4 --- /dev/null +++ b/eval_remote/quanx.txt @@ -0,0 +1,15 @@ +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js + +^http://.+/amdc/mobileDispatch url script-request-body eval_script.js + +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js + +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js + +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file From e09e3d80c60ef23d71274120c93cc5e1f8f155b4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:19:29 +0800 Subject: [PATCH 0772/1191] update --- eval_remote/surge.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 eval_remote/surge.txt diff --git a/eval_remote/surge.txt b/eval_remote/surge.txt new file mode 100644 index 000000000..4d65ee7ad --- /dev/null +++ b/eval_remote/surge.txt @@ -0,0 +1,29 @@ +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js + +http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js + +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js + +http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=eval_script.js + +http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js + +http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=eval_script.js + +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js + +eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js + +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From b2215b47e855df5d4b7d8f39f33c12440c083ecd Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:20:40 +0800 Subject: [PATCH 0773/1191] Delete quanx.txt --- eval_sub/quanx.txt | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 eval_sub/quanx.txt diff --git a/eval_sub/quanx.txt b/eval_sub/quanx.txt deleted file mode 100644 index 90bab29b4..000000000 --- a/eval_sub/quanx.txt +++ /dev/null @@ -1,15 +0,0 @@ -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com - -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js - -^http://.+/amdc/mobileDispatch url script-request-body eval_script.js - -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js - -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js - -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file From b777c71013d7cf99bcc7e1625bec091413595448 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:20:50 +0800 Subject: [PATCH 0774/1191] Delete surge.txt --- eval_sub/surge.txt | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 eval_sub/surge.txt diff --git a/eval_sub/surge.txt b/eval_sub/surge.txt deleted file mode 100644 index 4d65ee7ad..000000000 --- a/eval_sub/surge.txt +++ /dev/null @@ -1,29 +0,0 @@ -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com - -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js - -http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js - -http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js - -http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=eval_script.js - -http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js - -http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=eval_script.js - -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js - -eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js - -eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From e67d37668c6b4675cc0b7d0548a01f786eda81d4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 00:00:14 +0800 Subject: [PATCH 0775/1191] update From c27dc16749b016240ccca7e99b4dd97ab1d9775a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 00:00:16 +0800 Subject: [PATCH 0776/1191] update From 2e388a51a6fb343223e3a02b9be7f31ec542b949 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 21:49:19 +0800 Subject: [PATCH 0777/1191] update From a9b810be2e5ff44f2ebdfca36a67a0a7e38bb5af Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 21:49:23 +0800 Subject: [PATCH 0778/1191] update --- eval_remote/surge.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eval_remote/surge.txt b/eval_remote/surge.txt index 4d65ee7ad..c15a4f502 100644 --- a/eval_remote/surge.txt +++ b/eval_remote/surge.txt @@ -1,6 +1,7 @@ +[MITM] hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js +[Script]http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js From 970d92158a25f00054cf6d2c82d5bb73d5c39b66 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 21:49:31 +0800 Subject: [PATCH 0779/1191] update From d9f35918ee89c0b9c4553166338114aff47e1f2b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 21:49:35 +0800 Subject: [PATCH 0780/1191] update --- eval_remote/surge.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eval_remote/surge.txt b/eval_remote/surge.txt index c15a4f502..bb35bd990 100644 --- a/eval_remote/surge.txt +++ b/eval_remote/surge.txt @@ -1,7 +1,8 @@ [MITM] hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -[Script]http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js +[Script] +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js From 35dcfdd9dd1a00739443fdb3f19fb06946bbff6e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 21:50:25 +0800 Subject: [PATCH 0781/1191] update From d96cfa0e4595afd70efbd46e481041fc96cebdb9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 21:50:28 +0800 Subject: [PATCH 0782/1191] update --- eval_remote/surge.txt | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/eval_remote/surge.txt b/eval_remote/surge.txt index bb35bd990..7f9933c89 100644 --- a/eval_remote/surge.txt +++ b/eval_remote/surge.txt @@ -2,20 +2,6 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=eval_script.js - -http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=eval_script.js - -http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=eval_script.js - -http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=eval_script.js - -http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=eval_script.js - -http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=eval_script.js - -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=eval_script.js - eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js From 499b89d05c2acc7fb43248448dacf3d0814f517d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 21:51:13 +0800 Subject: [PATCH 0783/1191] update From 83a3d2305db5f993bf2924a64c9bbf1b25b2909e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 21:51:17 +0800 Subject: [PATCH 0784/1191] update --- eval_remote/script.sgmodule | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 eval_remote/script.sgmodule diff --git a/eval_remote/script.sgmodule b/eval_remote/script.sgmodule new file mode 100644 index 000000000..7f9933c89 --- /dev/null +++ b/eval_remote/script.sgmodule @@ -0,0 +1,17 @@ +[MITM] +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +[Script] +eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js + +eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js + +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From 395b421c84adb4306017a228db6311dde78f86c9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:19:01 +0800 Subject: [PATCH 0785/1191] update From 61cf59a60528fc7f819bb74d605c28cfc5eefa28 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:19:04 +0800 Subject: [PATCH 0786/1191] update --- eval_remote/script.sgmodule | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_remote/script.sgmodule b/eval_remote/script.sgmodule index 7f9933c89..94c37c453 100644 --- a/eval_remote/script.sgmodule +++ b/eval_remote/script.sgmodule @@ -1,5 +1,5 @@ [MITM] -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js From 8e50055df71b23b40be5d9db02a31ca7290f70a1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:19:54 +0800 Subject: [PATCH 0787/1191] update From e08712e8b903e29d2527acfc23eb3602aad5b9d6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:19:57 +0800 Subject: [PATCH 0788/1191] update From 8e948f659e8c239a85caa621bea1cb685dc904ae Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:22:11 +0800 Subject: [PATCH 0789/1191] update From d7c3a158c68ae94cfec6b0623536f0f23fa3e32d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:22:15 +0800 Subject: [PATCH 0790/1191] update --- eval_remote/script.sgmodule | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eval_remote/script.sgmodule b/eval_remote/script.sgmodule index 94c37c453..73fd0f683 100644 --- a/eval_remote/script.sgmodule +++ b/eval_remote/script.sgmodule @@ -1,3 +1,5 @@ +#!name= script module + [MITM] hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com From d39b9e8432a3cf514992713b6492cf17d198c2e5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:22:49 +0800 Subject: [PATCH 0791/1191] update From 6893374843ae8cd542a2827ad57e4e19948f051d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:22:53 +0800 Subject: [PATCH 0792/1191] update --- eval_remote/script.sgmodule | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eval_remote/script.sgmodule b/eval_remote/script.sgmodule index 73fd0f683..1e987283d 100644 --- a/eval_remote/script.sgmodule +++ b/eval_remote/script.sgmodule @@ -1,4 +1,5 @@ -#!name= script module +#!name=script module +#!desc=eval_script.js [MITM] hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com From a7dd114c4a3507e856784b47e966ef00a549229f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:23:09 +0800 Subject: [PATCH 0793/1191] update From 31cd12d296fe0fe9fbb0ba246eff5287c4af2bd7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:23:12 +0800 Subject: [PATCH 0794/1191] update --- eval_remote/script.sgmodule | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eval_remote/script.sgmodule b/eval_remote/script.sgmodule index 1e987283d..fe5810f5e 100644 --- a/eval_remote/script.sgmodule +++ b/eval_remote/script.sgmodule @@ -1,5 +1,4 @@ -#!name=script module -#!desc=eval_script.js +#!name=eval_script module [MITM] hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com From 823583a90dbf813e4a34e2ca09c79914c56c07f8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:23:38 +0800 Subject: [PATCH 0795/1191] update From 1c71f2493150280c9d5a768585cd4ab2bcaa1439 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:23:41 +0800 Subject: [PATCH 0796/1191] update From 396c32adb21115349f7f696f58e2e05b4349b1be Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:23:51 +0800 Subject: [PATCH 0797/1191] update From 9a16b5a115729ae14cfaedcc1af916212355c370 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:23:54 +0800 Subject: [PATCH 0798/1191] update --- eval_remote/script.sgmodule | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_remote/script.sgmodule b/eval_remote/script.sgmodule index fe5810f5e..661d82518 100644 --- a/eval_remote/script.sgmodule +++ b/eval_remote/script.sgmodule @@ -1,4 +1,4 @@ -#!name=eval_script module +#!name=eval_script.js module [MITM] hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com From cb61ca764e434a19df1126e2a5596da45b27cb20 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:24:23 +0800 Subject: [PATCH 0799/1191] update From 149f3f17a88fd5e9dff865f22931f61cac42d13d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:24:26 +0800 Subject: [PATCH 0800/1191] update --- eval_remote/eval_script.sgmodule | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 eval_remote/eval_script.sgmodule diff --git a/eval_remote/eval_script.sgmodule b/eval_remote/eval_script.sgmodule new file mode 100644 index 000000000..661d82518 --- /dev/null +++ b/eval_remote/eval_script.sgmodule @@ -0,0 +1,19 @@ +#!name=eval_script.js module + +[MITM] +hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +[Script] +eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js + +eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js + +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From 5892a8e6ad73a952070f0c9382594f98cb6b6dbe Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:24:47 +0800 Subject: [PATCH 0801/1191] update --- eval_remote/eval_script.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 eval_remote/eval_script.txt diff --git a/eval_remote/eval_script.txt b/eval_remote/eval_script.txt new file mode 100644 index 000000000..90bab29b4 --- /dev/null +++ b/eval_remote/eval_script.txt @@ -0,0 +1,15 @@ +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js + +^http://.+/amdc/mobileDispatch url script-request-body eval_script.js + +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js + +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js + +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file From 57684a93b1f096ddcdca04dfcb938fc002821e84 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:24:50 +0800 Subject: [PATCH 0802/1191] update From 2c3291fbc816b0e2dba3d8293c6749523d4e6803 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:25:49 +0800 Subject: [PATCH 0803/1191] Delete quanx.txt --- eval_remote/quanx.txt | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 eval_remote/quanx.txt diff --git a/eval_remote/quanx.txt b/eval_remote/quanx.txt deleted file mode 100644 index 90bab29b4..000000000 --- a/eval_remote/quanx.txt +++ /dev/null @@ -1,15 +0,0 @@ -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com - -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js - -^http://.+/amdc/mobileDispatch url script-request-body eval_script.js - -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js - -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js - -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file From 95709f34d87440101aa460d155eddc69e99b7d5f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:25:58 +0800 Subject: [PATCH 0804/1191] Delete script.sgmodule --- eval_remote/script.sgmodule | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 eval_remote/script.sgmodule diff --git a/eval_remote/script.sgmodule b/eval_remote/script.sgmodule deleted file mode 100644 index 661d82518..000000000 --- a/eval_remote/script.sgmodule +++ /dev/null @@ -1,19 +0,0 @@ -#!name=eval_script.js module - -[MITM] -hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com - -[Script] -eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js - -eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js - -eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From 2d6d1be4df1578a513d93e7e654bc2b3a3974a8d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:26:10 +0800 Subject: [PATCH 0805/1191] Delete surge.txt --- eval_remote/surge.txt | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 eval_remote/surge.txt diff --git a/eval_remote/surge.txt b/eval_remote/surge.txt deleted file mode 100644 index 7f9933c89..000000000 --- a/eval_remote/surge.txt +++ /dev/null @@ -1,17 +0,0 @@ -[MITM] -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com - -[Script] -eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js - -eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js - -eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From c52bfd741ed168b3582e9190568ba97ad34a2d3f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:44:53 +0800 Subject: [PATCH 0806/1191] Delete sub_eval.conf --- sub_eval.conf | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 sub_eval.conf diff --git a/sub_eval.conf b/sub_eval.conf deleted file mode 100644 index 1d0d70ca8..000000000 --- a/sub_eval.conf +++ /dev/null @@ -1,14 +0,0 @@ -# tb -response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail response ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch eval https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - -# jd -response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) eval https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - -# nf -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D eval https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - -# wb -response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js -response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) eval https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js - -# hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com \ No newline at end of file From bbdf250d78cf6c05ac6a02abdee53915694c6900 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:49:04 +0800 Subject: [PATCH 0807/1191] update --- eval_remote/eval_script.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eval_remote/eval_script.txt b/eval_remote/eval_script.txt index 90bab29b4..a7bec5f8e 100644 --- a/eval_remote/eval_script.txt +++ b/eval_remote/eval_script.txt @@ -1,15 +1,15 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js + ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js ^http://.+/amdc/mobileDispatch url script-request-body eval_script.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js - ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file From ffb7e47e73ca830bdba389ff70b3adfd981fa515 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:49:07 +0800 Subject: [PATCH 0808/1191] update --- eval_remote/eval_script.sgmodule | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eval_remote/eval_script.sgmodule b/eval_remote/eval_script.sgmodule index 661d82518..39b0e6ebe 100644 --- a/eval_remote/eval_script.sgmodule +++ b/eval_remote/eval_script.sgmodule @@ -4,16 +4,16 @@ hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js -eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js - eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From 5ebc1982cf22605e625e55b11a7e346f0f13dfd6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:51:14 +0800 Subject: [PATCH 0809/1191] update From b091fc111199a66da48308257dfbb24b5cfc7004 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:51:17 +0800 Subject: [PATCH 0810/1191] update From 724e9d584f1d21dcc08d2b0186dbaab57a89a59e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:55:34 +0800 Subject: [PATCH 0811/1191] update From 58fe410fb1406ce79ee9e7c4c2f8d178a9790c6a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:55:37 +0800 Subject: [PATCH 0812/1191] update From d15674630afce8070935fe9d0f1a00b110dfbf57 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:57:37 +0800 Subject: [PATCH 0813/1191] update --- eval_script/qx_script.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 eval_script/qx_script.txt diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt new file mode 100644 index 000000000..a7bec5f8e --- /dev/null +++ b/eval_script/qx_script.txt @@ -0,0 +1,15 @@ +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js + +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js + +^http://.+/amdc/mobileDispatch url script-request-body eval_script.js + +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js + +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js + +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file From 2cc532afdfb884c785cfce9a098126141e789f69 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:57:41 +0800 Subject: [PATCH 0814/1191] update --- eval_script/sg_script.sgmodule | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 eval_script/sg_script.sgmodule diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule new file mode 100644 index 000000000..39b0e6ebe --- /dev/null +++ b/eval_script/sg_script.sgmodule @@ -0,0 +1,19 @@ +#!name=eval_script.js module + +[MITM] +hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +[Script] +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js + +eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From e9f4584ef8a35f1b8f0e4a8fc5f6923061a70f09 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:58:21 +0800 Subject: [PATCH 0815/1191] Delete eval_script.sgmodule --- eval_remote/eval_script.sgmodule | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 eval_remote/eval_script.sgmodule diff --git a/eval_remote/eval_script.sgmodule b/eval_remote/eval_script.sgmodule deleted file mode 100644 index 39b0e6ebe..000000000 --- a/eval_remote/eval_script.sgmodule +++ /dev/null @@ -1,19 +0,0 @@ -#!name=eval_script.js module - -[MITM] -hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com - -[Script] -eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js - -eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From 56bbcb0f17ae9a28d19343590b64a1ef778027b7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 12 Apr 2020 22:58:30 +0800 Subject: [PATCH 0816/1191] Delete eval_script.txt --- eval_remote/eval_script.txt | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 eval_remote/eval_script.txt diff --git a/eval_remote/eval_script.txt b/eval_remote/eval_script.txt deleted file mode 100644 index a7bec5f8e..000000000 --- a/eval_remote/eval_script.txt +++ /dev/null @@ -1,15 +0,0 @@ -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js - -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js - -^http://.+/amdc/mobileDispatch url script-request-body eval_script.js - -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js - -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js - -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file From 633f33f20b32ac4b629eeee1789673090ffa508c Mon Sep 17 00:00:00 2001 From: goose Date: Sun, 12 Apr 2020 23:01:24 +0800 Subject: [PATCH 0817/1191] support surge's module --- eval_script.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/eval_script.js b/eval_script.js index 16b86ef44..b9d5b1f0a 100644 --- a/eval_script.js +++ b/eval_script.js @@ -32,8 +32,8 @@ const __repo = "surge" // GitHub 分支(不指定就使用默认分支) const __branch = "master" // GitHub 文件路径(没有文件新创建,已有文件覆盖更新,路径为空 "" 不更新) -const __quanxPath = "eval_sub/quanx.txt" -const __surgePath = "eval_sub/surge.txt" +const __quanxPath = "eval_script/qx_script.txt" +const __surgePath = "eval_script/sg_script.sgmodule" // GitHub 更新日志 const __quanxCommit = "update" const __surgeCommit = "update" @@ -155,9 +155,10 @@ if (__tool.isTask) { //update github .then(() => { if (__isUpdateGithub) { - const hostname = `${storeObj.confHostnames.length > 0 ? `hostname = ${Array.from(new Set(storeObj.confHostnames)).join(",")}` : ""}` - const quanxUpdateContent = `${hostname}\n\n${Array.from(new Set(storeObj.quanxConfContents)).join("\n\n")}` - const surgeUpdateContent = `${hostname}\n\n${Array.from(new Set(storeObj.surgeConfContents)).join("\n\n")}` + const quanxHostname = `${storeObj.confHostnames.length > 0 ? `hostname = ${Array.from(new Set(storeObj.confHostnames)).join(",")}` : ""}` + const surgeHostname = `${storeObj.confHostnames.length > 0 ? `hostname = %INSERT% ${Array.from(new Set(storeObj.confHostnames)).join(",")}` : ""}` + const quanxUpdateContent = `${quanxHostname}\n\n${Array.from(new Set(storeObj.quanxConfContents)).join("\n\n")}` + const surgeUpdateContent = `#!name=eval_script.js module\n\n[MITM]\n${surgeHostname}\n\n[Script]\n${Array.from(new Set(storeObj.surgeConfContents)).join("\n\n")}` const args = [{ path: __quanxPath, content: quanxUpdateContent, commit: __quanxCommit }, { path: __surgePath, content: surgeUpdateContent, commit: __surgeCommit }] console.log("Start updating github...") const update = async () => { @@ -503,7 +504,7 @@ function ____parseConf(lines) { const result = line.match(surge) // content const requiresBody = ____surgeArg(result[3].trim()).requiresBody - surgeConfContents.splice(i, 0, `${line.replace(____surgeArg(result[3].trim()).scriptPath, "eval_script.js")}`); + // surgeConfContents.splice(i, 0, `${line.replace(____surgeArg(result[3].trim()).scriptPath, "eval_script.js")}`); surgeConfContents.push(`eval_script.js = type=http-${result[1].trim()},${requiresBody ? `requires-body=${requiresBody},` : ""}pattern=${result[2].trim()},script-path=eval_script.js`) quanxConfContents.push(`${result[2].trim()} url script-${result[1].trim()}-${requiresBody == "1" ? "body" : "header"} eval_script.js`) // eval @@ -521,7 +522,7 @@ function ____parseConf(lines) { requires = 1 } } - surgeConfContents.splice(i, 0, `http-${type[0].trim()} ${result[1].trim()} ${requires == 0 ? "" : `requires-body=${requires},`}script-path=eval_script.js`) + // surgeConfContents.splice(i, 0, `http-${type[0].trim()} ${result[1].trim()} ${requires == 0 ? "" : `requires-body=${requires},`}script-path=eval_script.js`) surgeConfContents.push(`eval_script.js = type=http-${type[0].trim()},${requires == 0 ? "" : `requires-body=${requires},`}pattern=${result[1].trim()},script-path=eval_script.js`) quanxConfContents.push(`${line.replace(result[3].trim(), "eval_script.js")}`) // eval From f3554810da53277ab02d5ca579bbe9c5be24559a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 12:19:18 +0800 Subject: [PATCH 0818/1191] Delete sub_script.conf --- sub_script.conf | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 sub_script.conf diff --git a/sub_script.conf b/sub_script.conf deleted file mode 100644 index 001f064b5..000000000 --- a/sub_script.conf +++ /dev/null @@ -1,16 +0,0 @@ -hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com - -# jd -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - -# tb -^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - -# nf -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - -# wb -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js From 75831689c4408669d1246f870b6a73ddb1399cbe Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 12:20:15 +0800 Subject: [PATCH 0819/1191] update From 31d71e4af2033c8521a1ae41576a2f04254a20e7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 12:20:18 +0800 Subject: [PATCH 0820/1191] update From cd6429d88800fa23bc239a61d9c607ea7104150d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 12:20:41 +0800 Subject: [PATCH 0821/1191] update From 2425efae21d1afdb230e084d0d5f52c2f6780ab5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 12:20:44 +0800 Subject: [PATCH 0822/1191] update From 4a3271cc25f566f08328b98dd19f7348d592365d Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 13 Apr 2020 12:21:36 +0800 Subject: [PATCH 0823/1191] update --- eval_script.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/eval_script.js b/eval_script.js index b9d5b1f0a..34a5c9b2e 100644 --- a/eval_script.js +++ b/eval_script.js @@ -1,19 +1,27 @@ const __conf = String.raw` - [Remote] // custom remote... -https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf [Local] // custom local... +# nf +http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +# jd +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +# tb +http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +# wb +http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js [Hostname] // custom hostname... -// www.baidu.com, www.google.com - +api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com ` From bc22f988646fec00eb592c7685a880bea5caad45 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 12:25:00 +0800 Subject: [PATCH 0824/1191] Update README.md --- README.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d05bd6bba..887953743 100644 --- a/README.md +++ b/README.md @@ -114,21 +114,24 @@ Script management tool [Remote] # 可以使用 QuanX 远程重写(如果远程重写不包含 hostname,需配置 [Hostname] ) -https://raw.githubusercontent.com/yichahucha/surge/master/sub_script.conf [Local] # 可以使用 Surge 或者 QuanX 格式脚本(需配置 [Hostname]) +# nf +http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +# jd +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +# tb +http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +# wb +http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js -# jd(Surge) -# http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - -# tb(QuanX) -# ^http://amdc\.m\.taobao\.com/amdc/mobileDispatch url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -# ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [Hostname] - -# api.m.jd.com, trade-acs.m.taobao.com +api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com 3.配置 GitHub From 9c7a9a5b73c871ed0d2120ca8bf8050f34e1fbe1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 12:27:42 +0800 Subject: [PATCH 0825/1191] Update README.md --- README.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 887953743..0426c7be3 100644 --- a/README.md +++ b/README.md @@ -136,22 +136,23 @@ api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd. 3.配置 GitHub -# GitHub Token(如果使用账号密码 Token 请设置为空 "") +// 是否更新 GitHub(如果开启 true,需配置 token 或 账号密码) +const __isUpdateGithub = true +// GitHub Token(如果使用账号密码 token 请设置为空 "") const __token = "" -# GitHub 账号 +// GitHub 账号 const __username = "xxx" -# GitHub 密码 +// GitHub 密码 const __password = "xxx" -# GitHub 用户名 +// GitHub 用户名 const __owner = "yichahucha" -# GitHub 仓库名 +// GitHub 仓库名 const __repo = "surge" -# GitHub 分支(不指定就使用默认分支) +// GitHub 分支(不指定就使用默认分支) const __branch = "master" -# GitHub 文件路径(没有文件新创建,已有文件覆盖更新) -# 默认生成两个文件,不需要的路径设置为空 “” -const __quanxPath = "eval_sub/quanx.txt" -const __surgePath = "eval_sub/surge.txt" +// GitHub 文件路径(没有文件新创建,已有文件覆盖更新,路径为空 "" 不更新) +const __quanxPath = "eval_script/qx_script.txt" // qaunx 远程重写格式文件 +const __surgePath = "eval_script/sg_script.sgmodule" // surge 脚本模块格式文件 4.执行任务更新脚本 From 442ca1c67c03d427b3d320ce821f69890f29955c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 23:43:32 +0800 Subject: [PATCH 0826/1191] update From b645e9cf9ad17b5665d13a35ae9dd3471ba05f10 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 23:43:33 +0800 Subject: [PATCH 0827/1191] update From 4037665dfb185344bbe554ccc5aa00293e45eda7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 23:43:34 +0800 Subject: [PATCH 0828/1191] update From a0bcf1c9a2ab898208ed1bb3354fde238d5435f8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 23:44:35 +0800 Subject: [PATCH 0829/1191] update From 2b35f65f497fcca52a12b62a203e770c4160e6bc Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 23:44:37 +0800 Subject: [PATCH 0830/1191] update From 041a0574a4f274690fc75c162628727046ef5a77 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 23:45:02 +0800 Subject: [PATCH 0831/1191] update From f2c90318398ec9b1036453e1a55f441bfa9270dc Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 23:45:04 +0800 Subject: [PATCH 0832/1191] update From 6e2e52c2daeaee9b97a663a81f237b2a74327422 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 23:45:31 +0800 Subject: [PATCH 0833/1191] update From d87ad805b79f8571893f92bcd7e36bb02c641f2a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 23:45:33 +0800 Subject: [PATCH 0834/1191] update From 7c39faa26a2588f18c6dc677b2c146b479c321e3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 23:45:37 +0800 Subject: [PATCH 0835/1191] update From c6740a361e3b2221b7ff08393b98798a5a828f4e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 13 Apr 2020 23:45:38 +0800 Subject: [PATCH 0836/1191] update From 586846b6f175c8fd1c509871dc63b1f1c6dc659d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 14:52:19 +0800 Subject: [PATCH 0837/1191] update From f9685da4114e569094acca800982af9d1456c042 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 14:52:22 +0800 Subject: [PATCH 0838/1191] update From 24134a41548ee1cd30b8baf274967e0771a8d047 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 14:52:55 +0800 Subject: [PATCH 0839/1191] update From 4adb164aaa452d51e6058b74799dbc0b656e4b47 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 14:52:58 +0800 Subject: [PATCH 0840/1191] update From 9b897490f8f099badcc9094275ad088069fa5798 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 14:56:04 +0800 Subject: [PATCH 0841/1191] update From e02a283652d78630078ee539fe9c1d642a603852 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 14:56:08 +0800 Subject: [PATCH 0842/1191] update From f981391ad5595b0f2f06b29db6d1223ccc8f64cb Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:10:05 +0800 Subject: [PATCH 0843/1191] update From 744ae80d8e803c483cb8fc5e04314f18b71b87bd Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:10:08 +0800 Subject: [PATCH 0844/1191] update From 0d476c09cae51c5e4d99a983923b286b9cda3ea0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:13:38 +0800 Subject: [PATCH 0845/1191] update --- eval_script/qx_script.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index a7bec5f8e..5bf7ea749 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -1,15 +1,15 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -^http://.+/amdc/mobileDispatch url script-request-body eval_script.js +^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js \ No newline at end of file From 576703fbc2fe34e6009111eb93c754a57b714272 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:13:41 +0800 Subject: [PATCH 0846/1191] update --- eval_script/sg_script.sgmodule | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index 39b0e6ebe..e46d04065 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -4,16 +4,16 @@ hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] -eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js +jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js +tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js +tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js +wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file +wb_ad.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js \ No newline at end of file From f13a1967d3dbf7d931cc0bc50b3acf24f360a1a6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:39:10 +0800 Subject: [PATCH 0847/1191] update --- eval_script/qx_script.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index 5bf7ea749..08c101168 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -4,12 +4,12 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,ap ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js \ No newline at end of file +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js \ No newline at end of file From 36c7bdf0da7475e64c2d5e600b372266c73590e1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:39:13 +0800 Subject: [PATCH 0848/1191] update --- eval_script/sg_script.sgmodule | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index e46d04065..dbe3e062a 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -8,12 +8,12 @@ nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/ nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +wb_ad.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js -tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -wb_ad.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js \ No newline at end of file +tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js \ No newline at end of file From f5671f37a0cf6f74277d968d8c592ca28052cc00 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:41:17 +0800 Subject: [PATCH 0849/1191] update From 7eabbda024730742db4f6dfefa095098d541bd60 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:41:21 +0800 Subject: [PATCH 0850/1191] update From c2d42b885e44a453013e645d20300a78369e1961 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:43:20 +0800 Subject: [PATCH 0851/1191] update From c2eb81d2f758eb2de18e950f684f261a51685448 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:43:23 +0800 Subject: [PATCH 0852/1191] update From 256f0427edc305046ec318478acdf91257905ae2 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:44:26 +0800 Subject: [PATCH 0853/1191] update From 3d0acdb455cabcab6b1ba8fcc5ce77b0b499eabd Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:44:29 +0800 Subject: [PATCH 0854/1191] update From 767e74d9a56dccb31587e4c78188d1bada8c12bf Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:45:15 +0800 Subject: [PATCH 0855/1191] update From 29203402269b9e61898eb8aeaee631f0e67d28c4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:45:19 +0800 Subject: [PATCH 0856/1191] update From 9b65c0c5ae373b8ec2ddb91a56363bcd69e93fdf Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:49:05 +0800 Subject: [PATCH 0857/1191] update From 0a5bada90afa0f4dbe9176f0bf80ff0dde81cedf Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:49:08 +0800 Subject: [PATCH 0858/1191] update From d1e719a22877123a8196203ee3c28b77bb4c7f32 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:49:22 +0800 Subject: [PATCH 0859/1191] update From 04ba0a00486d19382b6ed48e42deabb5e0b29187 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:49:26 +0800 Subject: [PATCH 0860/1191] update From 3c28ab2848d968ddcbe5fe40e20eb3d4dcf0b623 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:25:23 +0800 Subject: [PATCH 0861/1191] update --- eval_script/qx_script.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index 08c101168..89796310e 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -1,12 +1,12 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header 22222 -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body 22222 -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body 22222 -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body 22222 ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js From ebf64f41800401fa0cf6b51cf92504e50470c565 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:25:27 +0800 Subject: [PATCH 0862/1191] update --- eval_script/sg_script.sgmodule | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index dbe3e062a..d948a8a8b 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -4,15 +4,15 @@ hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] -nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +undefined = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=22222 -nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +undefined = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=22222 -wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +undefined = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=22222 -wb_ad.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +undefined = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=22222 -jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +undefined = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js From 5a8e914b1188c966ca395fd46155e2ddaf52e7fc Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:26:59 +0800 Subject: [PATCH 0863/1191] update From 1163dbe129265e28a9f8c57d5c2f9c712a9b68b4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:27:03 +0800 Subject: [PATCH 0864/1191] update --- eval_script/sg_script.sgmodule | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index d948a8a8b..a201a223d 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -4,15 +4,15 @@ hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] -undefined = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=22222 +22222 = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=22222 -undefined = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=22222 +22222 = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=22222 -undefined = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=22222 +22222 = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=22222 -undefined = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=22222 +22222 = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=22222 -undefined = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js From 493c05ed7db10abb23bc7ea91653fd4524494ce1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:27:49 +0800 Subject: [PATCH 0865/1191] update From 7f6a2adb37651729b313bd16109b170e4e87f96f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:27:53 +0800 Subject: [PATCH 0866/1191] update From 64d769fa751b688a9cc01fb40817979403065778 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:28:58 +0800 Subject: [PATCH 0867/1191] update --- eval_script/qx_script.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index 89796310e..08c101168 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -1,12 +1,12 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header 22222 +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body 22222 +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body 22222 +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body 22222 +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js From d7ebe4ff73cf8321b21fed7166a6a714bcce25c1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:29:01 +0800 Subject: [PATCH 0868/1191] update --- eval_script/sg_script.sgmodule | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index a201a223d..dbe3e062a 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -4,13 +4,13 @@ hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] -22222 = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=22222 +nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -22222 = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=22222 +nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -22222 = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=22222 +wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -22222 = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=22222 +wb_ad.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js From 92f5cd16f29114ce2327bd259451f4492ca72f5b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:29:22 +0800 Subject: [PATCH 0869/1191] update --- eval_script/qx_script.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index 08c101168..52005f09f 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -1,12 +1,12 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js From 91841759e7bf38342a713eadf0dcb6239e609624 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:29:25 +0800 Subject: [PATCH 0870/1191] update --- eval_script/sg_script.sgmodule | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index dbe3e062a..3565cedf2 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -4,13 +4,13 @@ hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] -nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +eval.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval.js -nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +eval.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval.js -wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +eval.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval.js -wb_ad.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +eval.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval.js jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js From 18990612a11e57bc1d79db9fa0168fc51a8cda4b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:31:39 +0800 Subject: [PATCH 0871/1191] update From 93dba74cc0f8813b97d820a8d9834c09fad9feb1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:31:43 +0800 Subject: [PATCH 0872/1191] update From 82f8e2e4177b02c05f22c3ae6e3e77ce511499ed Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:32:16 +0800 Subject: [PATCH 0873/1191] update --- eval_script/qx_script.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index 52005f09f..eb07513bd 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -8,8 +8,8 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,ap ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval.js -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval.js -^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^http://.+/amdc/mobileDispatch url script-request-body eval.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js \ No newline at end of file +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval.js \ No newline at end of file From 1192d325cdca9dffbe44fa9d3a914ad7d5c772bc Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:32:20 +0800 Subject: [PATCH 0874/1191] update --- eval_script/sg_script.sgmodule | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index 3565cedf2..2693941e9 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -12,8 +12,8 @@ eval.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\ eval.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval.js -jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +eval.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval.js -tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +eval.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval.js -tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js \ No newline at end of file +eval.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval.js \ No newline at end of file From 4a8ab872c3717258b6fafd4325f2d70227a05dfa Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:32:45 +0800 Subject: [PATCH 0875/1191] update --- eval_script/qx_script.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index eb07513bd..442cc2a1f 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -1,15 +1,15 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header 55555/eval.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body 55555/eval.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body 55555/eval.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body 55555/eval.js -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval.js +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body 55555/eval.js -^http://.+/amdc/mobileDispatch url script-request-body eval.js +^http://.+/amdc/mobileDispatch url script-request-body 55555/eval.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval.js \ No newline at end of file +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body 55555/eval.js \ No newline at end of file From 791bb65fa0eeea77845047a235fe3b7ad91e5d0b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:32:48 +0800 Subject: [PATCH 0876/1191] update --- eval_script/sg_script.sgmodule | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index 2693941e9..8b90aee8a 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -4,16 +4,16 @@ hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] -eval.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval.js +eval.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=55555/eval.js -eval.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval.js +eval.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=55555/eval.js -eval.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval.js +eval.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=55555/eval.js -eval.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval.js +eval.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=55555/eval.js -eval.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval.js +eval.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=55555/eval.js -eval.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval.js +eval.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=55555/eval.js -eval.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval.js \ No newline at end of file +eval.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=55555/eval.js \ No newline at end of file From ef5ade779ae88cfb344cac89c93f36dee8f4380e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:32:57 +0800 Subject: [PATCH 0877/1191] update --- eval_script/qx_script.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index 442cc2a1f..d45a47f03 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -1,15 +1,15 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header 55555/eval.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header /55555/eval.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body 55555/eval.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body /55555/eval.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body 55555/eval.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body /55555/eval.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body 55555/eval.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body /55555/eval.js -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body 55555/eval.js +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body /55555/eval.js -^http://.+/amdc/mobileDispatch url script-request-body 55555/eval.js +^http://.+/amdc/mobileDispatch url script-request-body /55555/eval.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body 55555/eval.js \ No newline at end of file +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body /55555/eval.js \ No newline at end of file From fd60dc3df2cc13bcff86afc7f2069e6c64f120bf Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:33:01 +0800 Subject: [PATCH 0878/1191] update --- eval_script/sg_script.sgmodule | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index 8b90aee8a..ac134299b 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -4,16 +4,16 @@ hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] -eval.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=55555/eval.js +eval.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=/55555/eval.js -eval.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=55555/eval.js +eval.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=/55555/eval.js -eval.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=55555/eval.js +eval.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=/55555/eval.js -eval.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=55555/eval.js +eval.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=/55555/eval.js -eval.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=55555/eval.js +eval.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=/55555/eval.js -eval.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=55555/eval.js +eval.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=/55555/eval.js -eval.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=55555/eval.js \ No newline at end of file +eval.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=/55555/eval.js \ No newline at end of file From d3375fc0e0a01dcad94b774e95db3bf22ecbfdcb Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:33:45 +0800 Subject: [PATCH 0879/1191] update --- eval_script/qx_script.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index d45a47f03..8caf70f20 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -1,15 +1,15 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header /55555/eval.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body /55555/eval.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body /55555/eval.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body /55555/eval.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body /55555/eval.js +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js -^http://.+/amdc/mobileDispatch url script-request-body /55555/eval.js +^http://.+/amdc/mobileDispatch url script-request-body eval_script.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body /55555/eval.js \ No newline at end of file +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js \ No newline at end of file From 9d5f7c804027927913aff3962ab2544129d11f6d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:33:49 +0800 Subject: [PATCH 0880/1191] update --- eval_script/sg_script.sgmodule | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index ac134299b..4c2fdc0f5 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -4,16 +4,16 @@ hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] -eval.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=/55555/eval.js +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -eval.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=/55555/eval.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -eval.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=/55555/eval.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js -eval.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=/55555/eval.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js -eval.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=/55555/eval.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js -eval.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=/55555/eval.js +eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js -eval.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=/55555/eval.js \ No newline at end of file +eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js \ No newline at end of file From feec767666cb6ed59b4a114a71f1e1a53bf3415e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:34:01 +0800 Subject: [PATCH 0881/1191] update --- eval_script/qx_script.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index 8caf70f20..08c101168 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -1,15 +1,15 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -^http://.+/amdc/mobileDispatch url script-request-body eval_script.js +^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js \ No newline at end of file +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js \ No newline at end of file From cf5ad276150be9dbfcfde700387a273c6dd32524 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:34:04 +0800 Subject: [PATCH 0882/1191] update --- eval_script/sg_script.sgmodule | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index 4c2fdc0f5..dbe3e062a 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -4,16 +4,16 @@ hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] -eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js +wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js +wb_ad.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js +jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js +tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js \ No newline at end of file +tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js \ No newline at end of file From 0d2adaf0498ffb1b388bc1dafe531777d33b642a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:34:42 +0800 Subject: [PATCH 0883/1191] update --- eval_script/qx_script.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index 08c101168..8caf70f20 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -1,15 +1,15 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js -^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^http://.+/amdc/mobileDispatch url script-request-body eval_script.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js \ No newline at end of file +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js \ No newline at end of file From 1d74ac1efc60c9ef896e529ef51381725c971e2c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:34:45 +0800 Subject: [PATCH 0884/1191] update --- eval_script/sg_script.sgmodule | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index dbe3e062a..4c2fdc0f5 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -4,16 +4,16 @@ hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] -nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js -wb_ad.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js -jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js -tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js -tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js \ No newline at end of file +eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js \ No newline at end of file From b0f4fceb95c74811dcac890dde16c4ae17f47068 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:36:42 +0800 Subject: [PATCH 0885/1191] update --- eval_script/qx_script.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index 8caf70f20..a7bec5f8e 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -4,12 +4,12 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,ap ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js - -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js - ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js ^http://.+/amdc/mobileDispatch url script-request-body eval_script.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js \ No newline at end of file +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js + +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js + +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file From dc94b9ea97171c2f6eba1291e8d3486c5300e2b0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:36:45 +0800 Subject: [PATCH 0886/1191] update --- eval_script/sg_script.sgmodule | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index 4c2fdc0f5..39b0e6ebe 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -8,12 +8,12 @@ eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.co eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js - eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js \ No newline at end of file +eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From 47ebb4ad3f47c17234857b433e1b9d0df40a21fe Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:43:01 +0800 Subject: [PATCH 0887/1191] Update eval_script.js --- eval_script.js | 52 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/eval_script.js b/eval_script.js index 34a5c9b2e..b66ea15c1 100644 --- a/eval_script.js +++ b/eval_script.js @@ -6,19 +6,19 @@ const __conf = String.raw` [Local] // custom local... + # nf http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js # jd -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js # tb -http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js # wb http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js - [Hostname] // custom hostname... api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com @@ -39,6 +39,8 @@ const __owner = "yichahucha" const __repo = "surge" // GitHub 分支(不指定就使用默认分支) const __branch = "master" +// 指定 eval_script.js 文件路径(路径为空 "" 使用脚本原始路径) +const __evalPath = "eval_script.js" // GitHub 文件路径(没有文件新创建,已有文件覆盖更新,路径为空 "" 不更新) const __quanxPath = "eval_script/qx_script.txt" const __surgePath = "eval_script/sg_script.sgmodule" @@ -427,7 +429,7 @@ function ____concurrentQueueLimit(list, limit, asyncHandle) { function ____downloadFile(url) { return new Promise((resolve) => { __tool.get(url, (error, response, body) => { - const filename = url.match(/.*\/(.*?)$/)[1] + const filename = url.match(/[^\/]+$/)[0] if (!error) { const code = response.statusCode if (code == 200) { @@ -513,8 +515,17 @@ function ____parseConf(lines) { // content const requiresBody = ____surgeArg(result[3].trim()).requiresBody // surgeConfContents.splice(i, 0, `${line.replace(____surgeArg(result[3].trim()).scriptPath, "eval_script.js")}`); - surgeConfContents.push(`eval_script.js = type=http-${result[1].trim()},${requiresBody ? `requires-body=${requiresBody},` : ""}pattern=${result[2].trim()},script-path=eval_script.js`) - quanxConfContents.push(`${result[2].trim()} url script-${result[1].trim()}-${requiresBody == "1" ? "body" : "header"} eval_script.js`) + if (__evalPath.length > 0) { + const path = __evalPath + const fileName = path.match(/[^\/]+$/)[0] + surgeConfContents.push(`${fileName} = type=http-${result[1].trim()},${requiresBody ? `requires-body=${requiresBody},` : ""}pattern=${result[2].trim()},script-path=${path}`) + quanxConfContents.push(`${result[2].trim()} url script-${result[1].trim()}-${requiresBody == "1" ? "body" : "header"} ${path}`) + } else { + const path = ____surgeArg(result[3].trim()).scriptPath + const fileName = path.match(/[^\/]+$/)[0] + surgeConfContents.push(`${fileName} = type=http-${result[1].trim()},${requiresBody ? `requires-body=${requiresBody},` : ""}pattern=${result[2].trim()},script-path=${path}`) + quanxConfContents.push(`${result[2].trim()} url script-${result[1].trim()}-${requiresBody == "1" ? "body" : "header"} ${path}`) + } // eval line = `${result[1].trim()} ${result[2].trim()} eval ${____surgeArg(result[3].trim()).scriptPath}` } @@ -531,8 +542,17 @@ function ____parseConf(lines) { } } // surgeConfContents.splice(i, 0, `http-${type[0].trim()} ${result[1].trim()} ${requires == 0 ? "" : `requires-body=${requires},`}script-path=eval_script.js`) - surgeConfContents.push(`eval_script.js = type=http-${type[0].trim()},${requires == 0 ? "" : `requires-body=${requires},`}pattern=${result[1].trim()},script-path=eval_script.js`) - quanxConfContents.push(`${line.replace(result[3].trim(), "eval_script.js")}`) + if (__evalPath.length > 0) { + const path = __evalPath + const fileName = path.match(/[^\/]+$/)[0] + surgeConfContents.push(`${fileName} = type=http-${type[0].trim()},${requires == 0 ? "" : `requires-body=${requires},`}pattern=${result[1].trim()},script-path=${path}`) + quanxConfContents.push(`${line.replace(result[3].trim(), path)}`) + } else { + const path = result[3].trim() + const fileName = path.match(/[^\/]+$/)[0] + surgeConfContents.push(`${fileName} = type=http-${type[0].trim()},${requires == 0 ? "" : `requires-body=${requires},`}pattern=${result[1].trim()},script-path=${path}`) + quanxConfContents.push(line) + } // eval line = `${type[0].trim()} ${result[1].trim()} eval ${result[3].trim()}` } @@ -540,9 +560,17 @@ function ____parseConf(lines) { //content const result = line.match(newSurge) const surgeArg = ____surgeArg(result[1].trim()) - surgeConfContents.splice(i, 0, `${surgeArg.type} ${surgeArg.pattern} ${surgeArg.requiresBody ? `requires-body=${surgeArg.requiresBody},` : ""}script-path=eval_script.js`) - surgeConfContents.push(`eval_script.js = ${result[1].replace(surgeArg.scriptPath, "eval_script.js")}`) - quanxConfContents.push(`${surgeArg.pattern} url script-${surgeArg.type.replace("http-", "")}-${(surgeArg.requiresBody && surgeArg.requiresBody == "1") ? "body" : "header"} eval_script.js`) + // surgeConfContents.splice(i, 0, `${surgeArg.type} ${surgeArg.pattern} ${surgeArg.requiresBody ? `requires-body=${surgeArg.requiresBody},` : ""}script-path=eval_script.js`) + if (__evalPath.length > 0) { + const path = __evalPath + const fileName = path.match(/[^\/]+$/)[0] + surgeConfContents.push(`${fileName} = ${result[1].replace(surgeArg.scriptPath, path)}`) + quanxConfContents.push(`${surgeArg.pattern} url script-${surgeArg.type.replace("http-", "")}-${(surgeArg.requiresBody && surgeArg.requiresBody == "1") ? "body" : "header"} ${path}`) + } else { + const path = surgeArg.scriptPath + surgeConfContents.push(line) + quanxConfContents.push(`${surgeArg.pattern} url script-${surgeArg.type.replace("http-", "")}-${(surgeArg.requiresBody && surgeArg.requiresBody == "1") ? "body" : "header"} ${path}`) + } // eval line = `${surgeArg.type.replace("http-", "")} ${surgeArg.pattern} eval ${surgeArg.scriptPath}` } From 9cc5136997ac16435cdd7f632e82c2e09e67da0a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:45:05 +0800 Subject: [PATCH 0888/1191] Update eval_script.js --- eval_script.js | 1 + 1 file changed, 1 insertion(+) diff --git a/eval_script.js b/eval_script.js index b66ea15c1..88e8b52eb 100644 --- a/eval_script.js +++ b/eval_script.js @@ -19,6 +19,7 @@ tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\ http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js + [Hostname] // custom hostname... api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com From 9db6f6012c09cb0802048fd8818eaefc37501655 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:52:08 +0800 Subject: [PATCH 0889/1191] update --- eval_script/qx_script.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index a7bec5f8e..5bf7ea749 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -1,15 +1,15 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -^http://.+/amdc/mobileDispatch url script-request-body eval_script.js +^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js \ No newline at end of file From af4d6db7d23894681ec761874d77ab45b61b4a09 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:52:11 +0800 Subject: [PATCH 0890/1191] update --- eval_script/sg_script.sgmodule | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index 39b0e6ebe..e46d04065 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -4,16 +4,16 @@ hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] -eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js +jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js +tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js +tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js +wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file +wb_ad.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js \ No newline at end of file From 24f22d72aafd8b5630173b0d072782c6201f025a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:55:09 +0800 Subject: [PATCH 0891/1191] update --- qx_sub.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 qx_sub.txt diff --git a/qx_sub.txt b/qx_sub.txt new file mode 100644 index 000000000..5bf7ea749 --- /dev/null +++ b/qx_sub.txt @@ -0,0 +1,15 @@ +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js + +^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js + +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js \ No newline at end of file From 7ed7298f71f711942ffa0ba183501c8a4f1402f9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:55:13 +0800 Subject: [PATCH 0892/1191] update --- sg_sub.sgmodule | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 sg_sub.sgmodule diff --git a/sg_sub.sgmodule b/sg_sub.sgmodule new file mode 100644 index 000000000..e46d04065 --- /dev/null +++ b/sg_sub.sgmodule @@ -0,0 +1,19 @@ +#!name=eval_script.js module + +[MITM] +hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +[Script] +nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js + +tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js + +wb_ad.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js \ No newline at end of file From 8001a7cd827ea1600b1454a2842788c39f046598 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:56:35 +0800 Subject: [PATCH 0893/1191] update --- eval_script/qx.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 eval_script/qx.txt diff --git a/eval_script/qx.txt b/eval_script/qx.txt new file mode 100644 index 000000000..5bf7ea749 --- /dev/null +++ b/eval_script/qx.txt @@ -0,0 +1,15 @@ +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js + +^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js + +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js \ No newline at end of file From 3f502030e79c3b0770a7a0011adc6bb6bf2b21f5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:56:38 +0800 Subject: [PATCH 0894/1191] update --- eval_script/sg.sgmodule | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 eval_script/sg.sgmodule diff --git a/eval_script/sg.sgmodule b/eval_script/sg.sgmodule new file mode 100644 index 000000000..e46d04065 --- /dev/null +++ b/eval_script/sg.sgmodule @@ -0,0 +1,19 @@ +#!name=eval_script.js module + +[MITM] +hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +[Script] +nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js + +tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js + +wb_ad.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js \ No newline at end of file From a69b028889e51c5a88e217ae289b071e4bc71caa Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:57:18 +0800 Subject: [PATCH 0895/1191] Delete qx_script.txt --- eval_script/qx_script.txt | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 eval_script/qx_script.txt diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt deleted file mode 100644 index 5bf7ea749..000000000 --- a/eval_script/qx_script.txt +++ /dev/null @@ -1,15 +0,0 @@ -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - -^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js - -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js \ No newline at end of file From cc0885fff76951fb38dc8773868216efea40c208 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:57:27 +0800 Subject: [PATCH 0896/1191] Delete sg_script.sgmodule --- eval_script/sg_script.sgmodule | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 eval_script/sg_script.sgmodule diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule deleted file mode 100644 index e46d04065..000000000 --- a/eval_script/sg_script.sgmodule +++ /dev/null @@ -1,19 +0,0 @@ -#!name=eval_script.js module - -[MITM] -hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com - -[Script] -nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - -nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - -jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - -tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - -tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - -wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js - -wb_ad.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js \ No newline at end of file From 365d21a3b72a8530928c6f34a0556cf9cb41b8a4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:57:52 +0800 Subject: [PATCH 0897/1191] update --- eval_script/qx.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_script/qx.txt b/eval_script/qx.txt index 5bf7ea749..a7bec5f8e 100644 --- a/eval_script/qx.txt +++ b/eval_script/qx.txt @@ -1,15 +1,15 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js -^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^http://.+/amdc/mobileDispatch url script-request-body eval_script.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js \ No newline at end of file +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file From 2730cab9c521bb1af788cfeb3cbc3167c148ad31 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:57:56 +0800 Subject: [PATCH 0898/1191] update --- eval_script/sg.sgmodule | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eval_script/sg.sgmodule b/eval_script/sg.sgmodule index e46d04065..39b0e6ebe 100644 --- a/eval_script/sg.sgmodule +++ b/eval_script/sg.sgmodule @@ -4,16 +4,16 @@ hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] -nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js -tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js -tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js -wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js -wb_ad.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js \ No newline at end of file +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From 6e6c890630473a2798506d67bd6fe68ea28b80e3 Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 27 Apr 2020 18:29:46 +0800 Subject: [PATCH 0899/1191] optimize --- wb_ad.js | 40 +++++++++++----------------------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/wb_ad.js b/wb_ad.js index 4c9410800..c53fd4764 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -24,7 +24,7 @@ const path19 = "/statuses/video_mixtimeline"; const path20 = "/video/tiny_stream_video_list"; const url = $request.url; -var body = $response.body; +let body = $response.body; if ( url.indexOf(path1) != -1 || @@ -41,15 +41,11 @@ if ( if (obj.num) obj.num = obj.original_num; if (obj.trends) obj.trends = []; body = JSON.stringify(obj); -} - -if (url.indexOf(path3) != -1) { +} else if (url.indexOf(path3) != -1) { let obj = JSON.parse(body); if (obj.trend) delete obj.trend; body = JSON.stringify(obj); -} - -if (url.indexOf(path4) != -1) { +} else if (url.indexOf(path4) != -1) { let obj = JSON.parse(body); obj.recommend_max_id = 0; if (obj.status) { @@ -62,16 +58,12 @@ if (url.indexOf(path4) != -1) { obj.datas = []; } body = JSON.stringify(obj); -} - -if (url.indexOf(path5) != -1 || +} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { let obj = JSON.parse(body); obj.data = {}; body = JSON.stringify(obj); -} - -if (url.indexOf(path6) != -1) { +} else if (url.indexOf(path6) != -1) { let obj = JSON.parse(body); let segments = obj.segments; if (segments && segments.length > 0) { @@ -83,27 +75,19 @@ if (url.indexOf(path6) != -1) { } } body = JSON.stringify(obj); -} - -if (url.indexOf(path7) != -1) { +} else if (url.indexOf(path7) != -1) { let obj = JSON.parse(body); obj.datas = []; body = JSON.stringify(obj); -} - -if (url.indexOf(path8) != -1) { +} else if (url.indexOf(path8) != -1) { let obj = JSON.parse(body); obj.story_list = []; body = JSON.stringify(obj); -} - -if (url.indexOf(path11) != -1) { +} else if (url.indexOf(path11) != -1) { let obj = JSON.parse(body); obj.data = []; body = JSON.stringify(obj); -} - -if ( +} else if ( url.indexOf(path9) != -1 || url.indexOf(path12) != -1 || url.indexOf(path13) != -1 || @@ -113,9 +97,7 @@ if ( let obj = JSON.parse(body); if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); body = JSON.stringify(obj); -} - -if (url.indexOf(path19) != -1) { +} else if (url.indexOf(path19) != -1) { let obj = JSON.parse(body); delete obj.expandable_view; body = JSON.stringify(obj); @@ -143,7 +125,7 @@ function filter_comments(datas) { let i = datas.length; while (i--) { const element = datas[i]; - let type = element.type; + const type = element.type; if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); } } From 5425b65eb7918782d33791e040277be989c43a22 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:39:48 +0800 Subject: [PATCH 0900/1191] update From e1933597223a7b93fc97a2d5218f788a6928d815 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:39:52 +0800 Subject: [PATCH 0901/1191] update From 8e79bac2a6d26fa49a6ba5a1287a9af833e0e3d3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:46:02 +0800 Subject: [PATCH 0902/1191] update From 2fc67f00e59efe4f4f3ecfd2d58d7bf327121178 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:46:04 +0800 Subject: [PATCH 0903/1191] update From a3cbfd49b8e0949fc11c1e4a65f5f00ebf22adc3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:46:31 +0800 Subject: [PATCH 0904/1191] update From 74ccfc086fba8167aa6c3b981950277c34a481fb Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:47:01 +0800 Subject: [PATCH 0905/1191] update From b47f9fe72819168ead048843c47dcc8ce1ae0188 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:47:02 +0800 Subject: [PATCH 0906/1191] update From 022226fb4eb476546e5dd71eb83f991126fc8082 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:47:31 +0800 Subject: [PATCH 0907/1191] update From 41c13b0cd426bb976e34ab5b99d5e36818bbe0af Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:47:34 +0800 Subject: [PATCH 0908/1191] update From b878b1151883a9b58dedce659330b537d70b2804 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:48:01 +0800 Subject: [PATCH 0909/1191] update From 86b6b24c6717fd5e665c637dca75aeb471c66a36 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:48:02 +0800 Subject: [PATCH 0910/1191] update From ec71ac5253bdb1ad86bd706196e633df585a60ac Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:48:31 +0800 Subject: [PATCH 0911/1191] update From 4fe5e01c0f778ce645ae31e39ebd0244c08d3900 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:48:32 +0800 Subject: [PATCH 0912/1191] update From 1180c17979d6683aee19ece558942f983dbd1223 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:49:01 +0800 Subject: [PATCH 0913/1191] update From 795685d0e1593657c0590c4f1e4729b7837766b8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:49:03 +0800 Subject: [PATCH 0914/1191] update From ca07ed1270d2c7506914193fb0f4d3a06bbd8ad0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:49:31 +0800 Subject: [PATCH 0915/1191] update From 8ca7202c01cfab318e378194d7d33b1be0b0de12 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:49:32 +0800 Subject: [PATCH 0916/1191] update From 0705f4ff8abe19460b8bf25f4a16783a35dbbdf9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:50:01 +0800 Subject: [PATCH 0917/1191] update From 5d64a8ee3dda1830e01944f7410753197ccf5bce Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:50:04 +0800 Subject: [PATCH 0918/1191] update From c80a6dc00f094b900c31e895d402be63d3d9d40b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:50:31 +0800 Subject: [PATCH 0919/1191] update From 273529062c85db3c3fe2410ce9136a1aae92b63d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:50:33 +0800 Subject: [PATCH 0920/1191] update From 8ed3ac5dcaa433f112e598498a963eab1bd7c9ff Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:51:02 +0800 Subject: [PATCH 0921/1191] update From b36673114640cb3ba79364fcd59bc758a8f950c1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:51:03 +0800 Subject: [PATCH 0922/1191] update From fdf47dbcd7baa18bba5fdb466c0d3f8f1fcc7fd0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:51:31 +0800 Subject: [PATCH 0923/1191] update From 84616eff5ff58a2036cc1bff9814e995760d2266 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:51:33 +0800 Subject: [PATCH 0924/1191] update From c557e328deafea150b87262be224093909fee310 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:52:02 +0800 Subject: [PATCH 0925/1191] update From c6183f46cc4d240c1a513fbb89dbdfa2f4f73cb8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:52:04 +0800 Subject: [PATCH 0926/1191] update From 7d7c343311dddfaa881503ec052bfd80205961a1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:52:48 +0800 Subject: [PATCH 0927/1191] update From eea15dd01d28e7fe756fa717d566a45f594f3d15 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 27 Apr 2020 18:52:51 +0800 Subject: [PATCH 0928/1191] update From f4e9561b9c388bbc7a258b82d3c5f8b8ce30fbe7 Mon Sep 17 00:00:00 2001 From: goose Date: Tue, 28 Apr 2020 11:37:51 +0800 Subject: [PATCH 0929/1191] update --- nf_rating.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nf_rating.js b/nf_rating.js index 7b8cefd08..1e14cb4b3 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -22,7 +22,7 @@ if (!$tool.isResponse) { } url = url.replace(/&languages=(.*?)&/, "&languages=en-US&"); } - // url += "&path=" + encodeURIComponent(`[${videos[0]},"details"]`); + url += "&path=" + encodeURIComponent(`[${videos[0]},"details"]`); $done({ url }); } else { var IMDbApikeys = IMDbApikeys(); @@ -43,10 +43,10 @@ if (!$tool.isResponse) { if (type == "show") { type = "series"; } - // if (type == "movie") { - // year = video.details.releaseYear; - // } - // delete video.details; + if (type == "movie") { + year = video.details.releaseYear; + } + delete video.details; const requestRatings = async () => { const IMDb = await requestIMDbRating(title, year, type); const Douban = await requestDoubanRating(IMDb.id); From 138c5aa5ab870bb9586067244d6f042b94eb66b5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 29 Apr 2020 15:39:30 +0800 Subject: [PATCH 0930/1191] update From 28c219386bdf2be03bdbe5cbfd63193bfa38023b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 29 Apr 2020 15:39:33 +0800 Subject: [PATCH 0931/1191] update From d5d11732c6ac671c0da3da2e395c4e8232e2e393 Mon Sep 17 00:00:00 2001 From: tern Date: Thu, 30 Apr 2020 19:42:20 +0800 Subject: [PATCH 0932/1191] add --- tb_pre.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tb_pre.js diff --git a/tb_pre.js b/tb_pre.js new file mode 100644 index 000000000..9d0a9fa66 --- /dev/null +++ b/tb_pre.js @@ -0,0 +1,19 @@ +let headers = $request.headers +let body = $request.body +if (headers["User-Agent"].indexOf("%E6%89%8B%E6%9C%BA%E6%B7%98%E5%AE%9D") != -1) { + let json = Qs2Json(body) + let domain = json.domain.split(" ") + let i = domain.length; + while (i--) { + const block = "trade-acs.m.taobao.com" + const element = domain[i]; + if (element == block) { + domain.splice(i, 1); + } + } + json.domain = domain.join(" ") + body = Json2Qs(json) +} +$done({ + body +}) \ No newline at end of file From 13f1de1ffba1fb7a6a3ffa606333d61ab0d9d7fc Mon Sep 17 00:00:00 2001 From: tern Date: Thu, 30 Apr 2020 19:44:20 +0800 Subject: [PATCH 0933/1191] fix --- tb_pre.js | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/tb_pre.js b/tb_pre.js index 9d0a9fa66..0a29ac25d 100644 --- a/tb_pre.js +++ b/tb_pre.js @@ -16,4 +16,26 @@ if (headers["User-Agent"].indexOf("%E6%89%8B%E6%9C%BA%E6%B7%98%E5%AE%9D") != -1) } $done({ body -}) \ No newline at end of file +}) + +function Qs2Json(url) { + var search = url.substring(url.lastIndexOf("?") + 1); + var obj = {}; + var reg = /([^?&=]+)=([^?&=]*)/g; + search.replace(reg, function(rs, $1, $2) { + var name = decodeURIComponent($1); + var val = decodeURIComponent($2); + val = String(val); + obj[name] = val; + return rs; + }); + return obj; +} + +function Json2Qs(json) { + var temp = []; + for (var k in json) { + temp.push(k + "=" + json[k]); + } + return temp.join("&"); +} \ No newline at end of file From 186634d328fbfc499ff9c51afa7b4eb52ef9435f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 6 May 2020 15:49:20 +0800 Subject: [PATCH 0934/1191] Update sg_sub.sgmodule --- sg_sub.sgmodule | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sg_sub.sgmodule b/sg_sub.sgmodule index e46d04065..a3610c922 100644 --- a/sg_sub.sgmodule +++ b/sg_sub.sgmodule @@ -16,4 +16,4 @@ tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\ wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -wb_ad.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js \ No newline at end of file +wb_ad.js = type=http-response,requires-body=1,max-size=-1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js From 9fa854bd81ab0bc17a2b3993309c35a7642d6fbf Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 6 May 2020 15:50:04 +0800 Subject: [PATCH 0935/1191] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0426c7be3..7ac3c7417 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Remove weibo ads ```properties [Script] http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js [MITM] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` From 7c418203e23f0b72187f63d85fbd691be8abfc31 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 12 May 2020 15:04:17 +0800 Subject: [PATCH 0936/1191] Create nf_rating_season.js --- nf_rating_season.js | 162 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 nf_rating_season.js diff --git a/nf_rating_season.js b/nf_rating_season.js new file mode 100644 index 000000000..b54ccf22c --- /dev/null +++ b/nf_rating_season.js @@ -0,0 +1,162 @@ +/** + * nf_rating_season.js = type=http-response,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js + */ + +const $tool = new Tool() +const url = $request.url +const body = $response.body +const imdbApikeyCacheKey = "ImdbApikeyCacheKey" +const netflixTitleCacheKey = "NetflixTitleCacheKey" +const map = $tool.read(netflixTitleCacheKey) +const id = url.match(/id=(\d+)/)[1] +const title = map ? JSON.parse(map)[id] : null + +if (title) { + const key = $tool.read(imdbApikeyCacheKey) + const obj = JSON.parse(body) + const seasons = obj.shows[id].seasons.map(item => item.season) + const promises = [] + for (let index = 0; index < seasons.length; index++) { + const url = `https://www.omdbapi.com/?t=${title}&apikey=${key}&type=series&Season=${seasons[index]}` + promises.push(requestSeasonRating(encodeURI(url))) + } + Promise.all(promises).then((values) => { + // console.log(values) + for (let index = 0; index < values.length; index++) { + const imdb = values[index] + if (imdb) { + const imdbSeasonNumber = imdb.Season + const imdbEpisodes = imdb.Episodes + const entities = obj.entities + for (let [key, value] of Object.entries(entities)) { + // console.log(`${key}: ${value}`); + const seasonNumber = value.summary.seasonNumber + const episodeNumber = value.summary.episodeNumber + let title = value.summary.title + if (parseInt(imdbSeasonNumber) == seasonNumber) { + const imdbEpisode = imdbEpisodes.find(element => parseInt(element.Episode) == episodeNumber) + title = `${title}${imdbEpisode && imdbEpisode.imdbRating ? ` ⭐️ ${imdbEpisode.imdbRating}` : " ⭐️ N/A"}` + value.summary.title = title + console.log(title); + } + } + } + } + // console.log(JSON.stringify(obj)) + $tool.done({ body: JSON.stringify(obj) }) + }) +} else { + $tool.done({}) +} + +function requestSeasonRating(url) { + return new Promise((resolve) => { + $tool.get(url, (error, response, body) => { + if (!error) { + const code = response.statusCode + if (code == 200) { + const obj = JSON.parse(body) + if (obj.Response != "False") { + console.log(`successfully: ${url}`) + resolve(obj) + } else { + console.log(`failed: ${obj.Error} -> ${url}`) + resolve(null) + } + } else { + console.log(`failed: ${response.statusCode} -> ${url}`) + resolve(null) + } + } else { + console.log(`faile: ${error}`) + resolve(null) + } + }) + }) +} + +function Tool() { + _node = (() => { + if (typeof require == "function") { + const request = require('request') + return ({ request }) + } else { + return (null) + } + })() + _isSurge = typeof $httpClient != "undefined" + _isQuanX = typeof $task != "undefined" + _isTask = typeof $request == "undefined" + _isResponse = typeof $response != "undefined" + _isRequestBody = typeof $request != "undefined" && typeof $request.body != "undefined" + this.isSurge = _isSurge + this.isQuanX = _isQuanX + this.isTask = _isTask + this.isResponse = _isResponse + this.isRequestBody = _isRequestBody + this.method = (() => { + if (!_isTask && (_isSurge || _isQuanX)) { + return $request.method + } + })() + this.scriptType = (() => { + if (_isResponse) { + return "response" + } else { + return "request" + } + })() + this.done = (obj) => { + if (_isQuanX) $done(obj) + if (_isSurge) $done(obj) + if (_node) console.log("script done."); + } + this.notify = (title, subtitle, message) => { + if (_isQuanX) $notify(title, subtitle, message) + if (_isSurge) $notification.post(title, subtitle, message) + if (_node) console.log(JSON.stringify({ title, subtitle, message })); + } + this.write = (value, key) => { + if (_isQuanX) return $prefs.setValueForKey(value, key) + if (_isSurge) return $persistentStore.write(value, key) + if (_node) console.log(`write success: ${key}`); + } + this.read = (key) => { + if (_isQuanX) return $prefs.valueForKey(key) + if (_isSurge) return $persistentStore.read(key) + if (_node) console.log(`read success: ${key}`); + } + this.get = (options, callback) => { + if (_isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "GET" + $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) + } + if (_isSurge) $httpClient.get(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request(options, (error, response, body) => { callback(error, _status(response), body) }) + } + this.put = (options, callback) => { + if (_isQuanX) $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) + if (_isSurge) $httpClient.put(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request(options, (error, response, body) => { callback(error, _status(response), body) }) + } + this.post = (options, callback) => { + if (_isQuanX) { + if (typeof options == "string") options = { url: options } + options["method"] = "POST" + $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null)) + } + if (_isSurge) $httpClient.post(options, (error, response, body) => { callback(error, _status(response), body) }) + if (_node) _node.request.post(options, (error, response, body) => { callback(error, _status(response), body) }) + } + _status = (response) => { + if (response) { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } + } + return response + } +} From 4fb0f744972056523241af6879447ef41622666f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 12 May 2020 15:23:04 +0800 Subject: [PATCH 0937/1191] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7ac3c7417..58fefd57b 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ Display netflix ratings(IMDb、douaban) [Script] http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +# 单集评分 +nf_rating_season.js = type=http-response,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js [MITM] hostname = ios.prod.ftl.netflix.com ``` From f54fb4f587fb32eb2ec9a071d5ea9724204de2d6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 12 May 2020 23:22:20 +0800 Subject: [PATCH 0938/1191] update From a09fd414c5c64baf965b1fef086ee356ca4f67b4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 12 May 2020 23:22:23 +0800 Subject: [PATCH 0939/1191] update From 49769d97120caf751cd5a978ed58b3de3bd26fed Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 12 May 2020 23:22:40 +0800 Subject: [PATCH 0940/1191] update From 79130c8400d0eff087e45a30708eb6b9006f3fd9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 15 May 2020 21:00:50 +0800 Subject: [PATCH 0941/1191] update From 439511296ac27a199d5c4aaa7f5012b3724854a9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 15 May 2020 21:00:53 +0800 Subject: [PATCH 0942/1191] update From 57eaa9924724f59984a9886b415b747ece6f656f Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 15 May 2020 21:01:01 +0800 Subject: [PATCH 0943/1191] update From 231f77078005d275f96edd0475424177eaea129e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 15 May 2020 21:01:04 +0800 Subject: [PATCH 0944/1191] update From 2a8f74958198e1edb56cee4d55065ce7bdc880ff Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 15 May 2020 21:46:14 +0800 Subject: [PATCH 0945/1191] update --- eval_script/qx.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eval_script/qx.txt b/eval_script/qx.txt index a7bec5f8e..8a3a7f056 100644 --- a/eval_script/qx.txt +++ b/eval_script/qx.txt @@ -4,6 +4,8 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,ap ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath url script-response-body eval_script.js + ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js ^http://.+/amdc/mobileDispatch url script-request-body eval_script.js From 0379c15dd78755e96994c5a7cfa6023ede9c26ce Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 15 May 2020 21:46:17 +0800 Subject: [PATCH 0946/1191] update --- eval_script/sg.sgmodule | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eval_script/sg.sgmodule b/eval_script/sg.sgmodule index 39b0e6ebe..909c57d48 100644 --- a/eval_script/sg.sgmodule +++ b/eval_script/sg.sgmodule @@ -8,6 +8,8 @@ eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.co eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +eval_script.js = type=http-response,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,requires-body=1,max-size=0,script-path=eval_script.js + eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js From cb1059b369abe1e0bd484025960eda3a8b12868d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 19 May 2020 09:43:08 +0800 Subject: [PATCH 0947/1191] update From 333406d11368e0ed46f4a3ce4454173f8d98064e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 19 May 2020 09:43:11 +0800 Subject: [PATCH 0948/1191] update From f468dcaae8753ada5c6760e1698df943f7763d04 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 19 May 2020 09:43:37 +0800 Subject: [PATCH 0949/1191] update From 2001a1fa3261c5dd6836717c21d4bab99b1ef581 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 19 May 2020 09:43:42 +0800 Subject: [PATCH 0950/1191] update From 0c5f852b351d821cc719b74c459e00d56ec0514b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 19 May 2020 21:52:18 +0800 Subject: [PATCH 0951/1191] update From 36f6cc3d27f3cc3ab0ad6af195649e5b0b6e97d0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 19 May 2020 21:52:21 +0800 Subject: [PATCH 0952/1191] update From fa3a75d1b4d0d8b2f6d184f7bd54e183cf03b8e4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 24 May 2020 22:14:34 +0800 Subject: [PATCH 0953/1191] update From beae2b2f4a85997ab2bd48bbc4ec911022985b41 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 24 May 2020 22:14:37 +0800 Subject: [PATCH 0954/1191] update From 26626928e1e3c7c606cf8a2650070b2a049c8002 Mon Sep 17 00:00:00 2001 From: tern Date: Mon, 25 May 2020 21:53:55 +0800 Subject: [PATCH 0955/1191] update --- nf_rating_season.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nf_rating_season.js b/nf_rating_season.js index b54ccf22c..8965d95a3 100644 --- a/nf_rating_season.js +++ b/nf_rating_season.js @@ -37,7 +37,7 @@ if (title) { const imdbEpisode = imdbEpisodes.find(element => parseInt(element.Episode) == episodeNumber) title = `${title}${imdbEpisode && imdbEpisode.imdbRating ? ` ⭐️ ${imdbEpisode.imdbRating}` : " ⭐️ N/A"}` value.summary.title = title - console.log(title); + //console.log(title); } } } @@ -57,18 +57,18 @@ function requestSeasonRating(url) { if (code == 200) { const obj = JSON.parse(body) if (obj.Response != "False") { - console.log(`successfully: ${url}`) + //console.log(`successfully: ${url}`) resolve(obj) } else { - console.log(`failed: ${obj.Error} -> ${url}`) + //console.log(`failed: ${obj.Error} -> ${url}`) resolve(null) } } else { - console.log(`failed: ${response.statusCode} -> ${url}`) + //console.log(`failed: ${response.statusCode} -> ${url}`) resolve(null) } } else { - console.log(`faile: ${error}`) + //console.log(`faile: ${error}`) resolve(null) } }) From 671986ff3b82d2b4b37fa37db27d6cdddaa71a0a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 27 May 2020 21:37:07 +0800 Subject: [PATCH 0956/1191] update --- eval_script/qx.txt | 314 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 312 insertions(+), 2 deletions(-) diff --git a/eval_script/qx.txt b/eval_script/qx.txt index 8a3a7f056..8ad9ae6d9 100644 --- a/eval_script/qx.txt +++ b/eval_script/qx.txt @@ -1,4 +1,4 @@ -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com,bea.sportq.com,api.meiyan.com,api.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,api*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js @@ -14,4 +14,314 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,ap ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js + +^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad url script-response-body eval_script.js + +^https://api.zhihu.com/moments/recommend url script-response-body eval_script.js + +^https://api.zhihu.com/topstory/recommend url script-response-body eval_script.js + +https://api.zhihu.com/v4/questions url script-response-body eval_script.js + +^https://api.zhihu.com/people/ url script-response-body eval_script.js + +^https://api.zhihu.com/market/header url script-response-body eval_script.js + +https://app.bilibili.com/x/v2/space\?access_key url script-response-body eval_script.js + +https://app.bilibili.com/x/resource/show/tab\?access_key url script-response-body eval_script.js + +https://app.bilibili.com/x/v2/feed/index\?access_key url script-response-body eval_script.js + +https://app.bilibili.com/x/v2/view\?access_key url script-response-body eval_script.js + +https://api.bilibili.com/x/v2/reply/main\?access_key url script-response-body eval_script.js + +https://api.live.bilibili.com/xlive/app-room/v1/index/getInfoByRoom\?access_key url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/aweme\/post\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/feed\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/follow\/feed\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/nearby\/feed\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/search\/item\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/general\/search\/single\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/hot\/search\/video\/list\/ url script-response-body eval_script.js + +^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice) url script-response-body eval_script.js + +https:\/\/.*\/getGlobalData url script-response-body eval_script.js + +^http(s)://api.bjxkhc.com/index.php/app/ios/(vod/show|(user|vod|topic|type)/index) url script-response-body eval_script.js + +^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json url script-response-body eval_script.js + +^https?:\/\/getuserinfo\.321mh\.com\/app_api\/v5\/getuserinfo\/ url script-response-body eval_script.js + +^https://getuserinfo-globalapi.zymk.cn/app_api/v5/(getuserinfo|coin_account|getuserinfo_ticket|getcomicinfo)/ url script-response-body eval_script.js + +https:\/\/ap(p|i)\.bilibili\.com\/((pgc\/player\/api\/playurl)|(x\/v2\/account\/myinfo\?)|(x\/v2\/account/mine\?)) url script-response-body eval_script.js + +^https?:\/\/vsco\.co\/api\/subscriptions\/2.1\/user-subscriptions\/ url script-response-body eval_script.js + +^https?:\/\/api\.vnision\.com\/v1\/(users\/|banners) url script-response-body eval_script.js + +^https?:\/\/.+\.(my10api|(.*91.*))\.(com|tips|app|xyz)(:\d{2,5})?\/api.php$ url script-response-body eval_script.js + +^https://sp\.kaola\.com/api/openad$ url script-response-body eval_script.js + +^https://r\.inews\.qq.com\/get(QQNewsUnreadList|RecommendList) url script-response-body eval_script.js + +^https?:\/\/.*\.(lago|fuli|xiang(jiao|xiang))apps\.com\/(ucp\/index|getGlobalData|.+\/reqplay\/) url script-response-body eval_script.js + +^https?:\/\/(i|newdrugs)\.dxy\.cn\/(snsapi\/username\/|app\/user\/(pro\/stat\?|init\?timestamp=)) url script-response-body eval_script.js + +^https?:\/\/(.+)\.(\w{2,3})(:?\d*)\/(api\/public\/\?service=Live\.checkLive$|public\/\/\?service=Live\.roomCharge$|lg\/video\/loadVideoFees\.do$) url script-response-body eval_script.js + +^https:\/\/www\.luqijianggushi\.com\/api\/v2\/user\/get url script-response-body eval_script.js + +^https://account.wps.*/api/users/ url script-response-body eval_script.js + +^https:\/\/api\.gyrosco\.pe\/v1\/account\/$ url script-response-body eval_script.js + +^https:\/\/api1\.dobenge\.cn\/api\/user\/getuserinfo url script-response-body eval_script.js + +^https:\/\/api\.mvmtv\.com\/index\.php.*(c=user.*a=info|a=addr.*vid=.*) url script-response-body eval_script.js + +^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user url script-response-body eval_script.js + +https:\/\/api\.termius\.com\/api\/v3\/bulk\/account\/ url script-response-body eval_script.js + +^https:\/\/viva\.v21xy\.com\/api\/rest\/u\/vip url script-response-body eval_script.js + +^https:\/\/biz\.caiyunapp\.com\/v2\/user\?app_name\=weather url script-response-body eval_script.js + +^https:\/\/api\.gotokeep\.com\/(.+\/subject|.+\/dynamic) url script-response-body eval_script.js + +^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\? url script-response-body eval_script.js + +^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) url script-response-body eval_script.js + +^https?:\/\/mp\.bybutter\.com\/mood\/(official-templates|privileges) url script-response-body eval_script.js + +^https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json url script-response-body eval_script.js + +^https:\/\/splice\.oracle\.\w+\.com\/devices\/me url script-response-body eval_script.js + +https:\/\/pan\.baidu\.com\/rest\/2\.0\/membership\/user url script-response-body eval_script.js + +^https?://.*\.snssdk\.com/bds/(feed/stream|comment/cell_reply|cell/cell_comment|cell/detail|ward/list|user/favorite|user/cell_coment|user/cell_userfeed|user/publish_list) url script-response-body eval_script.js + +^https:\/\/viva-asia1\.vvbrd\.com\/api\/rest\/u\/vip* url script-response-body eval_script.js + +^https:\/\/api\.unfold\.app\/v1\/ios\/receipts$ url script-response-body eval_script.js + +^https:\/\/graph\.nhaccuatui\.com\/.*\/users\/info* url script-response-body eval_script.js + +^https:\/\/api\.memrise\.com\/.+\/(me\/$|dashboard\/$|leaderboards\/following\/) url script-response-body eval_script.js + +^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user$ url script-response-body eval_script.js + +^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt$ url script-response-body eval_script.js + +^https:\/\/api\.sync\.me\/api\/purchases\/(report_purchases|get_purchases) url script-response-body eval_script.js + +^https:\/\/pool\.elsanow\.io\/user\/api\/v1\/purchase$ url script-response-body eval_script.js + +^https:\/\/lambda\.us-east-1\.amazonaws\.com/.*/functions\/prod-4-syncPurchases\/invocations$ url script-response-body eval_script.js + +^https:\/\/api\.mondlylanguages\.com\/v1\/ios\/user\/sync$ url script-response-body eval_script.js + +^https:\/\/api\.busuu\.com\/users\/me* url script-response-body eval_script.js + +^https:\/\/owa\.videoshowiosglobalserver\.com\/.*\/iosPayClient url script-response-body eval_script.js + +^https:\/\/accounts\.elevateapp\.net\/api\/users\?user%5Bauthentication_token* url script-response-body eval_script.js + +^https:\/\/api-intl\.mr\.meitu\.com/.*/subs_offer_elg$ url script-response-body eval_script.js + +^https:\/\/bmall\.camera360\.com\/api\/(iap\/check-receipt$|mix\/getinfo$) url script-response-body eval_script.js + +^https?:\/\/api\.tv\.zing\.vn\/.*/user* url script-response-body eval_script.js + +^https:\/\/api\.calm\.com\/me$ url script-response-body eval_script.js + +^https:\/\/photos\.adobe\.io\/v2\/accounts* url script-response-body eval_script.js + +^https:\/\/license\.pdfexpert\.com\/api\/1\.0\/pdfexpert6\/subscription\/(refresh$|check$) url script-response-body eval_script.js + +^https:\/\/subs\.platforms\.team\/.+\/apple\/verify$ url script-response-body eval_script.js + +^https:\/\/apic\.musixmatch\.com\/ws\/.*\/config\.get url script-response-body eval_script.js + +^https:\/\/api\.getmimo\.com\/v1\/subscriptions$ url script-response-body eval_script.js + +^https:\/\/api\.revenuecat\.com\/.+\/(receipts$|subscribers\/[a-zA-Z0-9_-]*$) url script-response-body eval_script.js + +^https:\/\/api\.lingokids\.com\/v1\/renovate_session$ url script-response-body eval_script.js + +^https:\/\/www\.peacefulsoundsapp\.com\/api\/v1\/init$ url script-response-body eval_script.js + +^https:\/\/duolingo-leaderboards-prod\.duolingo\.com\/leaderboards* url script-response-body eval_script.js + +^https:\/\/commerce-i18n-api\.faceu\.mobi\/commerce\/v1\/subscription\/user_info$ url script-response-body eval_script.js + +^https:\/\/api\.global\.mp3\.zing\.vn\/1\.0\/getUserInfo\?data=* url script-response-body eval_script.js + +^https:\/\/api\.blinkist\.com\/v4\/(me$|me.json$|me\/access$) url script-response-body eval_script.js + +^https:\/\/api\.sololearn\.com\/(Profile\/GetProfile$|authenticateDevice$) url script-response-body eval_script.js + +^https:\/\/api-kinemaster-assetstore\.(nexstreaming|kinemasters)\.com\/.*\/product\/verifyReceipt$ url script-response-body eval_script.js + +^https:\/\/api\.pushover\.net\/1\/messages\.json* url script-response-body eval_script.js + +^https:\/\/api\.overhq\.com\/(user\/token\/refresh$|subscription\/verifyReceipt$) url script-response-body eval_script.js + +^https:\/\/receipt-validator\.herewetest\.com\/apple\/verifyTransaction$ url script-response-body eval_script.js + +^https:\/\/license\.pdfexpert\.com\/api\/.*\/documents\/subscription\/(refresh$|check$) url script-response-body eval_script.js + +^https:\/\/education\.github\.com\/api\/user$ url script-response-body eval_script.js + +^https:\/\/backend\.getdrafts\.com\/api\/.*\/verification* url script-response-body eval_script.js + +^https:\/\/lcs-mobile-cops\.adobe\.io\/mobile_profile url script-response-body eval_script.js + +^https:\/\/ssl-api\.itranslateapp\.com\/.*\/subscriptions\/.*\/ios$ url script-response-body eval_script.js + +^https:\/\/sk\.ulysses\.app\/api\/v1\/itunes_receipt_verify$ url script-response-body eval_script.js + +^https:\/\/dayone\.me\/api\/(users|v2\/users\/account-status)$ url script-response-body eval_script.js + +^https:\/\/api-production\.endel\.io\/.*\/user$ url script-response-body eval_script.js + +^https:\/\/api\.shred\.app\/verifyReceipt$ url script-response-body eval_script.js + +^https:\/\/subscription\.grammarly\.com\/api\/v1$ url script-response-body eval_script.js + +^https:\/\/planner5d\.com\/api\/sets url script-response-body eval_script.js + +^https:\/\/secure\.istreamer\.com\/backend$ url script-response-body eval_script.js + +^https:\/\/www\.api\.monkeyuni\.net\/api\/.+\/mobile\/account\/load-update url script-response-body eval_script.js + +^https:\/\/api\.textnow\.me\/api2.0\/users\/.* url script-response-body eval_script.js + +^https:\/\/vipapi\.jxedt\.com\/vip\/check url script-response-body eval_script.js + +^https:\/\/api\.interpreter\.caiyunai\.com\/v1\/user url script-response-body eval_script.js + +^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt url script-response-body eval_script.js + +^https:\/\/pocketlists\.com\/api\/v1\/pocketlists.me.get url script-response-body eval_script.js + +https:\/\/book\.haitunwallet\.com\/app\/vip\/status url script-response-body eval_script.js + +https:\/\/mubu\.com\/api\/app\/user\/info url script-response-body eval_script.js + +^https:\/\/app\.xunjiepdf\.com\/api\/v4\/virtualactregister url script-response-body eval_script.js + +http:\/\/miaow\.yiyongcad\.com\/api\/v4\/memprofile url script-response-body eval_script.js + +https:\/\/api\.lennou\.com\/user\/info url script-response-body eval_script.js + +^https:\/\/api\.gkocr\.com\/api\/userlogin1.php url script-response-body eval_script.js + +^https?:\/\/vira\.llsapp\.com\/api\/v2\/readings\/(accessible|limitation) url script-response-body eval_script.js + +^https:\/\/api\.rr\.tv(\/user\/privilege\/list|\/ad\/getAll|\/rrtv-video\/v4plus\/season\/detail) url script-response-body eval_script.js + +^https?:\/\/pan\.baidu\.com\/s\/ url script-response-body eval_script.js + +^https:\/\/api\.revenuecat\.com\/v1\/(receipts|\d{1,})$ url script-response-body eval_script.js + +https://(commerce-.*api|pay).(faceu|wecut).(com|mobi)/(commerce|apple)/(iosAppVerifyReceipt.php|v1/subscription/user_info) url script-response-body eval_script.js + +^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/theme) url script-response-body eval_script.js + +^http:\/\/115\.com\/lx.*$ url script-response-body eval_script.js + +^https:\/\/api\.lakecoloring\.com\/v1\/receipt url script-response-body eval_script.js + +^http://ctrl.playcvn.com/app/(init|ads) url script-response-body eval_script.js + +^https:\/\/dict\.eudic\.net\/jingting\/GetThisChapterTaskStatus? url script-response-body eval_script.js + +^https?://m.client.10010.com/uniAdmsInterface/getHomePageAd url script-response-body eval_script.js + +^https:\/\/api\.wakamoment\.ga\/init\?platform\=ios url script-response-body eval_script.js + +^https:\/\/api\.diyidan\.net\/v0\.3\/(user\/personal_homepage|vip_user\/info|tv_series\/index\?appChanne) url script-response-body eval_script.js + +^https:\/\/api\.flexibits\.com\/v1\/(auth|account)\/(device|details|appstore-receipt)\/$ url script-response-body eval_script.js + +https?:\/\/api\.jiaonizuocai\.com url script-response-body eval_script.js + +https:\/\/api\.sololearn\.com\/(authenticateDevice|challenge\/GetContestFeed|Profile\/GetProfile)$ url script-response-body eval_script.js + +^https://tncj.hortorgames.com/chicken/fight/(answer|findQuiz) url script-response-body eval_script.js + +^https:\/\/(www\.baidu.com2\.club|ayk\.tmdidi\.com|m\.pearkin\.com|souhu\.mett\.me|bkcd\.b-cdn\.net)\/(api\/movie\/WatchMovie|api\/Account\/CheckVip|api\/account\/IndexDetail) url script-response-body eval_script.js + +^https:\/\/claritywallpaper\.com\/clarity\/api\/(userInfo|special\/queryByCatalogAll) url script-response-body eval_script.js + +https:\/\/bookapi\.ihuman\.com\/(v1\/get\_user\_info|v1\/get\_purchase\_list) url script-response-body eval_script.js + +http:\/\/rest\.zhibo\.tv\/room\/get\-room\-info\-v430 url script-response-body eval_script.js + +https://note.youdao.com/yws/(mapi/payment|api/self) url script-response-body eval_script.js + +^https:\/\/billing\.peakcloud\.org\/billing\/2\/user\/me? url script-response-body eval_script.js + +^https?:\/\/api\.ithome\.com\/json\/slide\/index url script-response-body eval_script.js + +^https?:\/\/api\.ithome\.com\/json\/(newslist|listpage)\/news url script-response-body eval_script.js + +https:\/\/www\.xmind\.cn\/\_res\/devices url script-response-body eval_script.js + +^http?:\/\/.*\.arten.cn/login/login url script-response-body eval_script.js + +^https://api.weiqire.com/api3/(visitor/|user/unlockCharpter) url script-response-body eval_script.js + +https://api.shimo.im/users/ url script-response-body eval_script.js + +^https?:\/\/.*\.videostarapp\.com\/scripts\/subsNew\.php url script-response-body eval_script.js + +https:\/\/api\.revenuecat\.com\/v1\/(subscribers|receipts) url script-response-body eval_script.js + +https://app.api.versa-ai.com/pay/order/iap/check url script-response-body eval_script.js + +^https\:\/\/hjapi\.bjxkhc\.com\/v2d2\/users\/.*\/member url script-response-body eval_script.js + +http:\/\/api\.591master\.com\:8081\/(1.0|3.6.8)\/ui(forum|common)\/(downloadwallpaper|getuser) url script-response-body eval_script.js + +^http\:\/\/jdytv\.cn\/login\/login\/veifys url script-response-body eval_script.js + +http://user.shywck.com/user/userinfo url script-response-body eval_script.js + +^https?:\/\/.*\.xunjie.*\.com\/api\/v\d\/* url script-response-body eval_script.js + +^https:\/\/api\.psy-1\.com\/cosleep\/user\/info url script-response-body eval_script.js + +^https:\/\/snailsleep\.net\/snail\/v1\/profile\/get url script-response-body eval_script.js + +^https:\/\/mob2015\.kekenet\.com\/keke\/mobile\/index\.php url script-response-body eval_script.js + +^https:\/\/m\.samh\.xndm\.tech\/userapi\/info\/v1\/getuserinfo url script-response-body eval_script.js + +^http\:\/\/app\.flashdown365\.com\/ios\/login url script-response-body eval_script.js + +^https:\/\/avoscloud\.com\/1\.1\/users\/ url script-response-body eval_script.js + +^https\:\/\/api\.gao1gps\.cn\/v1\/user\/info url script-response-body eval_script.js + +^https:\/\/api\.meiyan\.com\/iap\/verify\.json url script-response-body eval_script.js + +^https:\/\/bea\.sportq\.com\/SFitWeb\/sfit\/getUserBaseInfo url script-response-body eval_script.js \ No newline at end of file From 7edd023008c68e157102d81f67da30843c044f15 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 27 May 2020 21:37:10 +0800 Subject: [PATCH 0957/1191] update --- eval_script/sg.sgmodule | 316 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 314 insertions(+), 2 deletions(-) diff --git a/eval_script/sg.sgmodule b/eval_script/sg.sgmodule index 909c57d48..6b030f07c 100644 --- a/eval_script/sg.sgmodule +++ b/eval_script/sg.sgmodule @@ -1,7 +1,7 @@ #!name=eval_script.js module [MITM] -hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com,bea.sportq.com,api.meiyan.com,api.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,api*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me [Script] eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js @@ -18,4 +18,316 @@ eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\ eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/moments/recommend,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/topstory/recommend,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://api.zhihu.com/v4/questions,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/people/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/market/header,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/space\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/resource/show/tab\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/feed/index\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/view\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://api.bilibili.com/x/v2/reply/main\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://api.live.bilibili.com/xlive/app-room/v1/index/getInfoByRoom\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/aweme\/post\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/feed\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/follow\/feed\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/nearby\/feed\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/search\/item\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/general\/search\/single\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/hot\/search\/video\/list\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/.*\/getGlobalData,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http(s)://api.bjxkhc.com/index.php/app/ios/(vod/show|(user|vod|topic|type)/index),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/getuserinfo\.321mh\.com\/app_api\/v5\/getuserinfo\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://getuserinfo-globalapi.zymk.cn/app_api/v5/(getuserinfo|coin_account|getuserinfo_ticket|getcomicinfo)/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/ap(p|i)\.bilibili\.com\/((pgc\/player\/api\/playurl)|(x\/v2\/account\/myinfo\?)|(x\/v2\/account/mine\?)),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vsco\.co\/api\/subscriptions\/2.1\/user-subscriptions\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.vnision\.com\/v1\/(users\/|banners),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.+\.(my10api|(.*91.*))\.(com|tips|app|xyz)(:\d{2,5})?\/api.php$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://sp\.kaola\.com/api/openad$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://r\.inews\.qq.com\/get(QQNewsUnreadList|RecommendList),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.(lago|fuli|xiang(jiao|xiang))apps\.com\/(ucp\/index|getGlobalData|.+\/reqplay\/),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/(i|newdrugs)\.dxy\.cn\/(snsapi\/username\/|app\/user\/(pro\/stat\?|init\?timestamp=)),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/(.+)\.(\w{2,3})(:?\d*)\/(api\/public\/\?service=Live\.checkLive$|public\/\/\?service=Live\.roomCharge$|lg\/video\/loadVideoFees\.do$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.luqijianggushi\.com\/api\/v2\/user\/get,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://account.wps.*/api/users/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gyrosco\.pe\/v1\/account\/$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api1\.dobenge\.cn\/api\/user\/getuserinfo,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.mvmtv\.com\/index\.php.*(c=user.*a=info|a=addr.*vid=.*),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.termius\.com\/api\/v3\/bulk\/account\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/viva\.v21xy\.com\/api\/rest\/u\/vip,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/biz\.caiyunapp\.com\/v2\/user\?app_name\=weather,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gotokeep\.com\/(.+\/subject|.+\/dynamic),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\?,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/mp\.bybutter\.com\/mood\/(official-templates|privileges),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/splice\.oracle\.\w+\.com\/devices\/me,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/pan\.baidu\.com\/rest\/2\.0\/membership\/user,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://.*\.snssdk\.com/bds/(feed/stream|comment/cell_reply|cell/cell_comment|cell/detail|ward/list|user/favorite|user/cell_coment|user/cell_userfeed|user/publish_list),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/viva-asia1\.vvbrd\.com\/api\/rest\/u\/vip*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.unfold\.app\/v1\/ios\/receipts$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/graph\.nhaccuatui\.com\/.*\/users\/info*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.memrise\.com\/.+\/(me\/$|dashboard\/$|leaderboards\/following\/),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.sync\.me\/api\/purchases\/(report_purchases|get_purchases),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/pool\.elsanow\.io\/user\/api\/v1\/purchase$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/lambda\.us-east-1\.amazonaws\.com/.*/functions\/prod-4-syncPurchases\/invocations$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.mondlylanguages\.com\/v1\/ios\/user\/sync$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.busuu\.com\/users\/me*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/owa\.videoshowiosglobalserver\.com\/.*\/iosPayClient,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/accounts\.elevateapp\.net\/api\/users\?user%5Bauthentication_token*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-intl\.mr\.meitu\.com/.*/subs_offer_elg$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/bmall\.camera360\.com\/api\/(iap\/check-receipt$|mix\/getinfo$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.tv\.zing\.vn\/.*/user*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.calm\.com\/me$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/photos\.adobe\.io\/v2\/accounts*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/license\.pdfexpert\.com\/api\/1\.0\/pdfexpert6\/subscription\/(refresh$|check$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/subs\.platforms\.team\/.+\/apple\/verify$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/apic\.musixmatch\.com\/ws\/.*\/config\.get,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.getmimo\.com\/v1\/subscriptions$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.revenuecat\.com\/.+\/(receipts$|subscribers\/[a-zA-Z0-9_-]*$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.lingokids\.com\/v1\/renovate_session$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.peacefulsoundsapp\.com\/api\/v1\/init$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/duolingo-leaderboards-prod\.duolingo\.com\/leaderboards*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/commerce-i18n-api\.faceu\.mobi\/commerce\/v1\/subscription\/user_info$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.global\.mp3\.zing\.vn\/1\.0\/getUserInfo\?data=*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.blinkist\.com\/v4\/(me$|me.json$|me\/access$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.sololearn\.com\/(Profile\/GetProfile$|authenticateDevice$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-kinemaster-assetstore\.(nexstreaming|kinemasters)\.com\/.*\/product\/verifyReceipt$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.pushover\.net\/1\/messages\.json*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.overhq\.com\/(user\/token\/refresh$|subscription\/verifyReceipt$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/receipt-validator\.herewetest\.com\/apple\/verifyTransaction$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/license\.pdfexpert\.com\/api\/.*\/documents\/subscription\/(refresh$|check$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/education\.github\.com\/api\/user$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/backend\.getdrafts\.com\/api\/.*\/verification*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/lcs-mobile-cops\.adobe\.io\/mobile_profile,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/ssl-api\.itranslateapp\.com\/.*\/subscriptions\/.*\/ios$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/sk\.ulysses\.app\/api\/v1\/itunes_receipt_verify$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/dayone\.me\/api\/(users|v2\/users\/account-status)$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-production\.endel\.io\/.*\/user$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.shred\.app\/verifyReceipt$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/subscription\.grammarly\.com\/api\/v1$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/planner5d\.com\/api\/sets,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/secure\.istreamer\.com\/backend$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.api\.monkeyuni\.net\/api\/.+\/mobile\/account\/load-update,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.textnow\.me\/api2.0\/users\/.*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/vipapi\.jxedt\.com\/vip\/check,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.interpreter\.caiyunai\.com\/v1\/user,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/pocketlists\.com\/api\/v1\/pocketlists.me.get,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/book\.haitunwallet\.com\/app\/vip\/status,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/mubu\.com\/api\/app\/user\/info,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/app\.xunjiepdf\.com\/api\/v4\/virtualactregister,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/miaow\.yiyongcad\.com\/api\/v4\/memprofile,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.lennou\.com\/user\/info,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gkocr\.com\/api\/userlogin1.php,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vira\.llsapp\.com\/api\/v2\/readings\/(accessible|limitation),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.rr\.tv(\/user\/privilege\/list|\/ad\/getAll|\/rrtv-video\/v4plus\/season\/detail),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/pan\.baidu\.com\/s\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.revenuecat\.com\/v1\/(receipts|\d{1,})$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://(commerce-.*api|pay).(faceu|wecut).(com|mobi)/(commerce|apple)/(iosAppVerifyReceipt.php|v1/subscription/user_info),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/theme),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http:\/\/115\.com\/lx.*$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.lakecoloring\.com\/v1\/receipt,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http://ctrl.playcvn.com/app/(init|ads),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/dict\.eudic\.net\/jingting\/GetThisChapterTaskStatus?,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m.client.10010.com/uniAdmsInterface/getHomePageAd,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.wakamoment\.ga\/init\?platform\=ios,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.diyidan\.net\/v0\.3\/(user\/personal_homepage|vip_user\/info|tv_series\/index\?appChanne),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.flexibits\.com\/v1\/(auth|account)\/(device|details|appstore-receipt)\/$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https?:\/\/api\.jiaonizuocai\.com,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.sololearn\.com\/(authenticateDevice|challenge\/GetContestFeed|Profile\/GetProfile)$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://tncj.hortorgames.com/chicken/fight/(answer|findQuiz),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/(www\.baidu.com2\.club|ayk\.tmdidi\.com|m\.pearkin\.com|souhu\.mett\.me|bkcd\.b-cdn\.net)\/(api\/movie\/WatchMovie|api\/Account\/CheckVip|api\/account\/IndexDetail),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/claritywallpaper\.com\/clarity\/api\/(userInfo|special\/queryByCatalogAll),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/bookapi\.ihuman\.com\/(v1\/get\_user\_info|v1\/get\_purchase\_list),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/rest\.zhibo\.tv\/room\/get\-room\-info\-v430,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://note.youdao.com/yws/(mapi/payment|api/self),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/billing\.peakcloud\.org\/billing\/2\/user\/me?,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.ithome\.com\/json\/slide\/index,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.ithome\.com\/json\/(newslist|listpage)\/news,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/www\.xmind\.cn\/\_res\/devices,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http?:\/\/.*\.arten.cn/login/login,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.weiqire.com/api3/(visitor/|user/unlockCharpter),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://api.shimo.im/users/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.videostarapp\.com\/scripts\/subsNew\.php,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.revenuecat\.com\/v1\/(subscribers|receipts),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.api.versa-ai.com/pay/order/iap/check,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https\:\/\/hjapi\.bjxkhc\.com\/v2d2\/users\/.*\/member,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/api\.591master\.com\:8081\/(1.0|3.6.8)\/ui(forum|common)\/(downloadwallpaper|getuser),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http\:\/\/jdytv\.cn\/login\/login\/veifys,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=http://user.shywck.com/user/userinfo,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.xunjie.*\.com\/api\/v\d\/*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.psy-1\.com\/cosleep\/user\/info,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/snailsleep\.net\/snail\/v1\/profile\/get,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/mob2015\.kekenet\.com\/keke\/mobile\/index\.php,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/m\.samh\.xndm\.tech\/userapi\/info\/v1\/getuserinfo,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http\:\/\/app\.flashdown365\.com\/ios\/login,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/avoscloud\.com\/1\.1\/users\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https\:\/\/api\.gao1gps\.cn\/v1\/user\/info,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.meiyan\.com\/iap\/verify\.json,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/bea\.sportq\.com\/SFitWeb\/sfit\/getUserBaseInfo,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,script-path=eval_script.js \ No newline at end of file From 5bdd818d1d476b2d69b728349e48ac8fd7f354b8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 27 May 2020 21:37:57 +0800 Subject: [PATCH 0958/1191] update From f547d153dc32cb45a229e76ea4159815c8aad676 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 27 May 2020 21:38:00 +0800 Subject: [PATCH 0959/1191] update From 0767a209e4e34ea101e69e3140d7d51bba659dd9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 27 May 2020 21:40:37 +0800 Subject: [PATCH 0960/1191] update --- eval_script/qx.txt | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/eval_script/qx.txt b/eval_script/qx.txt index 8ad9ae6d9..cd8fe015f 100644 --- a/eval_script/qx.txt +++ b/eval_script/qx.txt @@ -1,17 +1,5 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com,bea.sportq.com,api.meiyan.com,api.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,api*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath url script-response-body eval_script.js - -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js - -^http://.+/amdc/mobileDispatch url script-request-body eval_script.js - -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js - ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js @@ -324,4 +312,16 @@ http://user.shywck.com/user/userinfo url script-response-body eval_script.js ^https:\/\/api\.meiyan\.com\/iap\/verify\.json url script-response-body eval_script.js -^https:\/\/bea\.sportq\.com\/SFitWeb\/sfit\/getUserBaseInfo url script-response-body eval_script.js \ No newline at end of file +^https:\/\/bea\.sportq\.com\/SFitWeb\/sfit\/getUserBaseInfo url script-response-body eval_script.js + +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js + +^http://.+/amdc/mobileDispatch url script-request-body eval_script.js + +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath url script-response-body eval_script.js \ No newline at end of file From a8e022c3bd4bd7bcfbe2b7eb322da13c1e75ffe0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 27 May 2020 21:40:40 +0800 Subject: [PATCH 0961/1191] update --- eval_script/sg.sgmodule | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/eval_script/sg.sgmodule b/eval_script/sg.sgmodule index 6b030f07c..ba1094557 100644 --- a/eval_script/sg.sgmodule +++ b/eval_script/sg.sgmodule @@ -4,18 +4,6 @@ hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com,bea.sportq.com,api.meiyan.com,api.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,api*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me [Script] -eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js - -eval_script.js = type=http-response,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,requires-body=1,max-size=0,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js - -eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js - eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js @@ -330,4 +318,14 @@ eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.meiy eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/bea\.sportq\.com\/SFitWeb\/sfit\/getUserBaseInfo,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js + +eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js + +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,script-path=eval_script.js \ No newline at end of file From 896d4f67f1e62479ff8da2f8d6744a546dc960d6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 27 May 2020 21:51:29 +0800 Subject: [PATCH 0962/1191] update --- eval_script/qx_script.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 eval_script/qx_script.txt diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt new file mode 100644 index 000000000..a7bec5f8e --- /dev/null +++ b/eval_script/qx_script.txt @@ -0,0 +1,15 @@ +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js + +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js + +^http://.+/amdc/mobileDispatch url script-request-body eval_script.js + +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js + +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js + +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file From 62c7f00615a85b9bc94be144703b89d9e5377218 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 27 May 2020 21:51:32 +0800 Subject: [PATCH 0963/1191] update --- eval_script/sg_script.sgmodule | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 eval_script/sg_script.sgmodule diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule new file mode 100644 index 000000000..39b0e6ebe --- /dev/null +++ b/eval_script/sg_script.sgmodule @@ -0,0 +1,19 @@ +#!name=eval_script.js module + +[MITM] +hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +[Script] +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js + +eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From 777bd2a90f43d48058cf2dc24a5f5e9ac1089abe Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 28 May 2020 00:00:04 +0800 Subject: [PATCH 0964/1191] update From a6f58885eb79f59b2e90f8af69597e7822abeb6b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 28 May 2020 00:00:07 +0800 Subject: [PATCH 0965/1191] update From 365d6e204a61bd75345e83d71263e86482229e52 Mon Sep 17 00:00:00 2001 From: NobyDa <53217160+NobyDa@users.noreply.github.com> Date: Thu, 28 May 2020 14:55:51 +0800 Subject: [PATCH 0966/1191] Fix netflix season. In some upcoming teleplay, netflix does not return the season info will cause the script error. --- nf_rating_season.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nf_rating_season.js b/nf_rating_season.js index 8965d95a3..0ba67e159 100644 --- a/nf_rating_season.js +++ b/nf_rating_season.js @@ -10,10 +10,10 @@ const netflixTitleCacheKey = "NetflixTitleCacheKey" const map = $tool.read(netflixTitleCacheKey) const id = url.match(/id=(\d+)/)[1] const title = map ? JSON.parse(map)[id] : null +const obj = JSON.parse(body) -if (title) { +if (title && obj.shows[id].seasons) { const key = $tool.read(imdbApikeyCacheKey) - const obj = JSON.parse(body) const seasons = obj.shows[id].seasons.map(item => item.season) const promises = [] for (let index = 0; index < seasons.length; index++) { From be72033eb020619ab64722059d0e580b446f3603 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 30 May 2020 21:42:00 +0800 Subject: [PATCH 0967/1191] update From 7f3eddb42bcb8834d9be5d14f8295b67b5cd7783 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 30 May 2020 21:42:04 +0800 Subject: [PATCH 0968/1191] update From fbb004883f0b757a77eddf8db8c1674f2bc8a1af Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 30 May 2020 21:44:35 +0800 Subject: [PATCH 0969/1191] update From 673d872a6a130d6dc8b59fd3169e672ee7f2a01a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 30 May 2020 21:44:39 +0800 Subject: [PATCH 0970/1191] update From c64485320b082999c8db758684ac97675e7c8a55 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 31 May 2020 22:57:30 +0800 Subject: [PATCH 0971/1191] update From d0dc3e5b9bee5c5e7ce78e7c57bc813ad772a6a6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 31 May 2020 22:57:33 +0800 Subject: [PATCH 0972/1191] update From b09255b83b3bb3a5fe66fdf66494d40589284f40 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 1 Jun 2020 17:06:57 +0800 Subject: [PATCH 0973/1191] update From c154e70a606c2e30844d0d2192a5f9dd05845c0e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 1 Jun 2020 17:07:00 +0800 Subject: [PATCH 0974/1191] update From b37ab69e58a241736101b46dc3011bf4c239f114 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 1 Jun 2020 21:22:48 +0800 Subject: [PATCH 0975/1191] update From 84cc8f21eb2bbae9416d08aa43a3ae70762d8b7a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 1 Jun 2020 21:22:52 +0800 Subject: [PATCH 0976/1191] update From cf1088034c734259acb4a010fd3e70ed950a3aa7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 6 Jun 2020 21:03:08 +0800 Subject: [PATCH 0977/1191] update From b13d9776d31a8138e512b7904876eb3a526fa22a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 6 Jun 2020 21:03:11 +0800 Subject: [PATCH 0978/1191] update From 68e50e769eb0a986a2770e2ceb322d50d62d2448 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 11 Jun 2020 16:24:24 +0800 Subject: [PATCH 0979/1191] update --- eval_script/qx_script.txt | 326 +++++++++++++++++++++++++++++++++++++- 1 file changed, 321 insertions(+), 5 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index a7bec5f8e..3c931bc63 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -1,8 +1,322 @@ -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +hostname = 8.8.8.8,bea.sportq.com,api.meiyan.com,api.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,api.m.jd.com,ios.prod.ftl.netflix.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js + +^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad url script-response-body eval_script.js + +^https://api.zhihu.com/moments/recommend url script-response-body eval_script.js + +^https://api.zhihu.com/topstory/recommend url script-response-body eval_script.js + +https://api.zhihu.com/v4/questions url script-response-body eval_script.js + +^https://api.zhihu.com/people/ url script-response-body eval_script.js + +^https://api.zhihu.com/market/header url script-response-body eval_script.js + +https://app.bilibili.com/x/v2/space\?access_key url script-response-body eval_script.js + +https://app.bilibili.com/x/resource/show/tab\?access_key url script-response-body eval_script.js + +https://app.bilibili.com/x/v2/feed/index\?access_key url script-response-body eval_script.js + +https://app.bilibili.com/x/v2/view\?access_key url script-response-body eval_script.js + +https://api.bilibili.com/x/v2/reply/main\?access_key url script-response-body eval_script.js + +https://api.live.bilibili.com/xlive/app-room/v1/index/getInfoByRoom\?access_key url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/aweme\/post\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/feed\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/follow\/feed\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/nearby\/feed\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/search\/item\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/general\/search\/single\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/hot\/search\/video\/list\/ url script-response-body eval_script.js + +^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice) url script-response-body eval_script.js + +https:\/\/.*\/getGlobalData url script-response-body eval_script.js + +^http(s)://api.bjxkhc.com/index.php/app/ios/(vod/show|(user|vod|topic|type)/index) url script-response-body eval_script.js + +^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json url script-response-body eval_script.js + +^https?:\/\/getuserinfo\.321mh\.com\/app_api\/v5\/getuserinfo\/ url script-response-body eval_script.js + +^https://getuserinfo-globalapi.zymk.cn/app_api/v5/(getuserinfo|coin_account|getuserinfo_ticket|getcomicinfo)/ url script-response-body eval_script.js + +https:\/\/ap(p|i)\.bilibili\.com\/((pgc\/player\/api\/playurl)|(x\/v2\/account\/myinfo\?)|(x\/v2\/account/mine\?)) url script-response-body eval_script.js + +^https?:\/\/vsco\.co\/api\/subscriptions\/2.1\/user-subscriptions\/ url script-response-body eval_script.js + +^https?:\/\/api\.vnision\.com\/v1\/(users\/|banners) url script-response-body eval_script.js + +^https?:\/\/.+\.(my10api|(.*91.*))\.(com|tips|app|xyz)(:\d{2,5})?\/api.php$ url script-response-body eval_script.js + +^https://sp\.kaola\.com/api/openad$ url script-response-body eval_script.js + +^https://r\.inews\.qq.com\/get(QQNewsUnreadList|RecommendList) url script-response-body eval_script.js + +^https?:\/\/.*\.(lago|fuli|xiang(jiao|xiang))apps\.com\/(ucp\/index|getGlobalData|.+\/reqplay\/) url script-response-body eval_script.js + +^https?:\/\/(i|newdrugs)\.dxy\.cn\/(snsapi\/username\/|app\/user\/(pro\/stat\?|init\?timestamp=)) url script-response-body eval_script.js + +^https?:\/\/(.+)\.(\w{2,3})(:?\d*)\/(api\/public\/\?service=Live\.checkLive$|public\/\/\?service=Live\.roomCharge$|lg\/video\/loadVideoFees\.do$) url script-response-body eval_script.js + +^https:\/\/www\.luqijianggushi\.com\/api\/v2\/user\/get url script-response-body eval_script.js + +^https://account.wps.*/api/users/ url script-response-body eval_script.js + +^https:\/\/api\.gyrosco\.pe\/v1\/account\/$ url script-response-body eval_script.js + +^https:\/\/api1\.dobenge\.cn\/api\/user\/getuserinfo url script-response-body eval_script.js + +^https:\/\/api\.mvmtv\.com\/index\.php.*(c=user.*a=info|a=addr.*vid=.*) url script-response-body eval_script.js + +^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user url script-response-body eval_script.js + +https:\/\/api\.termius\.com\/api\/v3\/bulk\/account\/ url script-response-body eval_script.js + +^https:\/\/viva\.v21xy\.com\/api\/rest\/u\/vip url script-response-body eval_script.js + +^https:\/\/biz\.caiyunapp\.com\/v2\/user\?app_name\=weather url script-response-body eval_script.js + +^https:\/\/api\.gotokeep\.com\/(.+\/subject|.+\/dynamic) url script-response-body eval_script.js + +^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\? url script-response-body eval_script.js + +^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) url script-response-body eval_script.js + +^https?:\/\/mp\.bybutter\.com\/mood\/(official-templates|privileges) url script-response-body eval_script.js + +^https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json url script-response-body eval_script.js + +^https:\/\/splice\.oracle\.\w+\.com\/devices\/me url script-response-body eval_script.js + +https:\/\/pan\.baidu\.com\/rest\/2\.0\/membership\/user url script-response-body eval_script.js + +^https?://.*\.snssdk\.com/bds/(feed/stream|comment/cell_reply|cell/cell_comment|cell/detail|ward/list|user/favorite|user/cell_coment|user/cell_userfeed|user/publish_list) url script-response-body eval_script.js + +^https:\/\/viva-asia1\.vvbrd\.com\/api\/rest\/u\/vip* url script-response-body eval_script.js + +^https:\/\/api\.unfold\.app\/v1\/ios\/receipts$ url script-response-body eval_script.js + +^https:\/\/graph\.nhaccuatui\.com\/.*\/users\/info* url script-response-body eval_script.js + +^https:\/\/api\.memrise\.com\/.+\/(me\/$|dashboard\/$|leaderboards\/following\/) url script-response-body eval_script.js + +^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user$ url script-response-body eval_script.js + +^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt$ url script-response-body eval_script.js + +^https:\/\/api\.sync\.me\/api\/purchases\/(report_purchases|get_purchases) url script-response-body eval_script.js + +^https:\/\/pool\.elsanow\.io\/user\/api\/v1\/purchase$ url script-response-body eval_script.js + +^https:\/\/lambda\.us-east-1\.amazonaws\.com/.*/functions\/prod-4-syncPurchases\/invocations$ url script-response-body eval_script.js + +^https:\/\/api\.mondlylanguages\.com\/v1\/ios\/user\/sync$ url script-response-body eval_script.js + +^https:\/\/api\.busuu\.com\/users\/me* url script-response-body eval_script.js + +^https:\/\/owa\.videoshowiosglobalserver\.com\/.*\/iosPayClient url script-response-body eval_script.js + +^https:\/\/accounts\.elevateapp\.net\/api\/users\?user%5Bauthentication_token* url script-response-body eval_script.js + +^https:\/\/api-intl\.mr\.meitu\.com/.*/subs_offer_elg$ url script-response-body eval_script.js + +^https:\/\/bmall\.camera360\.com\/api\/(iap\/check-receipt$|mix\/getinfo$) url script-response-body eval_script.js + +^https?:\/\/api\.tv\.zing\.vn\/.*/user* url script-response-body eval_script.js + +^https:\/\/api\.calm\.com\/me$ url script-response-body eval_script.js + +^https:\/\/photos\.adobe\.io\/v2\/accounts* url script-response-body eval_script.js + +^https:\/\/license\.pdfexpert\.com\/api\/1\.0\/pdfexpert6\/subscription\/(refresh$|check$) url script-response-body eval_script.js + +^https:\/\/subs\.platforms\.team\/.+\/apple\/verify$ url script-response-body eval_script.js + +^https:\/\/apic\.musixmatch\.com\/ws\/.*\/config\.get url script-response-body eval_script.js + +^https:\/\/api\.getmimo\.com\/v1\/subscriptions$ url script-response-body eval_script.js + +^https:\/\/api\.revenuecat\.com\/.+\/(receipts$|subscribers\/[a-zA-Z0-9_-]*$) url script-response-body eval_script.js + +^https:\/\/api\.lingokids\.com\/v1\/renovate_session$ url script-response-body eval_script.js + +^https:\/\/www\.peacefulsoundsapp\.com\/api\/v1\/init$ url script-response-body eval_script.js + +^https:\/\/duolingo-leaderboards-prod\.duolingo\.com\/leaderboards* url script-response-body eval_script.js + +^https:\/\/commerce-i18n-api\.faceu\.mobi\/commerce\/v1\/subscription\/user_info$ url script-response-body eval_script.js + +^https:\/\/api\.global\.mp3\.zing\.vn\/1\.0\/getUserInfo\?data=* url script-response-body eval_script.js + +^https:\/\/api\.blinkist\.com\/v4\/(me$|me.json$|me\/access$) url script-response-body eval_script.js + +^https:\/\/api\.sololearn\.com\/(Profile\/GetProfile$|authenticateDevice$) url script-response-body eval_script.js + +^https:\/\/api-kinemaster-assetstore\.(nexstreaming|kinemasters)\.com\/.*\/product\/verifyReceipt$ url script-response-body eval_script.js + +^https:\/\/api\.pushover\.net\/1\/messages\.json* url script-response-body eval_script.js + +^https:\/\/api\.overhq\.com\/(user\/token\/refresh$|subscription\/verifyReceipt$) url script-response-body eval_script.js + +^https:\/\/receipt-validator\.herewetest\.com\/apple\/verifyTransaction$ url script-response-body eval_script.js + +^https:\/\/license\.pdfexpert\.com\/api\/.*\/documents\/subscription\/(refresh$|check$) url script-response-body eval_script.js + +^https:\/\/education\.github\.com\/api\/user$ url script-response-body eval_script.js + +^https:\/\/backend\.getdrafts\.com\/api\/.*\/verification* url script-response-body eval_script.js + +^https:\/\/lcs-mobile-cops\.adobe\.io\/mobile_profile url script-response-body eval_script.js + +^https:\/\/ssl-api\.itranslateapp\.com\/.*\/subscriptions\/.*\/ios$ url script-response-body eval_script.js + +^https:\/\/sk\.ulysses\.app\/api\/v1\/itunes_receipt_verify$ url script-response-body eval_script.js + +^https:\/\/dayone\.me\/api\/(users|v2\/users\/account-status)$ url script-response-body eval_script.js + +^https:\/\/api-production\.endel\.io\/.*\/user$ url script-response-body eval_script.js + +^https:\/\/api\.shred\.app\/verifyReceipt$ url script-response-body eval_script.js + +^https:\/\/subscription\.grammarly\.com\/api\/v1$ url script-response-body eval_script.js + +^https:\/\/planner5d\.com\/api\/sets url script-response-body eval_script.js + +^https:\/\/secure\.istreamer\.com\/backend$ url script-response-body eval_script.js + +^https:\/\/www\.api\.monkeyuni\.net\/api\/.+\/mobile\/account\/load-update url script-response-body eval_script.js + +^https:\/\/api\.textnow\.me\/api2.0\/users\/.* url script-response-body eval_script.js + +^https:\/\/vipapi\.jxedt\.com\/vip\/check url script-response-body eval_script.js + +^https:\/\/api\.interpreter\.caiyunai\.com\/v1\/user url script-response-body eval_script.js + +^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt url script-response-body eval_script.js + +^https:\/\/pocketlists\.com\/api\/v1\/pocketlists.me.get url script-response-body eval_script.js + +https:\/\/book\.haitunwallet\.com\/app\/vip\/status url script-response-body eval_script.js + +https:\/\/mubu\.com\/api\/app\/user\/info url script-response-body eval_script.js + +^https:\/\/app\.xunjiepdf\.com\/api\/v4\/virtualactregister url script-response-body eval_script.js + +http:\/\/miaow\.yiyongcad\.com\/api\/v4\/memprofile url script-response-body eval_script.js + +https:\/\/api\.lennou\.com\/user\/info url script-response-body eval_script.js + +^https:\/\/api\.gkocr\.com\/api\/userlogin1.php url script-response-body eval_script.js + +^https?:\/\/vira\.llsapp\.com\/api\/v2\/readings\/(accessible|limitation) url script-response-body eval_script.js + +^https:\/\/api\.rr\.tv(\/user\/privilege\/list|\/ad\/getAll|\/rrtv-video\/v4plus\/season\/detail) url script-response-body eval_script.js + +^https?:\/\/pan\.baidu\.com\/s\/ url script-response-body eval_script.js + +^https:\/\/api\.revenuecat\.com\/v1\/(receipts|\d{1,})$ url script-response-body eval_script.js + +https://(commerce-.*api|pay).(faceu|wecut).(com|mobi)/(commerce|apple)/(iosAppVerifyReceipt.php|v1/subscription/user_info) url script-response-body eval_script.js + +^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/theme) url script-response-body eval_script.js + +^http:\/\/115\.com\/lx.*$ url script-response-body eval_script.js + +^https:\/\/api\.lakecoloring\.com\/v1\/receipt url script-response-body eval_script.js + +^http://ctrl.playcvn.com/app/(init|ads) url script-response-body eval_script.js + +^https:\/\/dict\.eudic\.net\/jingting\/GetThisChapterTaskStatus? url script-response-body eval_script.js + +^https?://m.client.10010.com/uniAdmsInterface/getHomePageAd url script-response-body eval_script.js + +^https:\/\/api\.wakamoment\.ga\/init\?platform\=ios url script-response-body eval_script.js + +^https:\/\/api\.diyidan\.net\/v0\.3\/(user\/personal_homepage|vip_user\/info|tv_series\/index\?appChanne) url script-response-body eval_script.js + +^https:\/\/api\.flexibits\.com\/v1\/(auth|account)\/(device|details|appstore-receipt)\/$ url script-response-body eval_script.js + +https?:\/\/api\.jiaonizuocai\.com url script-response-body eval_script.js + +https:\/\/api\.sololearn\.com\/(authenticateDevice|challenge\/GetContestFeed|Profile\/GetProfile)$ url script-response-body eval_script.js + +^https://tncj.hortorgames.com/chicken/fight/(answer|findQuiz) url script-response-body eval_script.js + +^https:\/\/(www\.baidu.com2\.club|ayk\.tmdidi\.com|m\.pearkin\.com|souhu\.mett\.me|bkcd\.b-cdn\.net)\/(api\/movie\/WatchMovie|api\/Account\/CheckVip|api\/account\/IndexDetail) url script-response-body eval_script.js + +^https:\/\/claritywallpaper\.com\/clarity\/api\/(userInfo|special\/queryByCatalogAll) url script-response-body eval_script.js + +https:\/\/bookapi\.ihuman\.com\/(v1\/get\_user\_info|v1\/get\_purchase\_list) url script-response-body eval_script.js + +http:\/\/rest\.zhibo\.tv\/room\/get\-room\-info\-v430 url script-response-body eval_script.js + +https://note.youdao.com/yws/(mapi/payment|api/self) url script-response-body eval_script.js + +^https:\/\/billing\.peakcloud\.org\/billing\/2\/user\/me? url script-response-body eval_script.js + +^https?:\/\/api\.ithome\.com\/json\/slide\/index url script-response-body eval_script.js + +^https?:\/\/api\.ithome\.com\/json\/(newslist|listpage)\/news url script-response-body eval_script.js + +https:\/\/www\.xmind\.cn\/\_res\/devices url script-response-body eval_script.js + +^http?:\/\/.*\.arten.cn/login/login url script-response-body eval_script.js + +^https://api.weiqire.com/api3/(visitor/|user/unlockCharpter) url script-response-body eval_script.js + +https://api.shimo.im/users/ url script-response-body eval_script.js + +^https?:\/\/.*\.videostarapp\.com\/scripts\/subsNew\.php url script-response-body eval_script.js + +https:\/\/api\.revenuecat\.com\/v1\/(subscribers|receipts) url script-response-body eval_script.js + +https://app.api.versa-ai.com/pay/order/iap/check url script-response-body eval_script.js + +^https\:\/\/hjapi\.bjxkhc\.com\/v2d2\/users\/.*\/member url script-response-body eval_script.js + +http:\/\/api\.591master\.com\:8081\/(1.0|3.6.8)\/ui(forum|common)\/(downloadwallpaper|getuser) url script-response-body eval_script.js + +^http\:\/\/jdytv\.cn\/login\/login\/veifys url script-response-body eval_script.js + +http://user.shywck.com/user/userinfo url script-response-body eval_script.js + +^https?:\/\/.*\.xunjie.*\.com\/api\/v\d\/* url script-response-body eval_script.js + +^https:\/\/api\.psy-1\.com\/cosleep\/user\/info url script-response-body eval_script.js + +^https:\/\/snailsleep\.net\/snail\/v1\/profile\/get url script-response-body eval_script.js + +^https:\/\/mob2015\.kekenet\.com\/keke\/mobile\/index\.php url script-response-body eval_script.js + +^https:\/\/m\.samh\.xndm\.tech\/userapi\/info\/v1\/getuserinfo url script-response-body eval_script.js + +^http\:\/\/app\.flashdown365\.com\/ios\/login url script-response-body eval_script.js + +^https:\/\/avoscloud\.com\/1\.1\/users\/ url script-response-body eval_script.js + +^https\:\/\/api\.gao1gps\.cn\/v1\/user\/info url script-response-body eval_script.js + +^https:\/\/api\.meiyan\.com\/iap\/verify\.json url script-response-body eval_script.js + +^https:\/\/bea\.sportq\.com\/SFitWeb\/sfit\/getUserBaseInfo url script-response-body eval_script.js + +^https://8.8.8.8/api url script-request-body eval_script.js + +^https://8.8.8.8/(home|app|log\/) url script-response-body eval_script.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js @@ -10,6 +324,8 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,ap ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file +^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath url script-response-body eval_script.js \ No newline at end of file From ae7fccc3f8490727fdf90709f6b40a288f30594e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 11 Jun 2020 16:24:27 +0800 Subject: [PATCH 0980/1191] update --- eval_script/sg_script.sgmodule | 326 ++++++++++++++++++++++++++++++++- 1 file changed, 321 insertions(+), 5 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index 39b0e6ebe..a5a3b3307 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -1,12 +1,326 @@ #!name=eval_script.js module [MITM] -hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +hostname = %INSERT% 8.8.8.8,bea.sportq.com,api.meiyan.com,api.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,api.m.jd.com,ios.prod.ftl.netflix.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me [Script] -eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/moments/recommend,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/topstory/recommend,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://api.zhihu.com/v4/questions,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/people/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/market/header,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/space\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/resource/show/tab\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/feed/index\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/view\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://api.bilibili.com/x/v2/reply/main\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://api.live.bilibili.com/xlive/app-room/v1/index/getInfoByRoom\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/aweme\/post\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/feed\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/follow\/feed\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/nearby\/feed\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/search\/item\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/general\/search\/single\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/hot\/search\/video\/list\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/.*\/getGlobalData,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http(s)://api.bjxkhc.com/index.php/app/ios/(vod/show|(user|vod|topic|type)/index),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/getuserinfo\.321mh\.com\/app_api\/v5\/getuserinfo\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://getuserinfo-globalapi.zymk.cn/app_api/v5/(getuserinfo|coin_account|getuserinfo_ticket|getcomicinfo)/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/ap(p|i)\.bilibili\.com\/((pgc\/player\/api\/playurl)|(x\/v2\/account\/myinfo\?)|(x\/v2\/account/mine\?)),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vsco\.co\/api\/subscriptions\/2.1\/user-subscriptions\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.vnision\.com\/v1\/(users\/|banners),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.+\.(my10api|(.*91.*))\.(com|tips|app|xyz)(:\d{2,5})?\/api.php$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://sp\.kaola\.com/api/openad$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://r\.inews\.qq.com\/get(QQNewsUnreadList|RecommendList),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.(lago|fuli|xiang(jiao|xiang))apps\.com\/(ucp\/index|getGlobalData|.+\/reqplay\/),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/(i|newdrugs)\.dxy\.cn\/(snsapi\/username\/|app\/user\/(pro\/stat\?|init\?timestamp=)),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/(.+)\.(\w{2,3})(:?\d*)\/(api\/public\/\?service=Live\.checkLive$|public\/\/\?service=Live\.roomCharge$|lg\/video\/loadVideoFees\.do$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.luqijianggushi\.com\/api\/v2\/user\/get,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://account.wps.*/api/users/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gyrosco\.pe\/v1\/account\/$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api1\.dobenge\.cn\/api\/user\/getuserinfo,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.mvmtv\.com\/index\.php.*(c=user.*a=info|a=addr.*vid=.*),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.termius\.com\/api\/v3\/bulk\/account\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/viva\.v21xy\.com\/api\/rest\/u\/vip,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/biz\.caiyunapp\.com\/v2\/user\?app_name\=weather,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gotokeep\.com\/(.+\/subject|.+\/dynamic),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\?,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/mp\.bybutter\.com\/mood\/(official-templates|privileges),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/splice\.oracle\.\w+\.com\/devices\/me,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/pan\.baidu\.com\/rest\/2\.0\/membership\/user,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://.*\.snssdk\.com/bds/(feed/stream|comment/cell_reply|cell/cell_comment|cell/detail|ward/list|user/favorite|user/cell_coment|user/cell_userfeed|user/publish_list),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/viva-asia1\.vvbrd\.com\/api\/rest\/u\/vip*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.unfold\.app\/v1\/ios\/receipts$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/graph\.nhaccuatui\.com\/.*\/users\/info*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.memrise\.com\/.+\/(me\/$|dashboard\/$|leaderboards\/following\/),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.sync\.me\/api\/purchases\/(report_purchases|get_purchases),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/pool\.elsanow\.io\/user\/api\/v1\/purchase$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/lambda\.us-east-1\.amazonaws\.com/.*/functions\/prod-4-syncPurchases\/invocations$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.mondlylanguages\.com\/v1\/ios\/user\/sync$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.busuu\.com\/users\/me*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/owa\.videoshowiosglobalserver\.com\/.*\/iosPayClient,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/accounts\.elevateapp\.net\/api\/users\?user%5Bauthentication_token*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-intl\.mr\.meitu\.com/.*/subs_offer_elg$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/bmall\.camera360\.com\/api\/(iap\/check-receipt$|mix\/getinfo$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.tv\.zing\.vn\/.*/user*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.calm\.com\/me$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/photos\.adobe\.io\/v2\/accounts*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/license\.pdfexpert\.com\/api\/1\.0\/pdfexpert6\/subscription\/(refresh$|check$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/subs\.platforms\.team\/.+\/apple\/verify$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/apic\.musixmatch\.com\/ws\/.*\/config\.get,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.getmimo\.com\/v1\/subscriptions$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.revenuecat\.com\/.+\/(receipts$|subscribers\/[a-zA-Z0-9_-]*$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.lingokids\.com\/v1\/renovate_session$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.peacefulsoundsapp\.com\/api\/v1\/init$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/duolingo-leaderboards-prod\.duolingo\.com\/leaderboards*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/commerce-i18n-api\.faceu\.mobi\/commerce\/v1\/subscription\/user_info$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.global\.mp3\.zing\.vn\/1\.0\/getUserInfo\?data=*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.blinkist\.com\/v4\/(me$|me.json$|me\/access$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.sololearn\.com\/(Profile\/GetProfile$|authenticateDevice$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-kinemaster-assetstore\.(nexstreaming|kinemasters)\.com\/.*\/product\/verifyReceipt$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.pushover\.net\/1\/messages\.json*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.overhq\.com\/(user\/token\/refresh$|subscription\/verifyReceipt$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/receipt-validator\.herewetest\.com\/apple\/verifyTransaction$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/license\.pdfexpert\.com\/api\/.*\/documents\/subscription\/(refresh$|check$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/education\.github\.com\/api\/user$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/backend\.getdrafts\.com\/api\/.*\/verification*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/lcs-mobile-cops\.adobe\.io\/mobile_profile,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/ssl-api\.itranslateapp\.com\/.*\/subscriptions\/.*\/ios$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/sk\.ulysses\.app\/api\/v1\/itunes_receipt_verify$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/dayone\.me\/api\/(users|v2\/users\/account-status)$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-production\.endel\.io\/.*\/user$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.shred\.app\/verifyReceipt$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/subscription\.grammarly\.com\/api\/v1$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/planner5d\.com\/api\/sets,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/secure\.istreamer\.com\/backend$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.api\.monkeyuni\.net\/api\/.+\/mobile\/account\/load-update,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.textnow\.me\/api2.0\/users\/.*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/vipapi\.jxedt\.com\/vip\/check,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.interpreter\.caiyunai\.com\/v1\/user,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/pocketlists\.com\/api\/v1\/pocketlists.me.get,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/book\.haitunwallet\.com\/app\/vip\/status,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/mubu\.com\/api\/app\/user\/info,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/app\.xunjiepdf\.com\/api\/v4\/virtualactregister,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/miaow\.yiyongcad\.com\/api\/v4\/memprofile,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.lennou\.com\/user\/info,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gkocr\.com\/api\/userlogin1.php,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vira\.llsapp\.com\/api\/v2\/readings\/(accessible|limitation),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.rr\.tv(\/user\/privilege\/list|\/ad\/getAll|\/rrtv-video\/v4plus\/season\/detail),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/pan\.baidu\.com\/s\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.revenuecat\.com\/v1\/(receipts|\d{1,})$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://(commerce-.*api|pay).(faceu|wecut).(com|mobi)/(commerce|apple)/(iosAppVerifyReceipt.php|v1/subscription/user_info),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/theme),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http:\/\/115\.com\/lx.*$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.lakecoloring\.com\/v1\/receipt,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http://ctrl.playcvn.com/app/(init|ads),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/dict\.eudic\.net\/jingting\/GetThisChapterTaskStatus?,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m.client.10010.com/uniAdmsInterface/getHomePageAd,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.wakamoment\.ga\/init\?platform\=ios,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.diyidan\.net\/v0\.3\/(user\/personal_homepage|vip_user\/info|tv_series\/index\?appChanne),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.flexibits\.com\/v1\/(auth|account)\/(device|details|appstore-receipt)\/$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https?:\/\/api\.jiaonizuocai\.com,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.sololearn\.com\/(authenticateDevice|challenge\/GetContestFeed|Profile\/GetProfile)$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://tncj.hortorgames.com/chicken/fight/(answer|findQuiz),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/(www\.baidu.com2\.club|ayk\.tmdidi\.com|m\.pearkin\.com|souhu\.mett\.me|bkcd\.b-cdn\.net)\/(api\/movie\/WatchMovie|api\/Account\/CheckVip|api\/account\/IndexDetail),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/claritywallpaper\.com\/clarity\/api\/(userInfo|special\/queryByCatalogAll),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/bookapi\.ihuman\.com\/(v1\/get\_user\_info|v1\/get\_purchase\_list),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/rest\.zhibo\.tv\/room\/get\-room\-info\-v430,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://note.youdao.com/yws/(mapi/payment|api/self),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/billing\.peakcloud\.org\/billing\/2\/user\/me?,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.ithome\.com\/json\/slide\/index,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.ithome\.com\/json\/(newslist|listpage)\/news,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/www\.xmind\.cn\/\_res\/devices,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http?:\/\/.*\.arten.cn/login/login,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.weiqire.com/api3/(visitor/|user/unlockCharpter),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://api.shimo.im/users/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.videostarapp\.com\/scripts\/subsNew\.php,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.revenuecat\.com\/v1\/(subscribers|receipts),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.api.versa-ai.com/pay/order/iap/check,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https\:\/\/hjapi\.bjxkhc\.com\/v2d2\/users\/.*\/member,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/api\.591master\.com\:8081\/(1.0|3.6.8)\/ui(forum|common)\/(downloadwallpaper|getuser),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http\:\/\/jdytv\.cn\/login\/login\/veifys,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=http://user.shywck.com/user/userinfo,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.xunjie.*\.com\/api\/v\d\/*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.psy-1\.com\/cosleep\/user\/info,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/snailsleep\.net\/snail\/v1\/profile\/get,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/mob2015\.kekenet\.com\/keke\/mobile\/index\.php,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/m\.samh\.xndm\.tech\/userapi\/info\/v1\/getuserinfo,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http\:\/\/app\.flashdown365\.com\/ios\/login,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/avoscloud\.com\/1\.1\/users\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https\:\/\/api\.gao1gps\.cn\/v1\/user\/info,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.meiyan\.com\/iap\/verify\.json,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/bea\.sportq\.com\/SFitWeb\/sfit\/getUserBaseInfo,script-path=eval_script.js + +eval_script.js = type=http-request,requires-body=1,pattern=^https://8.8.8.8/api,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://8.8.8.8/(home|app|log\/),script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js @@ -14,6 +328,8 @@ eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobil eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,script-path=eval_script.js \ No newline at end of file From f108aca7111683b655af6c24d63feef843498407 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 11 Jun 2020 16:34:38 +0800 Subject: [PATCH 0981/1191] update --- eval_script/qx_script.txt | 326 +------------------------------------- 1 file changed, 5 insertions(+), 321 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index 3c931bc63..a7bec5f8e 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -1,322 +1,8 @@ -hostname = 8.8.8.8,bea.sportq.com,api.meiyan.com,api.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,api.m.jd.com,ios.prod.ftl.netflix.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js - -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js - -^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad url script-response-body eval_script.js - -^https://api.zhihu.com/moments/recommend url script-response-body eval_script.js - -^https://api.zhihu.com/topstory/recommend url script-response-body eval_script.js - -https://api.zhihu.com/v4/questions url script-response-body eval_script.js - -^https://api.zhihu.com/people/ url script-response-body eval_script.js - -^https://api.zhihu.com/market/header url script-response-body eval_script.js - -https://app.bilibili.com/x/v2/space\?access_key url script-response-body eval_script.js - -https://app.bilibili.com/x/resource/show/tab\?access_key url script-response-body eval_script.js - -https://app.bilibili.com/x/v2/feed/index\?access_key url script-response-body eval_script.js - -https://app.bilibili.com/x/v2/view\?access_key url script-response-body eval_script.js - -https://api.bilibili.com/x/v2/reply/main\?access_key url script-response-body eval_script.js - -https://api.live.bilibili.com/xlive/app-room/v1/index/getInfoByRoom\?access_key url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/aweme\/post\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/feed\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/follow\/feed\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/nearby\/feed\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/search\/item\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/general\/search\/single\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/hot\/search\/video\/list\/ url script-response-body eval_script.js - -^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice) url script-response-body eval_script.js - -https:\/\/.*\/getGlobalData url script-response-body eval_script.js - -^http(s)://api.bjxkhc.com/index.php/app/ios/(vod/show|(user|vod|topic|type)/index) url script-response-body eval_script.js - -^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json url script-response-body eval_script.js - -^https?:\/\/getuserinfo\.321mh\.com\/app_api\/v5\/getuserinfo\/ url script-response-body eval_script.js - -^https://getuserinfo-globalapi.zymk.cn/app_api/v5/(getuserinfo|coin_account|getuserinfo_ticket|getcomicinfo)/ url script-response-body eval_script.js - -https:\/\/ap(p|i)\.bilibili\.com\/((pgc\/player\/api\/playurl)|(x\/v2\/account\/myinfo\?)|(x\/v2\/account/mine\?)) url script-response-body eval_script.js - -^https?:\/\/vsco\.co\/api\/subscriptions\/2.1\/user-subscriptions\/ url script-response-body eval_script.js - -^https?:\/\/api\.vnision\.com\/v1\/(users\/|banners) url script-response-body eval_script.js - -^https?:\/\/.+\.(my10api|(.*91.*))\.(com|tips|app|xyz)(:\d{2,5})?\/api.php$ url script-response-body eval_script.js - -^https://sp\.kaola\.com/api/openad$ url script-response-body eval_script.js - -^https://r\.inews\.qq.com\/get(QQNewsUnreadList|RecommendList) url script-response-body eval_script.js - -^https?:\/\/.*\.(lago|fuli|xiang(jiao|xiang))apps\.com\/(ucp\/index|getGlobalData|.+\/reqplay\/) url script-response-body eval_script.js - -^https?:\/\/(i|newdrugs)\.dxy\.cn\/(snsapi\/username\/|app\/user\/(pro\/stat\?|init\?timestamp=)) url script-response-body eval_script.js - -^https?:\/\/(.+)\.(\w{2,3})(:?\d*)\/(api\/public\/\?service=Live\.checkLive$|public\/\/\?service=Live\.roomCharge$|lg\/video\/loadVideoFees\.do$) url script-response-body eval_script.js - -^https:\/\/www\.luqijianggushi\.com\/api\/v2\/user\/get url script-response-body eval_script.js - -^https://account.wps.*/api/users/ url script-response-body eval_script.js - -^https:\/\/api\.gyrosco\.pe\/v1\/account\/$ url script-response-body eval_script.js - -^https:\/\/api1\.dobenge\.cn\/api\/user\/getuserinfo url script-response-body eval_script.js - -^https:\/\/api\.mvmtv\.com\/index\.php.*(c=user.*a=info|a=addr.*vid=.*) url script-response-body eval_script.js - -^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user url script-response-body eval_script.js - -https:\/\/api\.termius\.com\/api\/v3\/bulk\/account\/ url script-response-body eval_script.js - -^https:\/\/viva\.v21xy\.com\/api\/rest\/u\/vip url script-response-body eval_script.js - -^https:\/\/biz\.caiyunapp\.com\/v2\/user\?app_name\=weather url script-response-body eval_script.js - -^https:\/\/api\.gotokeep\.com\/(.+\/subject|.+\/dynamic) url script-response-body eval_script.js - -^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\? url script-response-body eval_script.js - -^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) url script-response-body eval_script.js - -^https?:\/\/mp\.bybutter\.com\/mood\/(official-templates|privileges) url script-response-body eval_script.js - -^https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json url script-response-body eval_script.js - -^https:\/\/splice\.oracle\.\w+\.com\/devices\/me url script-response-body eval_script.js - -https:\/\/pan\.baidu\.com\/rest\/2\.0\/membership\/user url script-response-body eval_script.js - -^https?://.*\.snssdk\.com/bds/(feed/stream|comment/cell_reply|cell/cell_comment|cell/detail|ward/list|user/favorite|user/cell_coment|user/cell_userfeed|user/publish_list) url script-response-body eval_script.js - -^https:\/\/viva-asia1\.vvbrd\.com\/api\/rest\/u\/vip* url script-response-body eval_script.js - -^https:\/\/api\.unfold\.app\/v1\/ios\/receipts$ url script-response-body eval_script.js - -^https:\/\/graph\.nhaccuatui\.com\/.*\/users\/info* url script-response-body eval_script.js - -^https:\/\/api\.memrise\.com\/.+\/(me\/$|dashboard\/$|leaderboards\/following\/) url script-response-body eval_script.js - -^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user$ url script-response-body eval_script.js - -^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt$ url script-response-body eval_script.js - -^https:\/\/api\.sync\.me\/api\/purchases\/(report_purchases|get_purchases) url script-response-body eval_script.js - -^https:\/\/pool\.elsanow\.io\/user\/api\/v1\/purchase$ url script-response-body eval_script.js - -^https:\/\/lambda\.us-east-1\.amazonaws\.com/.*/functions\/prod-4-syncPurchases\/invocations$ url script-response-body eval_script.js - -^https:\/\/api\.mondlylanguages\.com\/v1\/ios\/user\/sync$ url script-response-body eval_script.js - -^https:\/\/api\.busuu\.com\/users\/me* url script-response-body eval_script.js - -^https:\/\/owa\.videoshowiosglobalserver\.com\/.*\/iosPayClient url script-response-body eval_script.js - -^https:\/\/accounts\.elevateapp\.net\/api\/users\?user%5Bauthentication_token* url script-response-body eval_script.js - -^https:\/\/api-intl\.mr\.meitu\.com/.*/subs_offer_elg$ url script-response-body eval_script.js - -^https:\/\/bmall\.camera360\.com\/api\/(iap\/check-receipt$|mix\/getinfo$) url script-response-body eval_script.js - -^https?:\/\/api\.tv\.zing\.vn\/.*/user* url script-response-body eval_script.js - -^https:\/\/api\.calm\.com\/me$ url script-response-body eval_script.js - -^https:\/\/photos\.adobe\.io\/v2\/accounts* url script-response-body eval_script.js - -^https:\/\/license\.pdfexpert\.com\/api\/1\.0\/pdfexpert6\/subscription\/(refresh$|check$) url script-response-body eval_script.js - -^https:\/\/subs\.platforms\.team\/.+\/apple\/verify$ url script-response-body eval_script.js - -^https:\/\/apic\.musixmatch\.com\/ws\/.*\/config\.get url script-response-body eval_script.js - -^https:\/\/api\.getmimo\.com\/v1\/subscriptions$ url script-response-body eval_script.js - -^https:\/\/api\.revenuecat\.com\/.+\/(receipts$|subscribers\/[a-zA-Z0-9_-]*$) url script-response-body eval_script.js - -^https:\/\/api\.lingokids\.com\/v1\/renovate_session$ url script-response-body eval_script.js - -^https:\/\/www\.peacefulsoundsapp\.com\/api\/v1\/init$ url script-response-body eval_script.js - -^https:\/\/duolingo-leaderboards-prod\.duolingo\.com\/leaderboards* url script-response-body eval_script.js - -^https:\/\/commerce-i18n-api\.faceu\.mobi\/commerce\/v1\/subscription\/user_info$ url script-response-body eval_script.js - -^https:\/\/api\.global\.mp3\.zing\.vn\/1\.0\/getUserInfo\?data=* url script-response-body eval_script.js - -^https:\/\/api\.blinkist\.com\/v4\/(me$|me.json$|me\/access$) url script-response-body eval_script.js - -^https:\/\/api\.sololearn\.com\/(Profile\/GetProfile$|authenticateDevice$) url script-response-body eval_script.js - -^https:\/\/api-kinemaster-assetstore\.(nexstreaming|kinemasters)\.com\/.*\/product\/verifyReceipt$ url script-response-body eval_script.js - -^https:\/\/api\.pushover\.net\/1\/messages\.json* url script-response-body eval_script.js - -^https:\/\/api\.overhq\.com\/(user\/token\/refresh$|subscription\/verifyReceipt$) url script-response-body eval_script.js - -^https:\/\/receipt-validator\.herewetest\.com\/apple\/verifyTransaction$ url script-response-body eval_script.js - -^https:\/\/license\.pdfexpert\.com\/api\/.*\/documents\/subscription\/(refresh$|check$) url script-response-body eval_script.js - -^https:\/\/education\.github\.com\/api\/user$ url script-response-body eval_script.js - -^https:\/\/backend\.getdrafts\.com\/api\/.*\/verification* url script-response-body eval_script.js - -^https:\/\/lcs-mobile-cops\.adobe\.io\/mobile_profile url script-response-body eval_script.js - -^https:\/\/ssl-api\.itranslateapp\.com\/.*\/subscriptions\/.*\/ios$ url script-response-body eval_script.js - -^https:\/\/sk\.ulysses\.app\/api\/v1\/itunes_receipt_verify$ url script-response-body eval_script.js - -^https:\/\/dayone\.me\/api\/(users|v2\/users\/account-status)$ url script-response-body eval_script.js - -^https:\/\/api-production\.endel\.io\/.*\/user$ url script-response-body eval_script.js - -^https:\/\/api\.shred\.app\/verifyReceipt$ url script-response-body eval_script.js - -^https:\/\/subscription\.grammarly\.com\/api\/v1$ url script-response-body eval_script.js - -^https:\/\/planner5d\.com\/api\/sets url script-response-body eval_script.js - -^https:\/\/secure\.istreamer\.com\/backend$ url script-response-body eval_script.js - -^https:\/\/www\.api\.monkeyuni\.net\/api\/.+\/mobile\/account\/load-update url script-response-body eval_script.js - -^https:\/\/api\.textnow\.me\/api2.0\/users\/.* url script-response-body eval_script.js - -^https:\/\/vipapi\.jxedt\.com\/vip\/check url script-response-body eval_script.js - -^https:\/\/api\.interpreter\.caiyunai\.com\/v1\/user url script-response-body eval_script.js - -^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt url script-response-body eval_script.js - -^https:\/\/pocketlists\.com\/api\/v1\/pocketlists.me.get url script-response-body eval_script.js - -https:\/\/book\.haitunwallet\.com\/app\/vip\/status url script-response-body eval_script.js - -https:\/\/mubu\.com\/api\/app\/user\/info url script-response-body eval_script.js - -^https:\/\/app\.xunjiepdf\.com\/api\/v4\/virtualactregister url script-response-body eval_script.js - -http:\/\/miaow\.yiyongcad\.com\/api\/v4\/memprofile url script-response-body eval_script.js - -https:\/\/api\.lennou\.com\/user\/info url script-response-body eval_script.js - -^https:\/\/api\.gkocr\.com\/api\/userlogin1.php url script-response-body eval_script.js - -^https?:\/\/vira\.llsapp\.com\/api\/v2\/readings\/(accessible|limitation) url script-response-body eval_script.js - -^https:\/\/api\.rr\.tv(\/user\/privilege\/list|\/ad\/getAll|\/rrtv-video\/v4plus\/season\/detail) url script-response-body eval_script.js - -^https?:\/\/pan\.baidu\.com\/s\/ url script-response-body eval_script.js - -^https:\/\/api\.revenuecat\.com\/v1\/(receipts|\d{1,})$ url script-response-body eval_script.js - -https://(commerce-.*api|pay).(faceu|wecut).(com|mobi)/(commerce|apple)/(iosAppVerifyReceipt.php|v1/subscription/user_info) url script-response-body eval_script.js - -^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/theme) url script-response-body eval_script.js - -^http:\/\/115\.com\/lx.*$ url script-response-body eval_script.js - -^https:\/\/api\.lakecoloring\.com\/v1\/receipt url script-response-body eval_script.js - -^http://ctrl.playcvn.com/app/(init|ads) url script-response-body eval_script.js - -^https:\/\/dict\.eudic\.net\/jingting\/GetThisChapterTaskStatus? url script-response-body eval_script.js - -^https?://m.client.10010.com/uniAdmsInterface/getHomePageAd url script-response-body eval_script.js - -^https:\/\/api\.wakamoment\.ga\/init\?platform\=ios url script-response-body eval_script.js - -^https:\/\/api\.diyidan\.net\/v0\.3\/(user\/personal_homepage|vip_user\/info|tv_series\/index\?appChanne) url script-response-body eval_script.js - -^https:\/\/api\.flexibits\.com\/v1\/(auth|account)\/(device|details|appstore-receipt)\/$ url script-response-body eval_script.js - -https?:\/\/api\.jiaonizuocai\.com url script-response-body eval_script.js - -https:\/\/api\.sololearn\.com\/(authenticateDevice|challenge\/GetContestFeed|Profile\/GetProfile)$ url script-response-body eval_script.js - -^https://tncj.hortorgames.com/chicken/fight/(answer|findQuiz) url script-response-body eval_script.js - -^https:\/\/(www\.baidu.com2\.club|ayk\.tmdidi\.com|m\.pearkin\.com|souhu\.mett\.me|bkcd\.b-cdn\.net)\/(api\/movie\/WatchMovie|api\/Account\/CheckVip|api\/account\/IndexDetail) url script-response-body eval_script.js - -^https:\/\/claritywallpaper\.com\/clarity\/api\/(userInfo|special\/queryByCatalogAll) url script-response-body eval_script.js - -https:\/\/bookapi\.ihuman\.com\/(v1\/get\_user\_info|v1\/get\_purchase\_list) url script-response-body eval_script.js - -http:\/\/rest\.zhibo\.tv\/room\/get\-room\-info\-v430 url script-response-body eval_script.js - -https://note.youdao.com/yws/(mapi/payment|api/self) url script-response-body eval_script.js - -^https:\/\/billing\.peakcloud\.org\/billing\/2\/user\/me? url script-response-body eval_script.js - -^https?:\/\/api\.ithome\.com\/json\/slide\/index url script-response-body eval_script.js - -^https?:\/\/api\.ithome\.com\/json\/(newslist|listpage)\/news url script-response-body eval_script.js - -https:\/\/www\.xmind\.cn\/\_res\/devices url script-response-body eval_script.js - -^http?:\/\/.*\.arten.cn/login/login url script-response-body eval_script.js - -^https://api.weiqire.com/api3/(visitor/|user/unlockCharpter) url script-response-body eval_script.js - -https://api.shimo.im/users/ url script-response-body eval_script.js - -^https?:\/\/.*\.videostarapp\.com\/scripts\/subsNew\.php url script-response-body eval_script.js - -https:\/\/api\.revenuecat\.com\/v1\/(subscribers|receipts) url script-response-body eval_script.js - -https://app.api.versa-ai.com/pay/order/iap/check url script-response-body eval_script.js - -^https\:\/\/hjapi\.bjxkhc\.com\/v2d2\/users\/.*\/member url script-response-body eval_script.js - -http:\/\/api\.591master\.com\:8081\/(1.0|3.6.8)\/ui(forum|common)\/(downloadwallpaper|getuser) url script-response-body eval_script.js - -^http\:\/\/jdytv\.cn\/login\/login\/veifys url script-response-body eval_script.js - -http://user.shywck.com/user/userinfo url script-response-body eval_script.js - -^https?:\/\/.*\.xunjie.*\.com\/api\/v\d\/* url script-response-body eval_script.js - -^https:\/\/api\.psy-1\.com\/cosleep\/user\/info url script-response-body eval_script.js - -^https:\/\/snailsleep\.net\/snail\/v1\/profile\/get url script-response-body eval_script.js - -^https:\/\/mob2015\.kekenet\.com\/keke\/mobile\/index\.php url script-response-body eval_script.js - -^https:\/\/m\.samh\.xndm\.tech\/userapi\/info\/v1\/getuserinfo url script-response-body eval_script.js - -^http\:\/\/app\.flashdown365\.com\/ios\/login url script-response-body eval_script.js - -^https:\/\/avoscloud\.com\/1\.1\/users\/ url script-response-body eval_script.js - -^https\:\/\/api\.gao1gps\.cn\/v1\/user\/info url script-response-body eval_script.js - -^https:\/\/api\.meiyan\.com\/iap\/verify\.json url script-response-body eval_script.js - -^https:\/\/bea\.sportq\.com\/SFitWeb\/sfit\/getUserBaseInfo url script-response-body eval_script.js - -^https://8.8.8.8/api url script-request-body eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js -^https://8.8.8.8/(home|app|log\/) url script-response-body eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js @@ -324,8 +10,6 @@ http://user.shywck.com/user/userinfo url script-response-body eval_script.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath url script-response-body eval_script.js \ No newline at end of file +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file From 16e97a89c760bc9b9486cf7f451c322537d3d2b1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 11 Jun 2020 16:34:41 +0800 Subject: [PATCH 0982/1191] update --- eval_script/sg_script.sgmodule | 326 +-------------------------------- 1 file changed, 5 insertions(+), 321 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index a5a3b3307..39b0e6ebe 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -1,326 +1,12 @@ #!name=eval_script.js module [MITM] -hostname = %INSERT% 8.8.8.8,bea.sportq.com,api.meiyan.com,api.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,api.m.jd.com,ios.prod.ftl.netflix.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me +hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] -eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/moments/recommend,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/topstory/recommend,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://api.zhihu.com/v4/questions,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/people/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/market/header,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/space\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/resource/show/tab\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/feed/index\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/view\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://api.bilibili.com/x/v2/reply/main\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://api.live.bilibili.com/xlive/app-room/v1/index/getInfoByRoom\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/aweme\/post\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/feed\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/follow\/feed\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/nearby\/feed\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/search\/item\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/general\/search\/single\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/hot\/search\/video\/list\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/.*\/getGlobalData,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http(s)://api.bjxkhc.com/index.php/app/ios/(vod/show|(user|vod|topic|type)/index),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/getuserinfo\.321mh\.com\/app_api\/v5\/getuserinfo\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://getuserinfo-globalapi.zymk.cn/app_api/v5/(getuserinfo|coin_account|getuserinfo_ticket|getcomicinfo)/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/ap(p|i)\.bilibili\.com\/((pgc\/player\/api\/playurl)|(x\/v2\/account\/myinfo\?)|(x\/v2\/account/mine\?)),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vsco\.co\/api\/subscriptions\/2.1\/user-subscriptions\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.vnision\.com\/v1\/(users\/|banners),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.+\.(my10api|(.*91.*))\.(com|tips|app|xyz)(:\d{2,5})?\/api.php$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://sp\.kaola\.com/api/openad$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://r\.inews\.qq.com\/get(QQNewsUnreadList|RecommendList),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.(lago|fuli|xiang(jiao|xiang))apps\.com\/(ucp\/index|getGlobalData|.+\/reqplay\/),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/(i|newdrugs)\.dxy\.cn\/(snsapi\/username\/|app\/user\/(pro\/stat\?|init\?timestamp=)),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/(.+)\.(\w{2,3})(:?\d*)\/(api\/public\/\?service=Live\.checkLive$|public\/\/\?service=Live\.roomCharge$|lg\/video\/loadVideoFees\.do$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.luqijianggushi\.com\/api\/v2\/user\/get,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://account.wps.*/api/users/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gyrosco\.pe\/v1\/account\/$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api1\.dobenge\.cn\/api\/user\/getuserinfo,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.mvmtv\.com\/index\.php.*(c=user.*a=info|a=addr.*vid=.*),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.termius\.com\/api\/v3\/bulk\/account\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/viva\.v21xy\.com\/api\/rest\/u\/vip,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/biz\.caiyunapp\.com\/v2\/user\?app_name\=weather,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gotokeep\.com\/(.+\/subject|.+\/dynamic),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\?,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/mp\.bybutter\.com\/mood\/(official-templates|privileges),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/splice\.oracle\.\w+\.com\/devices\/me,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/pan\.baidu\.com\/rest\/2\.0\/membership\/user,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://.*\.snssdk\.com/bds/(feed/stream|comment/cell_reply|cell/cell_comment|cell/detail|ward/list|user/favorite|user/cell_coment|user/cell_userfeed|user/publish_list),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/viva-asia1\.vvbrd\.com\/api\/rest\/u\/vip*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.unfold\.app\/v1\/ios\/receipts$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/graph\.nhaccuatui\.com\/.*\/users\/info*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.memrise\.com\/.+\/(me\/$|dashboard\/$|leaderboards\/following\/),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.sync\.me\/api\/purchases\/(report_purchases|get_purchases),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/pool\.elsanow\.io\/user\/api\/v1\/purchase$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/lambda\.us-east-1\.amazonaws\.com/.*/functions\/prod-4-syncPurchases\/invocations$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.mondlylanguages\.com\/v1\/ios\/user\/sync$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.busuu\.com\/users\/me*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/owa\.videoshowiosglobalserver\.com\/.*\/iosPayClient,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/accounts\.elevateapp\.net\/api\/users\?user%5Bauthentication_token*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-intl\.mr\.meitu\.com/.*/subs_offer_elg$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/bmall\.camera360\.com\/api\/(iap\/check-receipt$|mix\/getinfo$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.tv\.zing\.vn\/.*/user*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.calm\.com\/me$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/photos\.adobe\.io\/v2\/accounts*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/license\.pdfexpert\.com\/api\/1\.0\/pdfexpert6\/subscription\/(refresh$|check$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/subs\.platforms\.team\/.+\/apple\/verify$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/apic\.musixmatch\.com\/ws\/.*\/config\.get,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.getmimo\.com\/v1\/subscriptions$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.revenuecat\.com\/.+\/(receipts$|subscribers\/[a-zA-Z0-9_-]*$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.lingokids\.com\/v1\/renovate_session$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.peacefulsoundsapp\.com\/api\/v1\/init$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/duolingo-leaderboards-prod\.duolingo\.com\/leaderboards*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/commerce-i18n-api\.faceu\.mobi\/commerce\/v1\/subscription\/user_info$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.global\.mp3\.zing\.vn\/1\.0\/getUserInfo\?data=*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.blinkist\.com\/v4\/(me$|me.json$|me\/access$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.sololearn\.com\/(Profile\/GetProfile$|authenticateDevice$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-kinemaster-assetstore\.(nexstreaming|kinemasters)\.com\/.*\/product\/verifyReceipt$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.pushover\.net\/1\/messages\.json*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.overhq\.com\/(user\/token\/refresh$|subscription\/verifyReceipt$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/receipt-validator\.herewetest\.com\/apple\/verifyTransaction$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/license\.pdfexpert\.com\/api\/.*\/documents\/subscription\/(refresh$|check$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/education\.github\.com\/api\/user$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/backend\.getdrafts\.com\/api\/.*\/verification*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/lcs-mobile-cops\.adobe\.io\/mobile_profile,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/ssl-api\.itranslateapp\.com\/.*\/subscriptions\/.*\/ios$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/sk\.ulysses\.app\/api\/v1\/itunes_receipt_verify$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/dayone\.me\/api\/(users|v2\/users\/account-status)$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-production\.endel\.io\/.*\/user$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.shred\.app\/verifyReceipt$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/subscription\.grammarly\.com\/api\/v1$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/planner5d\.com\/api\/sets,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/secure\.istreamer\.com\/backend$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.api\.monkeyuni\.net\/api\/.+\/mobile\/account\/load-update,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.textnow\.me\/api2.0\/users\/.*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/vipapi\.jxedt\.com\/vip\/check,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.interpreter\.caiyunai\.com\/v1\/user,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/pocketlists\.com\/api\/v1\/pocketlists.me.get,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/book\.haitunwallet\.com\/app\/vip\/status,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/mubu\.com\/api\/app\/user\/info,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/app\.xunjiepdf\.com\/api\/v4\/virtualactregister,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/miaow\.yiyongcad\.com\/api\/v4\/memprofile,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.lennou\.com\/user\/info,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gkocr\.com\/api\/userlogin1.php,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vira\.llsapp\.com\/api\/v2\/readings\/(accessible|limitation),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.rr\.tv(\/user\/privilege\/list|\/ad\/getAll|\/rrtv-video\/v4plus\/season\/detail),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/pan\.baidu\.com\/s\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.revenuecat\.com\/v1\/(receipts|\d{1,})$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://(commerce-.*api|pay).(faceu|wecut).(com|mobi)/(commerce|apple)/(iosAppVerifyReceipt.php|v1/subscription/user_info),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/theme),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http:\/\/115\.com\/lx.*$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.lakecoloring\.com\/v1\/receipt,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http://ctrl.playcvn.com/app/(init|ads),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/dict\.eudic\.net\/jingting\/GetThisChapterTaskStatus?,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m.client.10010.com/uniAdmsInterface/getHomePageAd,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.wakamoment\.ga\/init\?platform\=ios,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.diyidan\.net\/v0\.3\/(user\/personal_homepage|vip_user\/info|tv_series\/index\?appChanne),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.flexibits\.com\/v1\/(auth|account)\/(device|details|appstore-receipt)\/$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https?:\/\/api\.jiaonizuocai\.com,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.sololearn\.com\/(authenticateDevice|challenge\/GetContestFeed|Profile\/GetProfile)$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://tncj.hortorgames.com/chicken/fight/(answer|findQuiz),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/(www\.baidu.com2\.club|ayk\.tmdidi\.com|m\.pearkin\.com|souhu\.mett\.me|bkcd\.b-cdn\.net)\/(api\/movie\/WatchMovie|api\/Account\/CheckVip|api\/account\/IndexDetail),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/claritywallpaper\.com\/clarity\/api\/(userInfo|special\/queryByCatalogAll),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/bookapi\.ihuman\.com\/(v1\/get\_user\_info|v1\/get\_purchase\_list),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/rest\.zhibo\.tv\/room\/get\-room\-info\-v430,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://note.youdao.com/yws/(mapi/payment|api/self),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/billing\.peakcloud\.org\/billing\/2\/user\/me?,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.ithome\.com\/json\/slide\/index,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.ithome\.com\/json\/(newslist|listpage)\/news,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/www\.xmind\.cn\/\_res\/devices,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http?:\/\/.*\.arten.cn/login/login,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://api.weiqire.com/api3/(visitor/|user/unlockCharpter),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://api.shimo.im/users/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.videostarapp\.com\/scripts\/subsNew\.php,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.revenuecat\.com\/v1\/(subscribers|receipts),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://app.api.versa-ai.com/pay/order/iap/check,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https\:\/\/hjapi\.bjxkhc\.com\/v2d2\/users\/.*\/member,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/api\.591master\.com\:8081\/(1.0|3.6.8)\/ui(forum|common)\/(downloadwallpaper|getuser),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http\:\/\/jdytv\.cn\/login\/login\/veifys,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=http://user.shywck.com/user/userinfo,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.xunjie.*\.com\/api\/v\d\/*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.psy-1\.com\/cosleep\/user\/info,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/snailsleep\.net\/snail\/v1\/profile\/get,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/mob2015\.kekenet\.com\/keke\/mobile\/index\.php,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/m\.samh\.xndm\.tech\/userapi\/info\/v1\/getuserinfo,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http\:\/\/app\.flashdown365\.com\/ios\/login,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/avoscloud\.com\/1\.1\/users\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https\:\/\/api\.gao1gps\.cn\/v1\/user\/info,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.meiyan\.com\/iap\/verify\.json,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/bea\.sportq\.com\/SFitWeb\/sfit\/getUserBaseInfo,script-path=eval_script.js - -eval_script.js = type=http-request,requires-body=1,pattern=^https://8.8.8.8/api,script-path=eval_script.js +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https://8.8.8.8/(home|app|log\/),script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js @@ -328,8 +14,6 @@ eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobil eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js -eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,script-path=eval_script.js \ No newline at end of file +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From d00265913e2cd3fac536ed34c088b0b509c7b5df Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 11 Jun 2020 16:39:15 +0800 Subject: [PATCH 0983/1191] update --- eval_script/qx_script.txt | 326 +++++++++++++++++++++++++++++++++++++- 1 file changed, 321 insertions(+), 5 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index a7bec5f8e..3c931bc63 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -1,8 +1,322 @@ -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +hostname = 8.8.8.8,bea.sportq.com,api.meiyan.com,api.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,api.m.jd.com,ios.prod.ftl.netflix.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js + +^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad url script-response-body eval_script.js + +^https://api.zhihu.com/moments/recommend url script-response-body eval_script.js + +^https://api.zhihu.com/topstory/recommend url script-response-body eval_script.js + +https://api.zhihu.com/v4/questions url script-response-body eval_script.js + +^https://api.zhihu.com/people/ url script-response-body eval_script.js + +^https://api.zhihu.com/market/header url script-response-body eval_script.js + +https://app.bilibili.com/x/v2/space\?access_key url script-response-body eval_script.js + +https://app.bilibili.com/x/resource/show/tab\?access_key url script-response-body eval_script.js + +https://app.bilibili.com/x/v2/feed/index\?access_key url script-response-body eval_script.js + +https://app.bilibili.com/x/v2/view\?access_key url script-response-body eval_script.js + +https://api.bilibili.com/x/v2/reply/main\?access_key url script-response-body eval_script.js + +https://api.live.bilibili.com/xlive/app-room/v1/index/getInfoByRoom\?access_key url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/aweme\/post\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/feed\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/follow\/feed\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/nearby\/feed\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/search\/item\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/general\/search\/single\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/hot\/search\/video\/list\/ url script-response-body eval_script.js + +^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice) url script-response-body eval_script.js + +https:\/\/.*\/getGlobalData url script-response-body eval_script.js + +^http(s)://api.bjxkhc.com/index.php/app/ios/(vod/show|(user|vod|topic|type)/index) url script-response-body eval_script.js + +^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json url script-response-body eval_script.js + +^https?:\/\/getuserinfo\.321mh\.com\/app_api\/v5\/getuserinfo\/ url script-response-body eval_script.js + +^https://getuserinfo-globalapi.zymk.cn/app_api/v5/(getuserinfo|coin_account|getuserinfo_ticket|getcomicinfo)/ url script-response-body eval_script.js + +https:\/\/ap(p|i)\.bilibili\.com\/((pgc\/player\/api\/playurl)|(x\/v2\/account\/myinfo\?)|(x\/v2\/account/mine\?)) url script-response-body eval_script.js + +^https?:\/\/vsco\.co\/api\/subscriptions\/2.1\/user-subscriptions\/ url script-response-body eval_script.js + +^https?:\/\/api\.vnision\.com\/v1\/(users\/|banners) url script-response-body eval_script.js + +^https?:\/\/.+\.(my10api|(.*91.*))\.(com|tips|app|xyz)(:\d{2,5})?\/api.php$ url script-response-body eval_script.js + +^https://sp\.kaola\.com/api/openad$ url script-response-body eval_script.js + +^https://r\.inews\.qq.com\/get(QQNewsUnreadList|RecommendList) url script-response-body eval_script.js + +^https?:\/\/.*\.(lago|fuli|xiang(jiao|xiang))apps\.com\/(ucp\/index|getGlobalData|.+\/reqplay\/) url script-response-body eval_script.js + +^https?:\/\/(i|newdrugs)\.dxy\.cn\/(snsapi\/username\/|app\/user\/(pro\/stat\?|init\?timestamp=)) url script-response-body eval_script.js + +^https?:\/\/(.+)\.(\w{2,3})(:?\d*)\/(api\/public\/\?service=Live\.checkLive$|public\/\/\?service=Live\.roomCharge$|lg\/video\/loadVideoFees\.do$) url script-response-body eval_script.js + +^https:\/\/www\.luqijianggushi\.com\/api\/v2\/user\/get url script-response-body eval_script.js + +^https://account.wps.*/api/users/ url script-response-body eval_script.js + +^https:\/\/api\.gyrosco\.pe\/v1\/account\/$ url script-response-body eval_script.js + +^https:\/\/api1\.dobenge\.cn\/api\/user\/getuserinfo url script-response-body eval_script.js + +^https:\/\/api\.mvmtv\.com\/index\.php.*(c=user.*a=info|a=addr.*vid=.*) url script-response-body eval_script.js + +^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user url script-response-body eval_script.js + +https:\/\/api\.termius\.com\/api\/v3\/bulk\/account\/ url script-response-body eval_script.js + +^https:\/\/viva\.v21xy\.com\/api\/rest\/u\/vip url script-response-body eval_script.js + +^https:\/\/biz\.caiyunapp\.com\/v2\/user\?app_name\=weather url script-response-body eval_script.js + +^https:\/\/api\.gotokeep\.com\/(.+\/subject|.+\/dynamic) url script-response-body eval_script.js + +^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\? url script-response-body eval_script.js + +^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) url script-response-body eval_script.js + +^https?:\/\/mp\.bybutter\.com\/mood\/(official-templates|privileges) url script-response-body eval_script.js + +^https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json url script-response-body eval_script.js + +^https:\/\/splice\.oracle\.\w+\.com\/devices\/me url script-response-body eval_script.js + +https:\/\/pan\.baidu\.com\/rest\/2\.0\/membership\/user url script-response-body eval_script.js + +^https?://.*\.snssdk\.com/bds/(feed/stream|comment/cell_reply|cell/cell_comment|cell/detail|ward/list|user/favorite|user/cell_coment|user/cell_userfeed|user/publish_list) url script-response-body eval_script.js + +^https:\/\/viva-asia1\.vvbrd\.com\/api\/rest\/u\/vip* url script-response-body eval_script.js + +^https:\/\/api\.unfold\.app\/v1\/ios\/receipts$ url script-response-body eval_script.js + +^https:\/\/graph\.nhaccuatui\.com\/.*\/users\/info* url script-response-body eval_script.js + +^https:\/\/api\.memrise\.com\/.+\/(me\/$|dashboard\/$|leaderboards\/following\/) url script-response-body eval_script.js + +^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user$ url script-response-body eval_script.js + +^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt$ url script-response-body eval_script.js + +^https:\/\/api\.sync\.me\/api\/purchases\/(report_purchases|get_purchases) url script-response-body eval_script.js + +^https:\/\/pool\.elsanow\.io\/user\/api\/v1\/purchase$ url script-response-body eval_script.js + +^https:\/\/lambda\.us-east-1\.amazonaws\.com/.*/functions\/prod-4-syncPurchases\/invocations$ url script-response-body eval_script.js + +^https:\/\/api\.mondlylanguages\.com\/v1\/ios\/user\/sync$ url script-response-body eval_script.js + +^https:\/\/api\.busuu\.com\/users\/me* url script-response-body eval_script.js + +^https:\/\/owa\.videoshowiosglobalserver\.com\/.*\/iosPayClient url script-response-body eval_script.js + +^https:\/\/accounts\.elevateapp\.net\/api\/users\?user%5Bauthentication_token* url script-response-body eval_script.js + +^https:\/\/api-intl\.mr\.meitu\.com/.*/subs_offer_elg$ url script-response-body eval_script.js + +^https:\/\/bmall\.camera360\.com\/api\/(iap\/check-receipt$|mix\/getinfo$) url script-response-body eval_script.js + +^https?:\/\/api\.tv\.zing\.vn\/.*/user* url script-response-body eval_script.js + +^https:\/\/api\.calm\.com\/me$ url script-response-body eval_script.js + +^https:\/\/photos\.adobe\.io\/v2\/accounts* url script-response-body eval_script.js + +^https:\/\/license\.pdfexpert\.com\/api\/1\.0\/pdfexpert6\/subscription\/(refresh$|check$) url script-response-body eval_script.js + +^https:\/\/subs\.platforms\.team\/.+\/apple\/verify$ url script-response-body eval_script.js + +^https:\/\/apic\.musixmatch\.com\/ws\/.*\/config\.get url script-response-body eval_script.js + +^https:\/\/api\.getmimo\.com\/v1\/subscriptions$ url script-response-body eval_script.js + +^https:\/\/api\.revenuecat\.com\/.+\/(receipts$|subscribers\/[a-zA-Z0-9_-]*$) url script-response-body eval_script.js + +^https:\/\/api\.lingokids\.com\/v1\/renovate_session$ url script-response-body eval_script.js + +^https:\/\/www\.peacefulsoundsapp\.com\/api\/v1\/init$ url script-response-body eval_script.js + +^https:\/\/duolingo-leaderboards-prod\.duolingo\.com\/leaderboards* url script-response-body eval_script.js + +^https:\/\/commerce-i18n-api\.faceu\.mobi\/commerce\/v1\/subscription\/user_info$ url script-response-body eval_script.js + +^https:\/\/api\.global\.mp3\.zing\.vn\/1\.0\/getUserInfo\?data=* url script-response-body eval_script.js + +^https:\/\/api\.blinkist\.com\/v4\/(me$|me.json$|me\/access$) url script-response-body eval_script.js + +^https:\/\/api\.sololearn\.com\/(Profile\/GetProfile$|authenticateDevice$) url script-response-body eval_script.js + +^https:\/\/api-kinemaster-assetstore\.(nexstreaming|kinemasters)\.com\/.*\/product\/verifyReceipt$ url script-response-body eval_script.js + +^https:\/\/api\.pushover\.net\/1\/messages\.json* url script-response-body eval_script.js + +^https:\/\/api\.overhq\.com\/(user\/token\/refresh$|subscription\/verifyReceipt$) url script-response-body eval_script.js + +^https:\/\/receipt-validator\.herewetest\.com\/apple\/verifyTransaction$ url script-response-body eval_script.js + +^https:\/\/license\.pdfexpert\.com\/api\/.*\/documents\/subscription\/(refresh$|check$) url script-response-body eval_script.js + +^https:\/\/education\.github\.com\/api\/user$ url script-response-body eval_script.js + +^https:\/\/backend\.getdrafts\.com\/api\/.*\/verification* url script-response-body eval_script.js + +^https:\/\/lcs-mobile-cops\.adobe\.io\/mobile_profile url script-response-body eval_script.js + +^https:\/\/ssl-api\.itranslateapp\.com\/.*\/subscriptions\/.*\/ios$ url script-response-body eval_script.js + +^https:\/\/sk\.ulysses\.app\/api\/v1\/itunes_receipt_verify$ url script-response-body eval_script.js + +^https:\/\/dayone\.me\/api\/(users|v2\/users\/account-status)$ url script-response-body eval_script.js + +^https:\/\/api-production\.endel\.io\/.*\/user$ url script-response-body eval_script.js + +^https:\/\/api\.shred\.app\/verifyReceipt$ url script-response-body eval_script.js + +^https:\/\/subscription\.grammarly\.com\/api\/v1$ url script-response-body eval_script.js + +^https:\/\/planner5d\.com\/api\/sets url script-response-body eval_script.js + +^https:\/\/secure\.istreamer\.com\/backend$ url script-response-body eval_script.js + +^https:\/\/www\.api\.monkeyuni\.net\/api\/.+\/mobile\/account\/load-update url script-response-body eval_script.js + +^https:\/\/api\.textnow\.me\/api2.0\/users\/.* url script-response-body eval_script.js + +^https:\/\/vipapi\.jxedt\.com\/vip\/check url script-response-body eval_script.js + +^https:\/\/api\.interpreter\.caiyunai\.com\/v1\/user url script-response-body eval_script.js + +^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt url script-response-body eval_script.js + +^https:\/\/pocketlists\.com\/api\/v1\/pocketlists.me.get url script-response-body eval_script.js + +https:\/\/book\.haitunwallet\.com\/app\/vip\/status url script-response-body eval_script.js + +https:\/\/mubu\.com\/api\/app\/user\/info url script-response-body eval_script.js + +^https:\/\/app\.xunjiepdf\.com\/api\/v4\/virtualactregister url script-response-body eval_script.js + +http:\/\/miaow\.yiyongcad\.com\/api\/v4\/memprofile url script-response-body eval_script.js + +https:\/\/api\.lennou\.com\/user\/info url script-response-body eval_script.js + +^https:\/\/api\.gkocr\.com\/api\/userlogin1.php url script-response-body eval_script.js + +^https?:\/\/vira\.llsapp\.com\/api\/v2\/readings\/(accessible|limitation) url script-response-body eval_script.js + +^https:\/\/api\.rr\.tv(\/user\/privilege\/list|\/ad\/getAll|\/rrtv-video\/v4plus\/season\/detail) url script-response-body eval_script.js + +^https?:\/\/pan\.baidu\.com\/s\/ url script-response-body eval_script.js + +^https:\/\/api\.revenuecat\.com\/v1\/(receipts|\d{1,})$ url script-response-body eval_script.js + +https://(commerce-.*api|pay).(faceu|wecut).(com|mobi)/(commerce|apple)/(iosAppVerifyReceipt.php|v1/subscription/user_info) url script-response-body eval_script.js + +^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/theme) url script-response-body eval_script.js + +^http:\/\/115\.com\/lx.*$ url script-response-body eval_script.js + +^https:\/\/api\.lakecoloring\.com\/v1\/receipt url script-response-body eval_script.js + +^http://ctrl.playcvn.com/app/(init|ads) url script-response-body eval_script.js + +^https:\/\/dict\.eudic\.net\/jingting\/GetThisChapterTaskStatus? url script-response-body eval_script.js + +^https?://m.client.10010.com/uniAdmsInterface/getHomePageAd url script-response-body eval_script.js + +^https:\/\/api\.wakamoment\.ga\/init\?platform\=ios url script-response-body eval_script.js + +^https:\/\/api\.diyidan\.net\/v0\.3\/(user\/personal_homepage|vip_user\/info|tv_series\/index\?appChanne) url script-response-body eval_script.js + +^https:\/\/api\.flexibits\.com\/v1\/(auth|account)\/(device|details|appstore-receipt)\/$ url script-response-body eval_script.js + +https?:\/\/api\.jiaonizuocai\.com url script-response-body eval_script.js + +https:\/\/api\.sololearn\.com\/(authenticateDevice|challenge\/GetContestFeed|Profile\/GetProfile)$ url script-response-body eval_script.js + +^https://tncj.hortorgames.com/chicken/fight/(answer|findQuiz) url script-response-body eval_script.js + +^https:\/\/(www\.baidu.com2\.club|ayk\.tmdidi\.com|m\.pearkin\.com|souhu\.mett\.me|bkcd\.b-cdn\.net)\/(api\/movie\/WatchMovie|api\/Account\/CheckVip|api\/account\/IndexDetail) url script-response-body eval_script.js + +^https:\/\/claritywallpaper\.com\/clarity\/api\/(userInfo|special\/queryByCatalogAll) url script-response-body eval_script.js + +https:\/\/bookapi\.ihuman\.com\/(v1\/get\_user\_info|v1\/get\_purchase\_list) url script-response-body eval_script.js + +http:\/\/rest\.zhibo\.tv\/room\/get\-room\-info\-v430 url script-response-body eval_script.js + +https://note.youdao.com/yws/(mapi/payment|api/self) url script-response-body eval_script.js + +^https:\/\/billing\.peakcloud\.org\/billing\/2\/user\/me? url script-response-body eval_script.js + +^https?:\/\/api\.ithome\.com\/json\/slide\/index url script-response-body eval_script.js + +^https?:\/\/api\.ithome\.com\/json\/(newslist|listpage)\/news url script-response-body eval_script.js + +https:\/\/www\.xmind\.cn\/\_res\/devices url script-response-body eval_script.js + +^http?:\/\/.*\.arten.cn/login/login url script-response-body eval_script.js + +^https://api.weiqire.com/api3/(visitor/|user/unlockCharpter) url script-response-body eval_script.js + +https://api.shimo.im/users/ url script-response-body eval_script.js + +^https?:\/\/.*\.videostarapp\.com\/scripts\/subsNew\.php url script-response-body eval_script.js + +https:\/\/api\.revenuecat\.com\/v1\/(subscribers|receipts) url script-response-body eval_script.js + +https://app.api.versa-ai.com/pay/order/iap/check url script-response-body eval_script.js + +^https\:\/\/hjapi\.bjxkhc\.com\/v2d2\/users\/.*\/member url script-response-body eval_script.js + +http:\/\/api\.591master\.com\:8081\/(1.0|3.6.8)\/ui(forum|common)\/(downloadwallpaper|getuser) url script-response-body eval_script.js + +^http\:\/\/jdytv\.cn\/login\/login\/veifys url script-response-body eval_script.js + +http://user.shywck.com/user/userinfo url script-response-body eval_script.js + +^https?:\/\/.*\.xunjie.*\.com\/api\/v\d\/* url script-response-body eval_script.js + +^https:\/\/api\.psy-1\.com\/cosleep\/user\/info url script-response-body eval_script.js + +^https:\/\/snailsleep\.net\/snail\/v1\/profile\/get url script-response-body eval_script.js + +^https:\/\/mob2015\.kekenet\.com\/keke\/mobile\/index\.php url script-response-body eval_script.js + +^https:\/\/m\.samh\.xndm\.tech\/userapi\/info\/v1\/getuserinfo url script-response-body eval_script.js + +^http\:\/\/app\.flashdown365\.com\/ios\/login url script-response-body eval_script.js + +^https:\/\/avoscloud\.com\/1\.1\/users\/ url script-response-body eval_script.js + +^https\:\/\/api\.gao1gps\.cn\/v1\/user\/info url script-response-body eval_script.js + +^https:\/\/api\.meiyan\.com\/iap\/verify\.json url script-response-body eval_script.js + +^https:\/\/bea\.sportq\.com\/SFitWeb\/sfit\/getUserBaseInfo url script-response-body eval_script.js + +^https://8.8.8.8/api url script-request-body eval_script.js + +^https://8.8.8.8/(home|app|log\/) url script-response-body eval_script.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js @@ -10,6 +324,8 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,ap ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file +^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath url script-response-body eval_script.js \ No newline at end of file From a20045416fac806321c7bbf83ce2d8d6891e012d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 11 Jun 2020 16:39:19 +0800 Subject: [PATCH 0984/1191] update --- eval_script/sg_script.sgmodule | 326 ++++++++++++++++++++++++++++++++- 1 file changed, 321 insertions(+), 5 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index 39b0e6ebe..a5a3b3307 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -1,12 +1,326 @@ #!name=eval_script.js module [MITM] -hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +hostname = %INSERT% 8.8.8.8,bea.sportq.com,api.meiyan.com,api.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,api.m.jd.com,ios.prod.ftl.netflix.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me [Script] -eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/moments/recommend,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/topstory/recommend,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://api.zhihu.com/v4/questions,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/people/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/market/header,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/space\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/resource/show/tab\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/feed/index\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/view\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://api.bilibili.com/x/v2/reply/main\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://api.live.bilibili.com/xlive/app-room/v1/index/getInfoByRoom\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/aweme\/post\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/feed\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/follow\/feed\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/nearby\/feed\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/search\/item\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/general\/search\/single\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/hot\/search\/video\/list\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/.*\/getGlobalData,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http(s)://api.bjxkhc.com/index.php/app/ios/(vod/show|(user|vod|topic|type)/index),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/getuserinfo\.321mh\.com\/app_api\/v5\/getuserinfo\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://getuserinfo-globalapi.zymk.cn/app_api/v5/(getuserinfo|coin_account|getuserinfo_ticket|getcomicinfo)/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/ap(p|i)\.bilibili\.com\/((pgc\/player\/api\/playurl)|(x\/v2\/account\/myinfo\?)|(x\/v2\/account/mine\?)),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vsco\.co\/api\/subscriptions\/2.1\/user-subscriptions\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.vnision\.com\/v1\/(users\/|banners),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.+\.(my10api|(.*91.*))\.(com|tips|app|xyz)(:\d{2,5})?\/api.php$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://sp\.kaola\.com/api/openad$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://r\.inews\.qq.com\/get(QQNewsUnreadList|RecommendList),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.(lago|fuli|xiang(jiao|xiang))apps\.com\/(ucp\/index|getGlobalData|.+\/reqplay\/),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/(i|newdrugs)\.dxy\.cn\/(snsapi\/username\/|app\/user\/(pro\/stat\?|init\?timestamp=)),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/(.+)\.(\w{2,3})(:?\d*)\/(api\/public\/\?service=Live\.checkLive$|public\/\/\?service=Live\.roomCharge$|lg\/video\/loadVideoFees\.do$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.luqijianggushi\.com\/api\/v2\/user\/get,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://account.wps.*/api/users/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gyrosco\.pe\/v1\/account\/$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api1\.dobenge\.cn\/api\/user\/getuserinfo,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.mvmtv\.com\/index\.php.*(c=user.*a=info|a=addr.*vid=.*),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.termius\.com\/api\/v3\/bulk\/account\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/viva\.v21xy\.com\/api\/rest\/u\/vip,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/biz\.caiyunapp\.com\/v2\/user\?app_name\=weather,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gotokeep\.com\/(.+\/subject|.+\/dynamic),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\?,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/mp\.bybutter\.com\/mood\/(official-templates|privileges),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/splice\.oracle\.\w+\.com\/devices\/me,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/pan\.baidu\.com\/rest\/2\.0\/membership\/user,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://.*\.snssdk\.com/bds/(feed/stream|comment/cell_reply|cell/cell_comment|cell/detail|ward/list|user/favorite|user/cell_coment|user/cell_userfeed|user/publish_list),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/viva-asia1\.vvbrd\.com\/api\/rest\/u\/vip*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.unfold\.app\/v1\/ios\/receipts$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/graph\.nhaccuatui\.com\/.*\/users\/info*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.memrise\.com\/.+\/(me\/$|dashboard\/$|leaderboards\/following\/),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.sync\.me\/api\/purchases\/(report_purchases|get_purchases),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/pool\.elsanow\.io\/user\/api\/v1\/purchase$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/lambda\.us-east-1\.amazonaws\.com/.*/functions\/prod-4-syncPurchases\/invocations$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.mondlylanguages\.com\/v1\/ios\/user\/sync$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.busuu\.com\/users\/me*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/owa\.videoshowiosglobalserver\.com\/.*\/iosPayClient,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/accounts\.elevateapp\.net\/api\/users\?user%5Bauthentication_token*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-intl\.mr\.meitu\.com/.*/subs_offer_elg$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/bmall\.camera360\.com\/api\/(iap\/check-receipt$|mix\/getinfo$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.tv\.zing\.vn\/.*/user*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.calm\.com\/me$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/photos\.adobe\.io\/v2\/accounts*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/license\.pdfexpert\.com\/api\/1\.0\/pdfexpert6\/subscription\/(refresh$|check$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/subs\.platforms\.team\/.+\/apple\/verify$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/apic\.musixmatch\.com\/ws\/.*\/config\.get,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.getmimo\.com\/v1\/subscriptions$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.revenuecat\.com\/.+\/(receipts$|subscribers\/[a-zA-Z0-9_-]*$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.lingokids\.com\/v1\/renovate_session$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.peacefulsoundsapp\.com\/api\/v1\/init$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/duolingo-leaderboards-prod\.duolingo\.com\/leaderboards*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/commerce-i18n-api\.faceu\.mobi\/commerce\/v1\/subscription\/user_info$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.global\.mp3\.zing\.vn\/1\.0\/getUserInfo\?data=*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.blinkist\.com\/v4\/(me$|me.json$|me\/access$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.sololearn\.com\/(Profile\/GetProfile$|authenticateDevice$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-kinemaster-assetstore\.(nexstreaming|kinemasters)\.com\/.*\/product\/verifyReceipt$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.pushover\.net\/1\/messages\.json*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.overhq\.com\/(user\/token\/refresh$|subscription\/verifyReceipt$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/receipt-validator\.herewetest\.com\/apple\/verifyTransaction$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/license\.pdfexpert\.com\/api\/.*\/documents\/subscription\/(refresh$|check$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/education\.github\.com\/api\/user$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/backend\.getdrafts\.com\/api\/.*\/verification*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/lcs-mobile-cops\.adobe\.io\/mobile_profile,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/ssl-api\.itranslateapp\.com\/.*\/subscriptions\/.*\/ios$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/sk\.ulysses\.app\/api\/v1\/itunes_receipt_verify$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/dayone\.me\/api\/(users|v2\/users\/account-status)$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-production\.endel\.io\/.*\/user$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.shred\.app\/verifyReceipt$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/subscription\.grammarly\.com\/api\/v1$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/planner5d\.com\/api\/sets,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/secure\.istreamer\.com\/backend$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.api\.monkeyuni\.net\/api\/.+\/mobile\/account\/load-update,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.textnow\.me\/api2.0\/users\/.*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/vipapi\.jxedt\.com\/vip\/check,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.interpreter\.caiyunai\.com\/v1\/user,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/pocketlists\.com\/api\/v1\/pocketlists.me.get,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/book\.haitunwallet\.com\/app\/vip\/status,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/mubu\.com\/api\/app\/user\/info,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/app\.xunjiepdf\.com\/api\/v4\/virtualactregister,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/miaow\.yiyongcad\.com\/api\/v4\/memprofile,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.lennou\.com\/user\/info,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gkocr\.com\/api\/userlogin1.php,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vira\.llsapp\.com\/api\/v2\/readings\/(accessible|limitation),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.rr\.tv(\/user\/privilege\/list|\/ad\/getAll|\/rrtv-video\/v4plus\/season\/detail),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/pan\.baidu\.com\/s\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.revenuecat\.com\/v1\/(receipts|\d{1,})$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://(commerce-.*api|pay).(faceu|wecut).(com|mobi)/(commerce|apple)/(iosAppVerifyReceipt.php|v1/subscription/user_info),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/theme),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http:\/\/115\.com\/lx.*$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.lakecoloring\.com\/v1\/receipt,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http://ctrl.playcvn.com/app/(init|ads),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/dict\.eudic\.net\/jingting\/GetThisChapterTaskStatus?,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m.client.10010.com/uniAdmsInterface/getHomePageAd,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.wakamoment\.ga\/init\?platform\=ios,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.diyidan\.net\/v0\.3\/(user\/personal_homepage|vip_user\/info|tv_series\/index\?appChanne),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.flexibits\.com\/v1\/(auth|account)\/(device|details|appstore-receipt)\/$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https?:\/\/api\.jiaonizuocai\.com,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.sololearn\.com\/(authenticateDevice|challenge\/GetContestFeed|Profile\/GetProfile)$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://tncj.hortorgames.com/chicken/fight/(answer|findQuiz),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/(www\.baidu.com2\.club|ayk\.tmdidi\.com|m\.pearkin\.com|souhu\.mett\.me|bkcd\.b-cdn\.net)\/(api\/movie\/WatchMovie|api\/Account\/CheckVip|api\/account\/IndexDetail),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/claritywallpaper\.com\/clarity\/api\/(userInfo|special\/queryByCatalogAll),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/bookapi\.ihuman\.com\/(v1\/get\_user\_info|v1\/get\_purchase\_list),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/rest\.zhibo\.tv\/room\/get\-room\-info\-v430,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://note.youdao.com/yws/(mapi/payment|api/self),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/billing\.peakcloud\.org\/billing\/2\/user\/me?,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.ithome\.com\/json\/slide\/index,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.ithome\.com\/json\/(newslist|listpage)\/news,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/www\.xmind\.cn\/\_res\/devices,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http?:\/\/.*\.arten.cn/login/login,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.weiqire.com/api3/(visitor/|user/unlockCharpter),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://api.shimo.im/users/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.videostarapp\.com\/scripts\/subsNew\.php,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.revenuecat\.com\/v1\/(subscribers|receipts),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.api.versa-ai.com/pay/order/iap/check,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https\:\/\/hjapi\.bjxkhc\.com\/v2d2\/users\/.*\/member,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/api\.591master\.com\:8081\/(1.0|3.6.8)\/ui(forum|common)\/(downloadwallpaper|getuser),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http\:\/\/jdytv\.cn\/login\/login\/veifys,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=http://user.shywck.com/user/userinfo,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.xunjie.*\.com\/api\/v\d\/*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.psy-1\.com\/cosleep\/user\/info,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/snailsleep\.net\/snail\/v1\/profile\/get,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/mob2015\.kekenet\.com\/keke\/mobile\/index\.php,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/m\.samh\.xndm\.tech\/userapi\/info\/v1\/getuserinfo,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http\:\/\/app\.flashdown365\.com\/ios\/login,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/avoscloud\.com\/1\.1\/users\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https\:\/\/api\.gao1gps\.cn\/v1\/user\/info,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.meiyan\.com\/iap\/verify\.json,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/bea\.sportq\.com\/SFitWeb\/sfit\/getUserBaseInfo,script-path=eval_script.js + +eval_script.js = type=http-request,requires-body=1,pattern=^https://8.8.8.8/api,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://8.8.8.8/(home|app|log\/),script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js @@ -14,6 +328,8 @@ eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobil eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,script-path=eval_script.js \ No newline at end of file From fc2e2c04c4d59fd5b04700d559f2969dcda73cee Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 11 Jun 2020 17:12:37 +0800 Subject: [PATCH 0985/1191] update From 775bfa30f8e5d258013d550c5c8e922cdf210e8e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 11 Jun 2020 17:12:41 +0800 Subject: [PATCH 0986/1191] update From e06d515b97648d1679e3bf46c7cc62fef70e80e8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 11 Jun 2020 17:13:02 +0800 Subject: [PATCH 0987/1191] update From 53bb597189c06966d746f60e23a9b871441ed4e9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 11 Jun 2020 17:13:06 +0800 Subject: [PATCH 0988/1191] update From 8c7a98360b1ab6af915944e206349a27b80a0909 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 11 Jun 2020 17:16:29 +0800 Subject: [PATCH 0989/1191] update From 16521c62812350694900b4dfdb73163b24e846d5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 11 Jun 2020 17:16:36 +0800 Subject: [PATCH 0990/1191] update From 0794ca7171c20b0037519263043b917acb1b79d5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 11 Jun 2020 17:17:47 +0800 Subject: [PATCH 0991/1191] update From 81df3b0ae10f638ce20ae4b4f4bb152e11522b2e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 11 Jun 2020 17:17:51 +0800 Subject: [PATCH 0992/1191] update From 38f902515c3f8b086c4f7d39f6197a5d23a19bf4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 11 Jun 2020 20:44:04 +0800 Subject: [PATCH 0993/1191] fix --- eval_script.js | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/eval_script.js b/eval_script.js index 88e8b52eb..b9ad0a769 100644 --- a/eval_script.js +++ b/eval_script.js @@ -250,26 +250,8 @@ if (!__tool.isTask) { const value = __confObj[key] for (let j = 0, len = value.length; j < len; j++) { const match = value[j] - const regular = new RegExp(match.regular) - if (__debug) { - try { - if (regular.test(__url)) { - const type = match.type - if (type && type.length > 0) { - if (__tool.scriptType == type) { - script = { url: key, match, content: __developmentMode ? key : __tool.read(key) } - break - } - } else { - script = { url: key, match, content: __developmentMode ? key : __tool.read(key) } - break - } - } - } catch (error) { - if (__debug) __tool.notify("[eval_script.js]", "", `Error regular : ${match.regular}\nRequest: ${__url}`) - throw error - } - } else { + try { + const regular = new RegExp(match.regular) if (regular.test(__url)) { const type = match.type if (type && type.length > 0) { @@ -282,6 +264,9 @@ if (!__tool.isTask) { break } } + } catch (error) { + if (__debug) __tool.notify("[eval_script.js]", "", `Error regular : ${match.regular}\nRequest: ${__url}`) + //throw error } } } From e105373922812571966bb340e3e2eb89e9928b83 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 11 Jun 2020 21:07:18 +0800 Subject: [PATCH 0994/1191] update From 0b53c32da51cf18983123b7e9a72feb6bfa1d952 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 11 Jun 2020 21:07:22 +0800 Subject: [PATCH 0995/1191] update From 1137d003e0cb83c8c7c91d132c9a023d6e84ffdd Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 12 Jun 2020 00:00:22 +0800 Subject: [PATCH 0996/1191] update From b2463be6d50d939fd5857fcc0e65dc887ae8762a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 12 Jun 2020 00:00:26 +0800 Subject: [PATCH 0997/1191] update From 0ce095ffa2d1811bf4a16276aab86988b36908e6 Mon Sep 17 00:00:00 2001 From: NobyDa <53217160+NobyDa@users.noreply.github.com> Date: Fri, 12 Jun 2020 22:26:40 +0800 Subject: [PATCH 0998/1191] Fix nf rating. When netflix opens, regex may match irrelevant URL, for example the summary cache of multiple teleplay, so it caused script error. --- nf_rating.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nf_rating.js b/nf_rating.js index 1e14cb4b3..4eb1675ec 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -30,6 +30,7 @@ if (!$tool.isResponse) { if (!IMDbApikey) updateIMDbApikey(); let obj = JSON.parse($response.body); if (consoleLog) console.log("Netflix Original Body:\n" + $response.body); + if (typeof(obj.paths[0][1]) == "string") { const videoID = obj.paths[0][1]; const video = obj.value.videos[videoID]; const map = getTitleMap(); @@ -67,6 +68,9 @@ if (!$tool.isResponse) { if (consoleLog) console.log("Netflix Modified Body:\n" + JSON.stringify(obj)); $done({ body: JSON.stringify(obj) }); }); + } else { + $done({}); + } } function getTitleMap() { From fde9c677a60e24fcd0115f7cfda726060e42df74 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 10:46:35 +0800 Subject: [PATCH 0999/1191] update --- eval_script/qx_script.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index 3c931bc63..f3819fb0d 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -1,4 +1,4 @@ -hostname = 8.8.8.8,bea.sportq.com,api.meiyan.com,api.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,api.m.jd.com,ios.prod.ftl.netflix.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me +hostname = 8.8.8.8,bea.sportq.com,api.meiyan.com,*.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,api.m.jd.com,ios.prod.ftl.netflix.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js @@ -308,7 +308,7 @@ http://user.shywck.com/user/userinfo url script-response-body eval_script.js ^https:\/\/avoscloud\.com\/1\.1\/users\/ url script-response-body eval_script.js -^https\:\/\/api\.gao1gps\.cn\/v1\/user\/info url script-response-body eval_script.js +^https\:\/\/pwaapi\.gao1gps\.cn\/v1\/user\/info url script-response-body eval_script.js ^https:\/\/api\.meiyan\.com\/iap\/verify\.json url script-response-body eval_script.js From a3be2101c15fce7a7c688175d96ca4024ebdf2d6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 10:46:38 +0800 Subject: [PATCH 1000/1191] update --- eval_script/sg_script.sgmodule | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index a5a3b3307..8c4787ed9 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -1,7 +1,7 @@ #!name=eval_script.js module [MITM] -hostname = %INSERT% 8.8.8.8,bea.sportq.com,api.meiyan.com,api.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,api.m.jd.com,ios.prod.ftl.netflix.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me +hostname = %INSERT% 8.8.8.8,bea.sportq.com,api.meiyan.com,*.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,api.m.jd.com,ios.prod.ftl.netflix.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me [Script] eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js @@ -312,7 +312,7 @@ eval_script.js = type=http-response,requires-body=1,pattern=^http\:\/\/app\.flas eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/avoscloud\.com\/1\.1\/users\/,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https\:\/\/api\.gao1gps\.cn\/v1\/user\/info,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https\:\/\/pwaapi\.gao1gps\.cn\/v1\/user\/info,script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.meiyan\.com\/iap\/verify\.json,script-path=eval_script.js From e9fc672afc478a78cbecb414e38b2fcdff6f9a3b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:49:58 +0800 Subject: [PATCH 1001/1191] update From 12357ea75876142574df533d631d1f7eed049373 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:50:01 +0800 Subject: [PATCH 1002/1191] update From a5fa7775dd7b05843e9120869daa6568a28348a5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:50:37 +0800 Subject: [PATCH 1003/1191] update From 0ed564790970b794a356b8531f796086dcc8008b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:50:41 +0800 Subject: [PATCH 1004/1191] update From 213515392c367813f7ed27951a2fec371c9a49fd Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:51:04 +0800 Subject: [PATCH 1005/1191] update From 6f95535d4f0f1aee03fac50bac8be899119414df Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:51:08 +0800 Subject: [PATCH 1006/1191] update From 418e67156e5cd3265521455a9e86f7957485919c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:51:24 +0800 Subject: [PATCH 1007/1191] update From 65eb3d8bebd8ff7be46ead199d93c2c687f21350 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:51:27 +0800 Subject: [PATCH 1008/1191] update From 81f8ad2cc1370ecba654daa569e45639ba30dae0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:51:44 +0800 Subject: [PATCH 1009/1191] update From 454dd67d9c2eb6ec00c9924abae718d3a9149749 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:51:47 +0800 Subject: [PATCH 1010/1191] update From 61de2a418841427c91106f7867a2f4566dc171df Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:52:15 +0800 Subject: [PATCH 1011/1191] update From 02a3060dfb0d3f20ef2a090a22acaa28cd69a971 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:52:19 +0800 Subject: [PATCH 1012/1191] update From f0698234ecc7015825934bb89fbb019457bbb526 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:53:20 +0800 Subject: [PATCH 1013/1191] update From 129f8cbf13c42fef4b87fd45fe2f3c2bf73dd0cf Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:53:23 +0800 Subject: [PATCH 1014/1191] update From f5f072e6e40e5ae2acce8631b712bd4cde7f77d1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:53:37 +0800 Subject: [PATCH 1015/1191] update From fc93b34ec4e8c035ab5de1101878fd8d0ae4ee12 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:53:41 +0800 Subject: [PATCH 1016/1191] update From 1650ee0d645d46fc9fcdbfe510a4ff16b32bcbc4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:54:06 +0800 Subject: [PATCH 1017/1191] update From 543bcc5bdfbae3ac57c1cf957e049b3ca085f8fe Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 15:54:09 +0800 Subject: [PATCH 1018/1191] update From aefaa0468cfe40080b5ea0cb1933e43ef0d3e905 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 14 Jun 2020 16:10:59 +0800 Subject: [PATCH 1019/1191] Update eval_script.js --- eval_script.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/eval_script.js b/eval_script.js index b9ad0a769..cad03be02 100644 --- a/eval_script.js +++ b/eval_script.js @@ -26,7 +26,6 @@ api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd. ` -// 是否更新 GitHub(如果开启 true,需配置 token 或 账号密码) const __isUpdateGithub = true // GitHub Token(如果使用账号密码 token 请设置为空 "") const __token = "" @@ -35,9 +34,9 @@ const __username = "xxx" // GitHub 密码 const __password = "xxx" // GitHub 用户名 -const __owner = "yichahucha" +const __owner = "xxx" // GitHub 仓库名 -const __repo = "surge" +const __repo = "xxx" // GitHub 分支(不指定就使用默认分支) const __branch = "master" // 指定 eval_script.js 文件路径(路径为空 "" 使用脚本原始路径) @@ -61,7 +60,7 @@ const __showLine = 15 const __log = false const __debug = false const __developmentMode = false -const __concurrencyLimit = 5 +const __concurrencyLimit = 20 const __tool = new ____Tool() const __base64 = new ____Base64() From 46eb53ede4684d4b4b778c19f1c8364b33bb7310 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 15 Jun 2020 22:26:39 +0800 Subject: [PATCH 1020/1191] Update clock_in.js --- clock_in.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/clock_in.js b/clock_in.js index bd6018988..2bd4741a0 100644 --- a/clock_in.js +++ b/clock_in.js @@ -1,6 +1,6 @@ /* README:https://github.com/yichahucha/surge/tree/master -每日打卡提醒(corn "0 9,18 * * 1-5" 周一到周五,早九晚六)+ 每日壹句(有道词典)+ 跳转钉钉打卡页面(下拉通知点击链接) +每日打卡提醒(corn "0 9,18 * * 1-5" 周一到周五,早九晚六)+ 每日壹句(有道词典)+ 跳转钉钉打卡页面 */ const $tool = new Tool() @@ -10,14 +10,17 @@ $tool.get('https://dict.youdao.com/infoline/style/cardList?mode=publish&client=m let isAM = date.getHours() < 12 ? true : false; let title = 'Clock' + (isAM ? ' in' : ' out') + (isAM ? ' ☀️' : ' 🌙'); let subtitle = ''; - let content = 'dingtalk://dingtalkclient/page/link?url=https://attend.dingtalk.com/attend/index.html'; + let scheme = 'dingtalk://dingtalkclient/page/link?url=https://attend.dingtalk.com/attend/index.html'; + let content = scheme; + let option = {"open-url" : scheme}; if (!error) { if (obj && obj.length > 1) { let yi = obj[1]; content = yi.title + '\n' + yi.summary + '\n\n' + content; + option["media-url"] = yi.image[0]; } } - $tool.notify(title, subtitle, content); + $tool.notify(title, subtitle, content, option); $done(); }) @@ -35,9 +38,9 @@ function Tool() { this.isSurge = _isSurge this.isQuanX = _isQuanX this.isResponse = typeof $response != "undefined" - this.notify = (title, subtitle, message) => { - if (_isQuanX) $notify(title, subtitle, message) - if (_isSurge) $notification.post(title, subtitle, message) + this.notify = (title, subtitle, message, option) => { + if (_isQuanX) $notify(title, subtitle, message, option) + if (_isSurge) $notification.post(title, subtitle, message, option["open-url"]) if (_node) console.log(JSON.stringify({ title, subtitle, message })); } this.write = (value, key) => { From 21286beb983dd2c9f3a458e9a22839270f5bb8cc Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 15 Jun 2020 22:30:29 +0800 Subject: [PATCH 1021/1191] update From 443194a43469c9356d6efbe08b6325c881b55dd5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Mon, 15 Jun 2020 22:30:34 +0800 Subject: [PATCH 1022/1191] update From ead058c601f308802f601ebc77708f5c96e8c160 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 16 Jun 2020 09:33:05 +0800 Subject: [PATCH 1023/1191] Update eval_script.js --- eval_script.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eval_script.js b/eval_script.js index cad03be02..113b2135b 100644 --- a/eval_script.js +++ b/eval_script.js @@ -61,6 +61,7 @@ const __log = false const __debug = false const __developmentMode = false const __concurrencyLimit = 20 +const __cacheKey = "ScriptCacheKey" const __tool = new ____Tool() const __base64 = new ____Base64() @@ -160,7 +161,7 @@ if (__tool.isTask) { .then((scriptResults) => { console.log("Stop updating script.") storeObj["scriptResults"] = scriptResults - return __tool.write(JSON.stringify(storeObj.confMap), "ScriptConfObjKey") + return __tool.write(JSON.stringify(storeObj.confMap), __cacheKey) }) //update github .then(() => { @@ -237,7 +238,7 @@ if (!__tool.isTask) { if (__developmentMode) { return ____parseDevelopmentModeConf(__conf) } else { - return JSON.parse(__tool.read("ScriptConfObjKey")) + return JSON.parse(__tool.read(__cacheKey)) } })() const __script = (() => { From 908609b8e8cc55a43ebaf60b253db8dfc23f8bef Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 16 Jun 2020 10:01:44 +0800 Subject: [PATCH 1024/1191] update --- eval_script/qx_script.txt | 326 +------------------------------------- 1 file changed, 5 insertions(+), 321 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index f3819fb0d..a7bec5f8e 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -1,322 +1,8 @@ -hostname = 8.8.8.8,bea.sportq.com,api.meiyan.com,*.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,api.m.jd.com,ios.prod.ftl.netflix.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js - -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js - -^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad url script-response-body eval_script.js - -^https://api.zhihu.com/moments/recommend url script-response-body eval_script.js - -^https://api.zhihu.com/topstory/recommend url script-response-body eval_script.js - -https://api.zhihu.com/v4/questions url script-response-body eval_script.js - -^https://api.zhihu.com/people/ url script-response-body eval_script.js - -^https://api.zhihu.com/market/header url script-response-body eval_script.js - -https://app.bilibili.com/x/v2/space\?access_key url script-response-body eval_script.js - -https://app.bilibili.com/x/resource/show/tab\?access_key url script-response-body eval_script.js - -https://app.bilibili.com/x/v2/feed/index\?access_key url script-response-body eval_script.js - -https://app.bilibili.com/x/v2/view\?access_key url script-response-body eval_script.js - -https://api.bilibili.com/x/v2/reply/main\?access_key url script-response-body eval_script.js - -https://api.live.bilibili.com/xlive/app-room/v1/index/getInfoByRoom\?access_key url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/aweme\/post\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/feed\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/follow\/feed\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/nearby\/feed\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/search\/item\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/general\/search\/single\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/hot\/search\/video\/list\/ url script-response-body eval_script.js - -^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice) url script-response-body eval_script.js - -https:\/\/.*\/getGlobalData url script-response-body eval_script.js - -^http(s)://api.bjxkhc.com/index.php/app/ios/(vod/show|(user|vod|topic|type)/index) url script-response-body eval_script.js - -^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json url script-response-body eval_script.js - -^https?:\/\/getuserinfo\.321mh\.com\/app_api\/v5\/getuserinfo\/ url script-response-body eval_script.js - -^https://getuserinfo-globalapi.zymk.cn/app_api/v5/(getuserinfo|coin_account|getuserinfo_ticket|getcomicinfo)/ url script-response-body eval_script.js - -https:\/\/ap(p|i)\.bilibili\.com\/((pgc\/player\/api\/playurl)|(x\/v2\/account\/myinfo\?)|(x\/v2\/account/mine\?)) url script-response-body eval_script.js - -^https?:\/\/vsco\.co\/api\/subscriptions\/2.1\/user-subscriptions\/ url script-response-body eval_script.js - -^https?:\/\/api\.vnision\.com\/v1\/(users\/|banners) url script-response-body eval_script.js - -^https?:\/\/.+\.(my10api|(.*91.*))\.(com|tips|app|xyz)(:\d{2,5})?\/api.php$ url script-response-body eval_script.js - -^https://sp\.kaola\.com/api/openad$ url script-response-body eval_script.js - -^https://r\.inews\.qq.com\/get(QQNewsUnreadList|RecommendList) url script-response-body eval_script.js - -^https?:\/\/.*\.(lago|fuli|xiang(jiao|xiang))apps\.com\/(ucp\/index|getGlobalData|.+\/reqplay\/) url script-response-body eval_script.js - -^https?:\/\/(i|newdrugs)\.dxy\.cn\/(snsapi\/username\/|app\/user\/(pro\/stat\?|init\?timestamp=)) url script-response-body eval_script.js - -^https?:\/\/(.+)\.(\w{2,3})(:?\d*)\/(api\/public\/\?service=Live\.checkLive$|public\/\/\?service=Live\.roomCharge$|lg\/video\/loadVideoFees\.do$) url script-response-body eval_script.js - -^https:\/\/www\.luqijianggushi\.com\/api\/v2\/user\/get url script-response-body eval_script.js - -^https://account.wps.*/api/users/ url script-response-body eval_script.js - -^https:\/\/api\.gyrosco\.pe\/v1\/account\/$ url script-response-body eval_script.js - -^https:\/\/api1\.dobenge\.cn\/api\/user\/getuserinfo url script-response-body eval_script.js - -^https:\/\/api\.mvmtv\.com\/index\.php.*(c=user.*a=info|a=addr.*vid=.*) url script-response-body eval_script.js - -^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user url script-response-body eval_script.js - -https:\/\/api\.termius\.com\/api\/v3\/bulk\/account\/ url script-response-body eval_script.js - -^https:\/\/viva\.v21xy\.com\/api\/rest\/u\/vip url script-response-body eval_script.js - -^https:\/\/biz\.caiyunapp\.com\/v2\/user\?app_name\=weather url script-response-body eval_script.js - -^https:\/\/api\.gotokeep\.com\/(.+\/subject|.+\/dynamic) url script-response-body eval_script.js - -^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\? url script-response-body eval_script.js - -^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) url script-response-body eval_script.js - -^https?:\/\/mp\.bybutter\.com\/mood\/(official-templates|privileges) url script-response-body eval_script.js - -^https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json url script-response-body eval_script.js - -^https:\/\/splice\.oracle\.\w+\.com\/devices\/me url script-response-body eval_script.js - -https:\/\/pan\.baidu\.com\/rest\/2\.0\/membership\/user url script-response-body eval_script.js - -^https?://.*\.snssdk\.com/bds/(feed/stream|comment/cell_reply|cell/cell_comment|cell/detail|ward/list|user/favorite|user/cell_coment|user/cell_userfeed|user/publish_list) url script-response-body eval_script.js - -^https:\/\/viva-asia1\.vvbrd\.com\/api\/rest\/u\/vip* url script-response-body eval_script.js - -^https:\/\/api\.unfold\.app\/v1\/ios\/receipts$ url script-response-body eval_script.js - -^https:\/\/graph\.nhaccuatui\.com\/.*\/users\/info* url script-response-body eval_script.js - -^https:\/\/api\.memrise\.com\/.+\/(me\/$|dashboard\/$|leaderboards\/following\/) url script-response-body eval_script.js - -^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user$ url script-response-body eval_script.js - -^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt$ url script-response-body eval_script.js - -^https:\/\/api\.sync\.me\/api\/purchases\/(report_purchases|get_purchases) url script-response-body eval_script.js - -^https:\/\/pool\.elsanow\.io\/user\/api\/v1\/purchase$ url script-response-body eval_script.js - -^https:\/\/lambda\.us-east-1\.amazonaws\.com/.*/functions\/prod-4-syncPurchases\/invocations$ url script-response-body eval_script.js - -^https:\/\/api\.mondlylanguages\.com\/v1\/ios\/user\/sync$ url script-response-body eval_script.js - -^https:\/\/api\.busuu\.com\/users\/me* url script-response-body eval_script.js - -^https:\/\/owa\.videoshowiosglobalserver\.com\/.*\/iosPayClient url script-response-body eval_script.js - -^https:\/\/accounts\.elevateapp\.net\/api\/users\?user%5Bauthentication_token* url script-response-body eval_script.js - -^https:\/\/api-intl\.mr\.meitu\.com/.*/subs_offer_elg$ url script-response-body eval_script.js - -^https:\/\/bmall\.camera360\.com\/api\/(iap\/check-receipt$|mix\/getinfo$) url script-response-body eval_script.js - -^https?:\/\/api\.tv\.zing\.vn\/.*/user* url script-response-body eval_script.js - -^https:\/\/api\.calm\.com\/me$ url script-response-body eval_script.js - -^https:\/\/photos\.adobe\.io\/v2\/accounts* url script-response-body eval_script.js - -^https:\/\/license\.pdfexpert\.com\/api\/1\.0\/pdfexpert6\/subscription\/(refresh$|check$) url script-response-body eval_script.js - -^https:\/\/subs\.platforms\.team\/.+\/apple\/verify$ url script-response-body eval_script.js - -^https:\/\/apic\.musixmatch\.com\/ws\/.*\/config\.get url script-response-body eval_script.js - -^https:\/\/api\.getmimo\.com\/v1\/subscriptions$ url script-response-body eval_script.js - -^https:\/\/api\.revenuecat\.com\/.+\/(receipts$|subscribers\/[a-zA-Z0-9_-]*$) url script-response-body eval_script.js - -^https:\/\/api\.lingokids\.com\/v1\/renovate_session$ url script-response-body eval_script.js - -^https:\/\/www\.peacefulsoundsapp\.com\/api\/v1\/init$ url script-response-body eval_script.js - -^https:\/\/duolingo-leaderboards-prod\.duolingo\.com\/leaderboards* url script-response-body eval_script.js - -^https:\/\/commerce-i18n-api\.faceu\.mobi\/commerce\/v1\/subscription\/user_info$ url script-response-body eval_script.js - -^https:\/\/api\.global\.mp3\.zing\.vn\/1\.0\/getUserInfo\?data=* url script-response-body eval_script.js - -^https:\/\/api\.blinkist\.com\/v4\/(me$|me.json$|me\/access$) url script-response-body eval_script.js - -^https:\/\/api\.sololearn\.com\/(Profile\/GetProfile$|authenticateDevice$) url script-response-body eval_script.js - -^https:\/\/api-kinemaster-assetstore\.(nexstreaming|kinemasters)\.com\/.*\/product\/verifyReceipt$ url script-response-body eval_script.js - -^https:\/\/api\.pushover\.net\/1\/messages\.json* url script-response-body eval_script.js - -^https:\/\/api\.overhq\.com\/(user\/token\/refresh$|subscription\/verifyReceipt$) url script-response-body eval_script.js - -^https:\/\/receipt-validator\.herewetest\.com\/apple\/verifyTransaction$ url script-response-body eval_script.js - -^https:\/\/license\.pdfexpert\.com\/api\/.*\/documents\/subscription\/(refresh$|check$) url script-response-body eval_script.js - -^https:\/\/education\.github\.com\/api\/user$ url script-response-body eval_script.js - -^https:\/\/backend\.getdrafts\.com\/api\/.*\/verification* url script-response-body eval_script.js - -^https:\/\/lcs-mobile-cops\.adobe\.io\/mobile_profile url script-response-body eval_script.js - -^https:\/\/ssl-api\.itranslateapp\.com\/.*\/subscriptions\/.*\/ios$ url script-response-body eval_script.js - -^https:\/\/sk\.ulysses\.app\/api\/v1\/itunes_receipt_verify$ url script-response-body eval_script.js - -^https:\/\/dayone\.me\/api\/(users|v2\/users\/account-status)$ url script-response-body eval_script.js - -^https:\/\/api-production\.endel\.io\/.*\/user$ url script-response-body eval_script.js - -^https:\/\/api\.shred\.app\/verifyReceipt$ url script-response-body eval_script.js - -^https:\/\/subscription\.grammarly\.com\/api\/v1$ url script-response-body eval_script.js - -^https:\/\/planner5d\.com\/api\/sets url script-response-body eval_script.js - -^https:\/\/secure\.istreamer\.com\/backend$ url script-response-body eval_script.js - -^https:\/\/www\.api\.monkeyuni\.net\/api\/.+\/mobile\/account\/load-update url script-response-body eval_script.js - -^https:\/\/api\.textnow\.me\/api2.0\/users\/.* url script-response-body eval_script.js - -^https:\/\/vipapi\.jxedt\.com\/vip\/check url script-response-body eval_script.js - -^https:\/\/api\.interpreter\.caiyunai\.com\/v1\/user url script-response-body eval_script.js - -^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt url script-response-body eval_script.js - -^https:\/\/pocketlists\.com\/api\/v1\/pocketlists.me.get url script-response-body eval_script.js - -https:\/\/book\.haitunwallet\.com\/app\/vip\/status url script-response-body eval_script.js - -https:\/\/mubu\.com\/api\/app\/user\/info url script-response-body eval_script.js - -^https:\/\/app\.xunjiepdf\.com\/api\/v4\/virtualactregister url script-response-body eval_script.js - -http:\/\/miaow\.yiyongcad\.com\/api\/v4\/memprofile url script-response-body eval_script.js - -https:\/\/api\.lennou\.com\/user\/info url script-response-body eval_script.js - -^https:\/\/api\.gkocr\.com\/api\/userlogin1.php url script-response-body eval_script.js - -^https?:\/\/vira\.llsapp\.com\/api\/v2\/readings\/(accessible|limitation) url script-response-body eval_script.js - -^https:\/\/api\.rr\.tv(\/user\/privilege\/list|\/ad\/getAll|\/rrtv-video\/v4plus\/season\/detail) url script-response-body eval_script.js - -^https?:\/\/pan\.baidu\.com\/s\/ url script-response-body eval_script.js - -^https:\/\/api\.revenuecat\.com\/v1\/(receipts|\d{1,})$ url script-response-body eval_script.js - -https://(commerce-.*api|pay).(faceu|wecut).(com|mobi)/(commerce|apple)/(iosAppVerifyReceipt.php|v1/subscription/user_info) url script-response-body eval_script.js - -^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/theme) url script-response-body eval_script.js - -^http:\/\/115\.com\/lx.*$ url script-response-body eval_script.js - -^https:\/\/api\.lakecoloring\.com\/v1\/receipt url script-response-body eval_script.js - -^http://ctrl.playcvn.com/app/(init|ads) url script-response-body eval_script.js - -^https:\/\/dict\.eudic\.net\/jingting\/GetThisChapterTaskStatus? url script-response-body eval_script.js - -^https?://m.client.10010.com/uniAdmsInterface/getHomePageAd url script-response-body eval_script.js - -^https:\/\/api\.wakamoment\.ga\/init\?platform\=ios url script-response-body eval_script.js - -^https:\/\/api\.diyidan\.net\/v0\.3\/(user\/personal_homepage|vip_user\/info|tv_series\/index\?appChanne) url script-response-body eval_script.js - -^https:\/\/api\.flexibits\.com\/v1\/(auth|account)\/(device|details|appstore-receipt)\/$ url script-response-body eval_script.js - -https?:\/\/api\.jiaonizuocai\.com url script-response-body eval_script.js - -https:\/\/api\.sololearn\.com\/(authenticateDevice|challenge\/GetContestFeed|Profile\/GetProfile)$ url script-response-body eval_script.js - -^https://tncj.hortorgames.com/chicken/fight/(answer|findQuiz) url script-response-body eval_script.js - -^https:\/\/(www\.baidu.com2\.club|ayk\.tmdidi\.com|m\.pearkin\.com|souhu\.mett\.me|bkcd\.b-cdn\.net)\/(api\/movie\/WatchMovie|api\/Account\/CheckVip|api\/account\/IndexDetail) url script-response-body eval_script.js - -^https:\/\/claritywallpaper\.com\/clarity\/api\/(userInfo|special\/queryByCatalogAll) url script-response-body eval_script.js - -https:\/\/bookapi\.ihuman\.com\/(v1\/get\_user\_info|v1\/get\_purchase\_list) url script-response-body eval_script.js - -http:\/\/rest\.zhibo\.tv\/room\/get\-room\-info\-v430 url script-response-body eval_script.js - -https://note.youdao.com/yws/(mapi/payment|api/self) url script-response-body eval_script.js - -^https:\/\/billing\.peakcloud\.org\/billing\/2\/user\/me? url script-response-body eval_script.js - -^https?:\/\/api\.ithome\.com\/json\/slide\/index url script-response-body eval_script.js - -^https?:\/\/api\.ithome\.com\/json\/(newslist|listpage)\/news url script-response-body eval_script.js - -https:\/\/www\.xmind\.cn\/\_res\/devices url script-response-body eval_script.js - -^http?:\/\/.*\.arten.cn/login/login url script-response-body eval_script.js - -^https://api.weiqire.com/api3/(visitor/|user/unlockCharpter) url script-response-body eval_script.js - -https://api.shimo.im/users/ url script-response-body eval_script.js - -^https?:\/\/.*\.videostarapp\.com\/scripts\/subsNew\.php url script-response-body eval_script.js - -https:\/\/api\.revenuecat\.com\/v1\/(subscribers|receipts) url script-response-body eval_script.js - -https://app.api.versa-ai.com/pay/order/iap/check url script-response-body eval_script.js - -^https\:\/\/hjapi\.bjxkhc\.com\/v2d2\/users\/.*\/member url script-response-body eval_script.js - -http:\/\/api\.591master\.com\:8081\/(1.0|3.6.8)\/ui(forum|common)\/(downloadwallpaper|getuser) url script-response-body eval_script.js - -^http\:\/\/jdytv\.cn\/login\/login\/veifys url script-response-body eval_script.js - -http://user.shywck.com/user/userinfo url script-response-body eval_script.js - -^https?:\/\/.*\.xunjie.*\.com\/api\/v\d\/* url script-response-body eval_script.js - -^https:\/\/api\.psy-1\.com\/cosleep\/user\/info url script-response-body eval_script.js - -^https:\/\/snailsleep\.net\/snail\/v1\/profile\/get url script-response-body eval_script.js - -^https:\/\/mob2015\.kekenet\.com\/keke\/mobile\/index\.php url script-response-body eval_script.js - -^https:\/\/m\.samh\.xndm\.tech\/userapi\/info\/v1\/getuserinfo url script-response-body eval_script.js - -^http\:\/\/app\.flashdown365\.com\/ios\/login url script-response-body eval_script.js - -^https:\/\/avoscloud\.com\/1\.1\/users\/ url script-response-body eval_script.js - -^https\:\/\/pwaapi\.gao1gps\.cn\/v1\/user\/info url script-response-body eval_script.js - -^https:\/\/api\.meiyan\.com\/iap\/verify\.json url script-response-body eval_script.js - -^https:\/\/bea\.sportq\.com\/SFitWeb\/sfit\/getUserBaseInfo url script-response-body eval_script.js - -^https://8.8.8.8/api url script-request-body eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js -^https://8.8.8.8/(home|app|log\/) url script-response-body eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js @@ -324,8 +10,6 @@ http://user.shywck.com/user/userinfo url script-response-body eval_script.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath url script-response-body eval_script.js \ No newline at end of file +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file From 91506405d2fd24daab73d930d21e1bff672fc574 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 16 Jun 2020 10:01:48 +0800 Subject: [PATCH 1025/1191] update --- eval_script/sg_script.sgmodule | 326 +-------------------------------- 1 file changed, 5 insertions(+), 321 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index 8c4787ed9..39b0e6ebe 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -1,326 +1,12 @@ #!name=eval_script.js module [MITM] -hostname = %INSERT% 8.8.8.8,bea.sportq.com,api.meiyan.com,*.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,api.m.jd.com,ios.prod.ftl.netflix.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me +hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] -eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/moments/recommend,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/topstory/recommend,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://api.zhihu.com/v4/questions,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/people/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/market/header,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/space\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/resource/show/tab\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/feed/index\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/view\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://api.bilibili.com/x/v2/reply/main\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://api.live.bilibili.com/xlive/app-room/v1/index/getInfoByRoom\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/aweme\/post\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/feed\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/follow\/feed\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/nearby\/feed\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/search\/item\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/general\/search\/single\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/hot\/search\/video\/list\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/.*\/getGlobalData,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http(s)://api.bjxkhc.com/index.php/app/ios/(vod/show|(user|vod|topic|type)/index),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/getuserinfo\.321mh\.com\/app_api\/v5\/getuserinfo\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://getuserinfo-globalapi.zymk.cn/app_api/v5/(getuserinfo|coin_account|getuserinfo_ticket|getcomicinfo)/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/ap(p|i)\.bilibili\.com\/((pgc\/player\/api\/playurl)|(x\/v2\/account\/myinfo\?)|(x\/v2\/account/mine\?)),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vsco\.co\/api\/subscriptions\/2.1\/user-subscriptions\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.vnision\.com\/v1\/(users\/|banners),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.+\.(my10api|(.*91.*))\.(com|tips|app|xyz)(:\d{2,5})?\/api.php$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://sp\.kaola\.com/api/openad$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://r\.inews\.qq.com\/get(QQNewsUnreadList|RecommendList),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.(lago|fuli|xiang(jiao|xiang))apps\.com\/(ucp\/index|getGlobalData|.+\/reqplay\/),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/(i|newdrugs)\.dxy\.cn\/(snsapi\/username\/|app\/user\/(pro\/stat\?|init\?timestamp=)),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/(.+)\.(\w{2,3})(:?\d*)\/(api\/public\/\?service=Live\.checkLive$|public\/\/\?service=Live\.roomCharge$|lg\/video\/loadVideoFees\.do$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.luqijianggushi\.com\/api\/v2\/user\/get,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://account.wps.*/api/users/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gyrosco\.pe\/v1\/account\/$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api1\.dobenge\.cn\/api\/user\/getuserinfo,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.mvmtv\.com\/index\.php.*(c=user.*a=info|a=addr.*vid=.*),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.termius\.com\/api\/v3\/bulk\/account\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/viva\.v21xy\.com\/api\/rest\/u\/vip,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/biz\.caiyunapp\.com\/v2\/user\?app_name\=weather,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gotokeep\.com\/(.+\/subject|.+\/dynamic),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\?,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/mp\.bybutter\.com\/mood\/(official-templates|privileges),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/splice\.oracle\.\w+\.com\/devices\/me,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/pan\.baidu\.com\/rest\/2\.0\/membership\/user,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://.*\.snssdk\.com/bds/(feed/stream|comment/cell_reply|cell/cell_comment|cell/detail|ward/list|user/favorite|user/cell_coment|user/cell_userfeed|user/publish_list),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/viva-asia1\.vvbrd\.com\/api\/rest\/u\/vip*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.unfold\.app\/v1\/ios\/receipts$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/graph\.nhaccuatui\.com\/.*\/users\/info*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.memrise\.com\/.+\/(me\/$|dashboard\/$|leaderboards\/following\/),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.sync\.me\/api\/purchases\/(report_purchases|get_purchases),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/pool\.elsanow\.io\/user\/api\/v1\/purchase$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/lambda\.us-east-1\.amazonaws\.com/.*/functions\/prod-4-syncPurchases\/invocations$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.mondlylanguages\.com\/v1\/ios\/user\/sync$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.busuu\.com\/users\/me*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/owa\.videoshowiosglobalserver\.com\/.*\/iosPayClient,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/accounts\.elevateapp\.net\/api\/users\?user%5Bauthentication_token*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-intl\.mr\.meitu\.com/.*/subs_offer_elg$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/bmall\.camera360\.com\/api\/(iap\/check-receipt$|mix\/getinfo$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.tv\.zing\.vn\/.*/user*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.calm\.com\/me$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/photos\.adobe\.io\/v2\/accounts*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/license\.pdfexpert\.com\/api\/1\.0\/pdfexpert6\/subscription\/(refresh$|check$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/subs\.platforms\.team\/.+\/apple\/verify$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/apic\.musixmatch\.com\/ws\/.*\/config\.get,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.getmimo\.com\/v1\/subscriptions$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.revenuecat\.com\/.+\/(receipts$|subscribers\/[a-zA-Z0-9_-]*$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.lingokids\.com\/v1\/renovate_session$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.peacefulsoundsapp\.com\/api\/v1\/init$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/duolingo-leaderboards-prod\.duolingo\.com\/leaderboards*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/commerce-i18n-api\.faceu\.mobi\/commerce\/v1\/subscription\/user_info$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.global\.mp3\.zing\.vn\/1\.0\/getUserInfo\?data=*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.blinkist\.com\/v4\/(me$|me.json$|me\/access$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.sololearn\.com\/(Profile\/GetProfile$|authenticateDevice$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-kinemaster-assetstore\.(nexstreaming|kinemasters)\.com\/.*\/product\/verifyReceipt$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.pushover\.net\/1\/messages\.json*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.overhq\.com\/(user\/token\/refresh$|subscription\/verifyReceipt$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/receipt-validator\.herewetest\.com\/apple\/verifyTransaction$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/license\.pdfexpert\.com\/api\/.*\/documents\/subscription\/(refresh$|check$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/education\.github\.com\/api\/user$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/backend\.getdrafts\.com\/api\/.*\/verification*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/lcs-mobile-cops\.adobe\.io\/mobile_profile,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/ssl-api\.itranslateapp\.com\/.*\/subscriptions\/.*\/ios$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/sk\.ulysses\.app\/api\/v1\/itunes_receipt_verify$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/dayone\.me\/api\/(users|v2\/users\/account-status)$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-production\.endel\.io\/.*\/user$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.shred\.app\/verifyReceipt$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/subscription\.grammarly\.com\/api\/v1$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/planner5d\.com\/api\/sets,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/secure\.istreamer\.com\/backend$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.api\.monkeyuni\.net\/api\/.+\/mobile\/account\/load-update,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.textnow\.me\/api2.0\/users\/.*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/vipapi\.jxedt\.com\/vip\/check,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.interpreter\.caiyunai\.com\/v1\/user,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/pocketlists\.com\/api\/v1\/pocketlists.me.get,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/book\.haitunwallet\.com\/app\/vip\/status,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/mubu\.com\/api\/app\/user\/info,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/app\.xunjiepdf\.com\/api\/v4\/virtualactregister,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/miaow\.yiyongcad\.com\/api\/v4\/memprofile,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.lennou\.com\/user\/info,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gkocr\.com\/api\/userlogin1.php,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vira\.llsapp\.com\/api\/v2\/readings\/(accessible|limitation),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.rr\.tv(\/user\/privilege\/list|\/ad\/getAll|\/rrtv-video\/v4plus\/season\/detail),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/pan\.baidu\.com\/s\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.revenuecat\.com\/v1\/(receipts|\d{1,})$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://(commerce-.*api|pay).(faceu|wecut).(com|mobi)/(commerce|apple)/(iosAppVerifyReceipt.php|v1/subscription/user_info),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/theme),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http:\/\/115\.com\/lx.*$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.lakecoloring\.com\/v1\/receipt,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http://ctrl.playcvn.com/app/(init|ads),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/dict\.eudic\.net\/jingting\/GetThisChapterTaskStatus?,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m.client.10010.com/uniAdmsInterface/getHomePageAd,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.wakamoment\.ga\/init\?platform\=ios,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.diyidan\.net\/v0\.3\/(user\/personal_homepage|vip_user\/info|tv_series\/index\?appChanne),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.flexibits\.com\/v1\/(auth|account)\/(device|details|appstore-receipt)\/$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https?:\/\/api\.jiaonizuocai\.com,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.sololearn\.com\/(authenticateDevice|challenge\/GetContestFeed|Profile\/GetProfile)$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://tncj.hortorgames.com/chicken/fight/(answer|findQuiz),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/(www\.baidu.com2\.club|ayk\.tmdidi\.com|m\.pearkin\.com|souhu\.mett\.me|bkcd\.b-cdn\.net)\/(api\/movie\/WatchMovie|api\/Account\/CheckVip|api\/account\/IndexDetail),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/claritywallpaper\.com\/clarity\/api\/(userInfo|special\/queryByCatalogAll),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/bookapi\.ihuman\.com\/(v1\/get\_user\_info|v1\/get\_purchase\_list),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/rest\.zhibo\.tv\/room\/get\-room\-info\-v430,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://note.youdao.com/yws/(mapi/payment|api/self),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/billing\.peakcloud\.org\/billing\/2\/user\/me?,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.ithome\.com\/json\/slide\/index,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.ithome\.com\/json\/(newslist|listpage)\/news,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/www\.xmind\.cn\/\_res\/devices,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http?:\/\/.*\.arten.cn/login/login,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://api.weiqire.com/api3/(visitor/|user/unlockCharpter),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://api.shimo.im/users/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.videostarapp\.com\/scripts\/subsNew\.php,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.revenuecat\.com\/v1\/(subscribers|receipts),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://app.api.versa-ai.com/pay/order/iap/check,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https\:\/\/hjapi\.bjxkhc\.com\/v2d2\/users\/.*\/member,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/api\.591master\.com\:8081\/(1.0|3.6.8)\/ui(forum|common)\/(downloadwallpaper|getuser),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http\:\/\/jdytv\.cn\/login\/login\/veifys,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=http://user.shywck.com/user/userinfo,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.xunjie.*\.com\/api\/v\d\/*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.psy-1\.com\/cosleep\/user\/info,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/snailsleep\.net\/snail\/v1\/profile\/get,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/mob2015\.kekenet\.com\/keke\/mobile\/index\.php,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/m\.samh\.xndm\.tech\/userapi\/info\/v1\/getuserinfo,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http\:\/\/app\.flashdown365\.com\/ios\/login,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/avoscloud\.com\/1\.1\/users\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https\:\/\/pwaapi\.gao1gps\.cn\/v1\/user\/info,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.meiyan\.com\/iap\/verify\.json,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/bea\.sportq\.com\/SFitWeb\/sfit\/getUserBaseInfo,script-path=eval_script.js - -eval_script.js = type=http-request,requires-body=1,pattern=^https://8.8.8.8/api,script-path=eval_script.js +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https://8.8.8.8/(home|app|log\/),script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js @@ -328,8 +14,6 @@ eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobil eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js -eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,script-path=eval_script.js \ No newline at end of file +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From 61d83c6c8b3bc1bb90dd3ee2bbe8677d6584e3f5 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 16 Jun 2020 10:02:37 +0800 Subject: [PATCH 1026/1191] update From 64d9367c4e80f13583e071de23de967af0b34498 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 16 Jun 2020 10:02:40 +0800 Subject: [PATCH 1027/1191] update From bda7ef966f1e01b06bed1ea89dd4468f36b0eae1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 16 Jun 2020 17:22:25 +0800 Subject: [PATCH 1028/1191] update From aabdd94a1b590ce38ff96dd99d5a71e71d6292f2 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 16 Jun 2020 17:22:28 +0800 Subject: [PATCH 1029/1191] update From 79f4523a691c0d3b1a2de63467de7f3a17023628 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 16 Jun 2020 17:24:42 +0800 Subject: [PATCH 1030/1191] update From 7478d500cc5175a07795b186b423f3c12c76df75 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 16 Jun 2020 17:24:45 +0800 Subject: [PATCH 1031/1191] update From b22955174e6cc0f66da3422e632e7b5300eb7b7d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 16 Jun 2020 17:27:36 +0800 Subject: [PATCH 1032/1191] Update eval_script.js --- eval_script.js | 90 +++++++++++++++++++++++--------------------------- 1 file changed, 42 insertions(+), 48 deletions(-) diff --git a/eval_script.js b/eval_script.js index 113b2135b..8918268ac 100644 --- a/eval_script.js +++ b/eval_script.js @@ -2,27 +2,19 @@ const __conf = String.raw` [Remote] // custom remote... +https://raw.githubusercontent.com/yichahucha/surge/master/qx_sub.txt [Local] // custom local... - -# nf -http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js # jd -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -# tb -tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -# wb -http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +# ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js [Hostname] // custom hostname... -api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com +# api.m.jd.com + ` @@ -60,48 +52,18 @@ const __showLine = 15 const __log = false const __debug = false const __developmentMode = false -const __concurrencyLimit = 20 +const __concurrencyLimit = 15 const __cacheKey = "ScriptCacheKey" const __tool = new ____Tool() const __base64 = new ____Base64() if (__tool.isTask) { - const ____getConf = (() => { - return new Promise((resolve) => { - const remoteConf = ____removeAnnotation(____extractConf(__conf, "Remote")) - const localConf = ____removeAnnotation(____extractConf(__conf, "Local")) - const hostnameConf = ____parseHostname(____removeAnnotation(____extractConf(__conf, "Hostname"))) - if (remoteConf.length > 0) { - console.log("Start updating conf...") - if (__debug) __tool.notify("", "", `Start updating ${remoteConf.length} confs...`) - ____concurrentQueueLimit(remoteConf, __concurrencyLimit, (url) => { - return ____downloadFile(url) - }) - .then(results => { - console.log("Stop updating conf.") - let contents = [] - let hostnames = [] - results.forEach(data => { - const parseRemoteResult = ____parseRemoteConf(data.body) - if (data.body) { - contents = contents.concat(parseRemoteResult.contents) - hostnames = hostnames.concat(parseRemoteResult.hostnames) - } - }); - contents = localConf.concat(contents) - hostnames = hostnameConf.concat(hostnames) - resolve({ contents, hostnames, results }) - }) - } else { - resolve({ contents: localConf, hostnames: hostnameConf, results: [] }) - } - }) - }) const begin = new Date() const storeObj = {} + //get conf info (local remote) ____getConf() - //check + //check conf .then((conf) => { return new Promise((resolve, reject) => { if (conf.contents.length > 0) { @@ -118,7 +80,7 @@ if (__tool.isTask) { } }) }) - //parse + //parse conf .then((contents) => { return new Promise((resolve, reject) => { const parseResult = ____parseConf(contents) @@ -135,7 +97,7 @@ if (__tool.isTask) { } }) }) - //download + //download script .then((confMap) => { const scriptUrls = Object.keys(confMap) __tool.notify("", "", `Start updating ${scriptUrls.length} scripts...`) @@ -157,7 +119,7 @@ if (__tool.isTask) { }) }) }) - //write map + //write cache .then((scriptResults) => { console.log("Stop updating script.") storeObj["scriptResults"] = scriptResults @@ -380,6 +342,38 @@ async function ____updateGitHub(path, content, message) { return result } +function ____getConf() { + return new Promise((resolve) => { + const remoteConf = ____removeAnnotation(____extractConf(__conf, "Remote")) + const localConf = ____removeAnnotation(____extractConf(__conf, "Local")) + const hostnameConf = ____parseHostname(____removeAnnotation(____extractConf(__conf, "Hostname"))) + if (remoteConf.length > 0) { + console.log("Start updating conf...") + if (__debug) __tool.notify("", "", `Start updating ${remoteConf.length} confs...`) + ____concurrentQueueLimit(remoteConf, __concurrencyLimit, (url) => { + return ____downloadFile(url) + }) + .then(results => { + console.log("Stop updating conf.") + let contents = [] + let hostnames = [] + results.forEach(data => { + const parseRemoteResult = ____parseRemoteConf(data.body) + if (data.body) { + contents = contents.concat(parseRemoteResult.contents) + hostnames = hostnames.concat(parseRemoteResult.hostnames) + } + }); + contents = localConf.concat(contents) + hostnames = hostnameConf.concat(hostnames) + resolve({ contents, hostnames, results }) + }) + } else { + resolve({ contents: localConf, hostnames: hostnameConf, results: [] }) + } + }) +} + function ____parseDevelopmentModeConf(conf) { const localConf = ____removeAnnotation(____extractConf(__conf, "eval_local")) const result = ____parseConf(localConf) From dccc7ee36949726d02f71409ed4289dd7772c0dc Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 16 Jun 2020 17:37:38 +0800 Subject: [PATCH 1033/1191] update From 57a9557e00272f779a89cc6f34bfcd789924ff20 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 16 Jun 2020 17:37:41 +0800 Subject: [PATCH 1034/1191] update From c74949b8ff423cbd57c0bad15f816aeecf8f22da Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 16 Jun 2020 17:37:57 +0800 Subject: [PATCH 1035/1191] update From c46873698e533764b8cfee25e80531ee00211ac2 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 16 Jun 2020 17:38:01 +0800 Subject: [PATCH 1036/1191] update From 7d734e134d5f09917aa9fc27d9de191a73cb82e2 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 17 Jun 2020 18:27:27 +0800 Subject: [PATCH 1037/1191] update From 5fdec8d94e1a44a24af22c384eee10e6acb1b41a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 17 Jun 2020 18:27:56 +0800 Subject: [PATCH 1038/1191] update From 011b33f7bfb665537b1487b42389fb548158735b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 17 Jun 2020 20:44:18 +0800 Subject: [PATCH 1039/1191] update From 1fc8da96c9fbb1fc98865917e36602fa504e514a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 17 Jun 2020 20:44:21 +0800 Subject: [PATCH 1040/1191] update From c4144a58defc68938661dcebf0c2f69960177800 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 17 Jun 2020 22:30:35 +0800 Subject: [PATCH 1041/1191] update --- eval_script/qx_script.txt | 326 +++++++++++++++++++++++++++++++++++++- 1 file changed, 321 insertions(+), 5 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index a7bec5f8e..f3819fb0d 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -1,8 +1,322 @@ -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +hostname = 8.8.8.8,bea.sportq.com,api.meiyan.com,*.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,api.m.jd.com,ios.prod.ftl.netflix.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js + +^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad url script-response-body eval_script.js + +^https://api.zhihu.com/moments/recommend url script-response-body eval_script.js + +^https://api.zhihu.com/topstory/recommend url script-response-body eval_script.js + +https://api.zhihu.com/v4/questions url script-response-body eval_script.js + +^https://api.zhihu.com/people/ url script-response-body eval_script.js + +^https://api.zhihu.com/market/header url script-response-body eval_script.js + +https://app.bilibili.com/x/v2/space\?access_key url script-response-body eval_script.js + +https://app.bilibili.com/x/resource/show/tab\?access_key url script-response-body eval_script.js + +https://app.bilibili.com/x/v2/feed/index\?access_key url script-response-body eval_script.js + +https://app.bilibili.com/x/v2/view\?access_key url script-response-body eval_script.js + +https://api.bilibili.com/x/v2/reply/main\?access_key url script-response-body eval_script.js + +https://api.live.bilibili.com/xlive/app-room/v1/index/getInfoByRoom\?access_key url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/aweme\/post\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/feed\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/follow\/feed\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/nearby\/feed\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/search\/item\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/general\/search\/single\/ url script-response-body eval_script.js + +^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/hot\/search\/video\/list\/ url script-response-body eval_script.js + +^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice) url script-response-body eval_script.js + +https:\/\/.*\/getGlobalData url script-response-body eval_script.js + +^http(s)://api.bjxkhc.com/index.php/app/ios/(vod/show|(user|vod|topic|type)/index) url script-response-body eval_script.js + +^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json url script-response-body eval_script.js + +^https?:\/\/getuserinfo\.321mh\.com\/app_api\/v5\/getuserinfo\/ url script-response-body eval_script.js + +^https://getuserinfo-globalapi.zymk.cn/app_api/v5/(getuserinfo|coin_account|getuserinfo_ticket|getcomicinfo)/ url script-response-body eval_script.js + +https:\/\/ap(p|i)\.bilibili\.com\/((pgc\/player\/api\/playurl)|(x\/v2\/account\/myinfo\?)|(x\/v2\/account/mine\?)) url script-response-body eval_script.js + +^https?:\/\/vsco\.co\/api\/subscriptions\/2.1\/user-subscriptions\/ url script-response-body eval_script.js + +^https?:\/\/api\.vnision\.com\/v1\/(users\/|banners) url script-response-body eval_script.js + +^https?:\/\/.+\.(my10api|(.*91.*))\.(com|tips|app|xyz)(:\d{2,5})?\/api.php$ url script-response-body eval_script.js + +^https://sp\.kaola\.com/api/openad$ url script-response-body eval_script.js + +^https://r\.inews\.qq.com\/get(QQNewsUnreadList|RecommendList) url script-response-body eval_script.js + +^https?:\/\/.*\.(lago|fuli|xiang(jiao|xiang))apps\.com\/(ucp\/index|getGlobalData|.+\/reqplay\/) url script-response-body eval_script.js + +^https?:\/\/(i|newdrugs)\.dxy\.cn\/(snsapi\/username\/|app\/user\/(pro\/stat\?|init\?timestamp=)) url script-response-body eval_script.js + +^https?:\/\/(.+)\.(\w{2,3})(:?\d*)\/(api\/public\/\?service=Live\.checkLive$|public\/\/\?service=Live\.roomCharge$|lg\/video\/loadVideoFees\.do$) url script-response-body eval_script.js + +^https:\/\/www\.luqijianggushi\.com\/api\/v2\/user\/get url script-response-body eval_script.js + +^https://account.wps.*/api/users/ url script-response-body eval_script.js + +^https:\/\/api\.gyrosco\.pe\/v1\/account\/$ url script-response-body eval_script.js + +^https:\/\/api1\.dobenge\.cn\/api\/user\/getuserinfo url script-response-body eval_script.js + +^https:\/\/api\.mvmtv\.com\/index\.php.*(c=user.*a=info|a=addr.*vid=.*) url script-response-body eval_script.js + +^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user url script-response-body eval_script.js + +https:\/\/api\.termius\.com\/api\/v3\/bulk\/account\/ url script-response-body eval_script.js + +^https:\/\/viva\.v21xy\.com\/api\/rest\/u\/vip url script-response-body eval_script.js + +^https:\/\/biz\.caiyunapp\.com\/v2\/user\?app_name\=weather url script-response-body eval_script.js + +^https:\/\/api\.gotokeep\.com\/(.+\/subject|.+\/dynamic) url script-response-body eval_script.js + +^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\? url script-response-body eval_script.js + +^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) url script-response-body eval_script.js + +^https?:\/\/mp\.bybutter\.com\/mood\/(official-templates|privileges) url script-response-body eval_script.js + +^https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json url script-response-body eval_script.js + +^https:\/\/splice\.oracle\.\w+\.com\/devices\/me url script-response-body eval_script.js + +https:\/\/pan\.baidu\.com\/rest\/2\.0\/membership\/user url script-response-body eval_script.js + +^https?://.*\.snssdk\.com/bds/(feed/stream|comment/cell_reply|cell/cell_comment|cell/detail|ward/list|user/favorite|user/cell_coment|user/cell_userfeed|user/publish_list) url script-response-body eval_script.js + +^https:\/\/viva-asia1\.vvbrd\.com\/api\/rest\/u\/vip* url script-response-body eval_script.js + +^https:\/\/api\.unfold\.app\/v1\/ios\/receipts$ url script-response-body eval_script.js + +^https:\/\/graph\.nhaccuatui\.com\/.*\/users\/info* url script-response-body eval_script.js + +^https:\/\/api\.memrise\.com\/.+\/(me\/$|dashboard\/$|leaderboards\/following\/) url script-response-body eval_script.js + +^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user$ url script-response-body eval_script.js + +^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt$ url script-response-body eval_script.js + +^https:\/\/api\.sync\.me\/api\/purchases\/(report_purchases|get_purchases) url script-response-body eval_script.js + +^https:\/\/pool\.elsanow\.io\/user\/api\/v1\/purchase$ url script-response-body eval_script.js + +^https:\/\/lambda\.us-east-1\.amazonaws\.com/.*/functions\/prod-4-syncPurchases\/invocations$ url script-response-body eval_script.js + +^https:\/\/api\.mondlylanguages\.com\/v1\/ios\/user\/sync$ url script-response-body eval_script.js + +^https:\/\/api\.busuu\.com\/users\/me* url script-response-body eval_script.js + +^https:\/\/owa\.videoshowiosglobalserver\.com\/.*\/iosPayClient url script-response-body eval_script.js + +^https:\/\/accounts\.elevateapp\.net\/api\/users\?user%5Bauthentication_token* url script-response-body eval_script.js + +^https:\/\/api-intl\.mr\.meitu\.com/.*/subs_offer_elg$ url script-response-body eval_script.js + +^https:\/\/bmall\.camera360\.com\/api\/(iap\/check-receipt$|mix\/getinfo$) url script-response-body eval_script.js + +^https?:\/\/api\.tv\.zing\.vn\/.*/user* url script-response-body eval_script.js + +^https:\/\/api\.calm\.com\/me$ url script-response-body eval_script.js + +^https:\/\/photos\.adobe\.io\/v2\/accounts* url script-response-body eval_script.js + +^https:\/\/license\.pdfexpert\.com\/api\/1\.0\/pdfexpert6\/subscription\/(refresh$|check$) url script-response-body eval_script.js + +^https:\/\/subs\.platforms\.team\/.+\/apple\/verify$ url script-response-body eval_script.js + +^https:\/\/apic\.musixmatch\.com\/ws\/.*\/config\.get url script-response-body eval_script.js + +^https:\/\/api\.getmimo\.com\/v1\/subscriptions$ url script-response-body eval_script.js + +^https:\/\/api\.revenuecat\.com\/.+\/(receipts$|subscribers\/[a-zA-Z0-9_-]*$) url script-response-body eval_script.js + +^https:\/\/api\.lingokids\.com\/v1\/renovate_session$ url script-response-body eval_script.js + +^https:\/\/www\.peacefulsoundsapp\.com\/api\/v1\/init$ url script-response-body eval_script.js + +^https:\/\/duolingo-leaderboards-prod\.duolingo\.com\/leaderboards* url script-response-body eval_script.js + +^https:\/\/commerce-i18n-api\.faceu\.mobi\/commerce\/v1\/subscription\/user_info$ url script-response-body eval_script.js + +^https:\/\/api\.global\.mp3\.zing\.vn\/1\.0\/getUserInfo\?data=* url script-response-body eval_script.js + +^https:\/\/api\.blinkist\.com\/v4\/(me$|me.json$|me\/access$) url script-response-body eval_script.js + +^https:\/\/api\.sololearn\.com\/(Profile\/GetProfile$|authenticateDevice$) url script-response-body eval_script.js + +^https:\/\/api-kinemaster-assetstore\.(nexstreaming|kinemasters)\.com\/.*\/product\/verifyReceipt$ url script-response-body eval_script.js + +^https:\/\/api\.pushover\.net\/1\/messages\.json* url script-response-body eval_script.js + +^https:\/\/api\.overhq\.com\/(user\/token\/refresh$|subscription\/verifyReceipt$) url script-response-body eval_script.js + +^https:\/\/receipt-validator\.herewetest\.com\/apple\/verifyTransaction$ url script-response-body eval_script.js + +^https:\/\/license\.pdfexpert\.com\/api\/.*\/documents\/subscription\/(refresh$|check$) url script-response-body eval_script.js + +^https:\/\/education\.github\.com\/api\/user$ url script-response-body eval_script.js + +^https:\/\/backend\.getdrafts\.com\/api\/.*\/verification* url script-response-body eval_script.js + +^https:\/\/lcs-mobile-cops\.adobe\.io\/mobile_profile url script-response-body eval_script.js + +^https:\/\/ssl-api\.itranslateapp\.com\/.*\/subscriptions\/.*\/ios$ url script-response-body eval_script.js + +^https:\/\/sk\.ulysses\.app\/api\/v1\/itunes_receipt_verify$ url script-response-body eval_script.js + +^https:\/\/dayone\.me\/api\/(users|v2\/users\/account-status)$ url script-response-body eval_script.js + +^https:\/\/api-production\.endel\.io\/.*\/user$ url script-response-body eval_script.js + +^https:\/\/api\.shred\.app\/verifyReceipt$ url script-response-body eval_script.js + +^https:\/\/subscription\.grammarly\.com\/api\/v1$ url script-response-body eval_script.js + +^https:\/\/planner5d\.com\/api\/sets url script-response-body eval_script.js + +^https:\/\/secure\.istreamer\.com\/backend$ url script-response-body eval_script.js + +^https:\/\/www\.api\.monkeyuni\.net\/api\/.+\/mobile\/account\/load-update url script-response-body eval_script.js + +^https:\/\/api\.textnow\.me\/api2.0\/users\/.* url script-response-body eval_script.js + +^https:\/\/vipapi\.jxedt\.com\/vip\/check url script-response-body eval_script.js + +^https:\/\/api\.interpreter\.caiyunai\.com\/v1\/user url script-response-body eval_script.js + +^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt url script-response-body eval_script.js + +^https:\/\/pocketlists\.com\/api\/v1\/pocketlists.me.get url script-response-body eval_script.js + +https:\/\/book\.haitunwallet\.com\/app\/vip\/status url script-response-body eval_script.js + +https:\/\/mubu\.com\/api\/app\/user\/info url script-response-body eval_script.js + +^https:\/\/app\.xunjiepdf\.com\/api\/v4\/virtualactregister url script-response-body eval_script.js + +http:\/\/miaow\.yiyongcad\.com\/api\/v4\/memprofile url script-response-body eval_script.js + +https:\/\/api\.lennou\.com\/user\/info url script-response-body eval_script.js + +^https:\/\/api\.gkocr\.com\/api\/userlogin1.php url script-response-body eval_script.js + +^https?:\/\/vira\.llsapp\.com\/api\/v2\/readings\/(accessible|limitation) url script-response-body eval_script.js + +^https:\/\/api\.rr\.tv(\/user\/privilege\/list|\/ad\/getAll|\/rrtv-video\/v4plus\/season\/detail) url script-response-body eval_script.js + +^https?:\/\/pan\.baidu\.com\/s\/ url script-response-body eval_script.js + +^https:\/\/api\.revenuecat\.com\/v1\/(receipts|\d{1,})$ url script-response-body eval_script.js + +https://(commerce-.*api|pay).(faceu|wecut).(com|mobi)/(commerce|apple)/(iosAppVerifyReceipt.php|v1/subscription/user_info) url script-response-body eval_script.js + +^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/theme) url script-response-body eval_script.js + +^http:\/\/115\.com\/lx.*$ url script-response-body eval_script.js + +^https:\/\/api\.lakecoloring\.com\/v1\/receipt url script-response-body eval_script.js + +^http://ctrl.playcvn.com/app/(init|ads) url script-response-body eval_script.js + +^https:\/\/dict\.eudic\.net\/jingting\/GetThisChapterTaskStatus? url script-response-body eval_script.js + +^https?://m.client.10010.com/uniAdmsInterface/getHomePageAd url script-response-body eval_script.js + +^https:\/\/api\.wakamoment\.ga\/init\?platform\=ios url script-response-body eval_script.js + +^https:\/\/api\.diyidan\.net\/v0\.3\/(user\/personal_homepage|vip_user\/info|tv_series\/index\?appChanne) url script-response-body eval_script.js + +^https:\/\/api\.flexibits\.com\/v1\/(auth|account)\/(device|details|appstore-receipt)\/$ url script-response-body eval_script.js + +https?:\/\/api\.jiaonizuocai\.com url script-response-body eval_script.js + +https:\/\/api\.sololearn\.com\/(authenticateDevice|challenge\/GetContestFeed|Profile\/GetProfile)$ url script-response-body eval_script.js + +^https://tncj.hortorgames.com/chicken/fight/(answer|findQuiz) url script-response-body eval_script.js + +^https:\/\/(www\.baidu.com2\.club|ayk\.tmdidi\.com|m\.pearkin\.com|souhu\.mett\.me|bkcd\.b-cdn\.net)\/(api\/movie\/WatchMovie|api\/Account\/CheckVip|api\/account\/IndexDetail) url script-response-body eval_script.js + +^https:\/\/claritywallpaper\.com\/clarity\/api\/(userInfo|special\/queryByCatalogAll) url script-response-body eval_script.js + +https:\/\/bookapi\.ihuman\.com\/(v1\/get\_user\_info|v1\/get\_purchase\_list) url script-response-body eval_script.js + +http:\/\/rest\.zhibo\.tv\/room\/get\-room\-info\-v430 url script-response-body eval_script.js + +https://note.youdao.com/yws/(mapi/payment|api/self) url script-response-body eval_script.js + +^https:\/\/billing\.peakcloud\.org\/billing\/2\/user\/me? url script-response-body eval_script.js + +^https?:\/\/api\.ithome\.com\/json\/slide\/index url script-response-body eval_script.js + +^https?:\/\/api\.ithome\.com\/json\/(newslist|listpage)\/news url script-response-body eval_script.js + +https:\/\/www\.xmind\.cn\/\_res\/devices url script-response-body eval_script.js + +^http?:\/\/.*\.arten.cn/login/login url script-response-body eval_script.js + +^https://api.weiqire.com/api3/(visitor/|user/unlockCharpter) url script-response-body eval_script.js + +https://api.shimo.im/users/ url script-response-body eval_script.js + +^https?:\/\/.*\.videostarapp\.com\/scripts\/subsNew\.php url script-response-body eval_script.js + +https:\/\/api\.revenuecat\.com\/v1\/(subscribers|receipts) url script-response-body eval_script.js + +https://app.api.versa-ai.com/pay/order/iap/check url script-response-body eval_script.js + +^https\:\/\/hjapi\.bjxkhc\.com\/v2d2\/users\/.*\/member url script-response-body eval_script.js + +http:\/\/api\.591master\.com\:8081\/(1.0|3.6.8)\/ui(forum|common)\/(downloadwallpaper|getuser) url script-response-body eval_script.js + +^http\:\/\/jdytv\.cn\/login\/login\/veifys url script-response-body eval_script.js + +http://user.shywck.com/user/userinfo url script-response-body eval_script.js + +^https?:\/\/.*\.xunjie.*\.com\/api\/v\d\/* url script-response-body eval_script.js + +^https:\/\/api\.psy-1\.com\/cosleep\/user\/info url script-response-body eval_script.js + +^https:\/\/snailsleep\.net\/snail\/v1\/profile\/get url script-response-body eval_script.js + +^https:\/\/mob2015\.kekenet\.com\/keke\/mobile\/index\.php url script-response-body eval_script.js + +^https:\/\/m\.samh\.xndm\.tech\/userapi\/info\/v1\/getuserinfo url script-response-body eval_script.js + +^http\:\/\/app\.flashdown365\.com\/ios\/login url script-response-body eval_script.js + +^https:\/\/avoscloud\.com\/1\.1\/users\/ url script-response-body eval_script.js + +^https\:\/\/pwaapi\.gao1gps\.cn\/v1\/user\/info url script-response-body eval_script.js + +^https:\/\/api\.meiyan\.com\/iap\/verify\.json url script-response-body eval_script.js + +^https:\/\/bea\.sportq\.com\/SFitWeb\/sfit\/getUserBaseInfo url script-response-body eval_script.js + +^https://8.8.8.8/api url script-request-body eval_script.js + +^https://8.8.8.8/(home|app|log\/) url script-response-body eval_script.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js @@ -10,6 +324,8 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,ap ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file +^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath url script-response-body eval_script.js \ No newline at end of file From cc59c01d9472e9003fd54c4fe1eeeac326781d77 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 17 Jun 2020 22:30:38 +0800 Subject: [PATCH 1042/1191] update --- eval_script/sg_script.sgmodule | 326 ++++++++++++++++++++++++++++++++- 1 file changed, 321 insertions(+), 5 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index 39b0e6ebe..8c4787ed9 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -1,12 +1,326 @@ #!name=eval_script.js module [MITM] -hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +hostname = %INSERT% 8.8.8.8,bea.sportq.com,api.meiyan.com,*.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,api.m.jd.com,ios.prod.ftl.netflix.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me [Script] -eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/moments/recommend,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/topstory/recommend,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://api.zhihu.com/v4/questions,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/people/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/market/header,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/space\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/resource/show/tab\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/feed/index\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/view\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://api.bilibili.com/x/v2/reply/main\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://api.live.bilibili.com/xlive/app-room/v1/index/getInfoByRoom\?access_key,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/aweme\/post\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/feed\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/follow\/feed\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/nearby\/feed\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/search\/item\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/general\/search\/single\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/hot\/search\/video\/list\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/.*\/getGlobalData,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http(s)://api.bjxkhc.com/index.php/app/ios/(vod/show|(user|vod|topic|type)/index),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/getuserinfo\.321mh\.com\/app_api\/v5\/getuserinfo\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://getuserinfo-globalapi.zymk.cn/app_api/v5/(getuserinfo|coin_account|getuserinfo_ticket|getcomicinfo)/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/ap(p|i)\.bilibili\.com\/((pgc\/player\/api\/playurl)|(x\/v2\/account\/myinfo\?)|(x\/v2\/account/mine\?)),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vsco\.co\/api\/subscriptions\/2.1\/user-subscriptions\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.vnision\.com\/v1\/(users\/|banners),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.+\.(my10api|(.*91.*))\.(com|tips|app|xyz)(:\d{2,5})?\/api.php$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://sp\.kaola\.com/api/openad$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://r\.inews\.qq.com\/get(QQNewsUnreadList|RecommendList),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.(lago|fuli|xiang(jiao|xiang))apps\.com\/(ucp\/index|getGlobalData|.+\/reqplay\/),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/(i|newdrugs)\.dxy\.cn\/(snsapi\/username\/|app\/user\/(pro\/stat\?|init\?timestamp=)),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/(.+)\.(\w{2,3})(:?\d*)\/(api\/public\/\?service=Live\.checkLive$|public\/\/\?service=Live\.roomCharge$|lg\/video\/loadVideoFees\.do$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.luqijianggushi\.com\/api\/v2\/user\/get,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://account.wps.*/api/users/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gyrosco\.pe\/v1\/account\/$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api1\.dobenge\.cn\/api\/user\/getuserinfo,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.mvmtv\.com\/index\.php.*(c=user.*a=info|a=addr.*vid=.*),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.termius\.com\/api\/v3\/bulk\/account\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/viva\.v21xy\.com\/api\/rest\/u\/vip,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/biz\.caiyunapp\.com\/v2\/user\?app_name\=weather,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gotokeep\.com\/(.+\/subject|.+\/dynamic),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\?,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/mp\.bybutter\.com\/mood\/(official-templates|privileges),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/splice\.oracle\.\w+\.com\/devices\/me,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/pan\.baidu\.com\/rest\/2\.0\/membership\/user,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://.*\.snssdk\.com/bds/(feed/stream|comment/cell_reply|cell/cell_comment|cell/detail|ward/list|user/favorite|user/cell_coment|user/cell_userfeed|user/publish_list),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/viva-asia1\.vvbrd\.com\/api\/rest\/u\/vip*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.unfold\.app\/v1\/ios\/receipts$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/graph\.nhaccuatui\.com\/.*\/users\/info*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.memrise\.com\/.+\/(me\/$|dashboard\/$|leaderboards\/following\/),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.sync\.me\/api\/purchases\/(report_purchases|get_purchases),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/pool\.elsanow\.io\/user\/api\/v1\/purchase$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/lambda\.us-east-1\.amazonaws\.com/.*/functions\/prod-4-syncPurchases\/invocations$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.mondlylanguages\.com\/v1\/ios\/user\/sync$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.busuu\.com\/users\/me*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/owa\.videoshowiosglobalserver\.com\/.*\/iosPayClient,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/accounts\.elevateapp\.net\/api\/users\?user%5Bauthentication_token*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-intl\.mr\.meitu\.com/.*/subs_offer_elg$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/bmall\.camera360\.com\/api\/(iap\/check-receipt$|mix\/getinfo$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.tv\.zing\.vn\/.*/user*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.calm\.com\/me$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/photos\.adobe\.io\/v2\/accounts*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/license\.pdfexpert\.com\/api\/1\.0\/pdfexpert6\/subscription\/(refresh$|check$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/subs\.platforms\.team\/.+\/apple\/verify$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/apic\.musixmatch\.com\/ws\/.*\/config\.get,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.getmimo\.com\/v1\/subscriptions$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.revenuecat\.com\/.+\/(receipts$|subscribers\/[a-zA-Z0-9_-]*$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.lingokids\.com\/v1\/renovate_session$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.peacefulsoundsapp\.com\/api\/v1\/init$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/duolingo-leaderboards-prod\.duolingo\.com\/leaderboards*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/commerce-i18n-api\.faceu\.mobi\/commerce\/v1\/subscription\/user_info$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.global\.mp3\.zing\.vn\/1\.0\/getUserInfo\?data=*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.blinkist\.com\/v4\/(me$|me.json$|me\/access$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.sololearn\.com\/(Profile\/GetProfile$|authenticateDevice$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-kinemaster-assetstore\.(nexstreaming|kinemasters)\.com\/.*\/product\/verifyReceipt$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.pushover\.net\/1\/messages\.json*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.overhq\.com\/(user\/token\/refresh$|subscription\/verifyReceipt$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/receipt-validator\.herewetest\.com\/apple\/verifyTransaction$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/license\.pdfexpert\.com\/api\/.*\/documents\/subscription\/(refresh$|check$),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/education\.github\.com\/api\/user$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/backend\.getdrafts\.com\/api\/.*\/verification*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/lcs-mobile-cops\.adobe\.io\/mobile_profile,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/ssl-api\.itranslateapp\.com\/.*\/subscriptions\/.*\/ios$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/sk\.ulysses\.app\/api\/v1\/itunes_receipt_verify$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/dayone\.me\/api\/(users|v2\/users\/account-status)$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-production\.endel\.io\/.*\/user$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.shred\.app\/verifyReceipt$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/subscription\.grammarly\.com\/api\/v1$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/planner5d\.com\/api\/sets,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/secure\.istreamer\.com\/backend$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.api\.monkeyuni\.net\/api\/.+\/mobile\/account\/load-update,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.textnow\.me\/api2.0\/users\/.*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/vipapi\.jxedt\.com\/vip\/check,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.interpreter\.caiyunai\.com\/v1\/user,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/pocketlists\.com\/api\/v1\/pocketlists.me.get,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/book\.haitunwallet\.com\/app\/vip\/status,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/mubu\.com\/api\/app\/user\/info,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/app\.xunjiepdf\.com\/api\/v4\/virtualactregister,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/miaow\.yiyongcad\.com\/api\/v4\/memprofile,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.lennou\.com\/user\/info,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gkocr\.com\/api\/userlogin1.php,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vira\.llsapp\.com\/api\/v2\/readings\/(accessible|limitation),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.rr\.tv(\/user\/privilege\/list|\/ad\/getAll|\/rrtv-video\/v4plus\/season\/detail),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/pan\.baidu\.com\/s\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.revenuecat\.com\/v1\/(receipts|\d{1,})$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://(commerce-.*api|pay).(faceu|wecut).(com|mobi)/(commerce|apple)/(iosAppVerifyReceipt.php|v1/subscription/user_info),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/theme),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http:\/\/115\.com\/lx.*$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.lakecoloring\.com\/v1\/receipt,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http://ctrl.playcvn.com/app/(init|ads),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/dict\.eudic\.net\/jingting\/GetThisChapterTaskStatus?,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m.client.10010.com/uniAdmsInterface/getHomePageAd,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.wakamoment\.ga\/init\?platform\=ios,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.diyidan\.net\/v0\.3\/(user\/personal_homepage|vip_user\/info|tv_series\/index\?appChanne),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.flexibits\.com\/v1\/(auth|account)\/(device|details|appstore-receipt)\/$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https?:\/\/api\.jiaonizuocai\.com,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.sololearn\.com\/(authenticateDevice|challenge\/GetContestFeed|Profile\/GetProfile)$,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://tncj.hortorgames.com/chicken/fight/(answer|findQuiz),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/(www\.baidu.com2\.club|ayk\.tmdidi\.com|m\.pearkin\.com|souhu\.mett\.me|bkcd\.b-cdn\.net)\/(api\/movie\/WatchMovie|api\/Account\/CheckVip|api\/account\/IndexDetail),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/claritywallpaper\.com\/clarity\/api\/(userInfo|special\/queryByCatalogAll),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/bookapi\.ihuman\.com\/(v1\/get\_user\_info|v1\/get\_purchase\_list),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/rest\.zhibo\.tv\/room\/get\-room\-info\-v430,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://note.youdao.com/yws/(mapi/payment|api/self),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/billing\.peakcloud\.org\/billing\/2\/user\/me?,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.ithome\.com\/json\/slide\/index,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.ithome\.com\/json\/(newslist|listpage)\/news,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/www\.xmind\.cn\/\_res\/devices,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http?:\/\/.*\.arten.cn/login/login,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://api.weiqire.com/api3/(visitor/|user/unlockCharpter),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://api.shimo.im/users/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.videostarapp\.com\/scripts\/subsNew\.php,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.revenuecat\.com\/v1\/(subscribers|receipts),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=https://app.api.versa-ai.com/pay/order/iap/check,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https\:\/\/hjapi\.bjxkhc\.com\/v2d2\/users\/.*\/member,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/api\.591master\.com\:8081\/(1.0|3.6.8)\/ui(forum|common)\/(downloadwallpaper|getuser),script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http\:\/\/jdytv\.cn\/login\/login\/veifys,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=http://user.shywck.com/user/userinfo,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.xunjie.*\.com\/api\/v\d\/*,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.psy-1\.com\/cosleep\/user\/info,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/snailsleep\.net\/snail\/v1\/profile\/get,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/mob2015\.kekenet\.com\/keke\/mobile\/index\.php,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/m\.samh\.xndm\.tech\/userapi\/info\/v1\/getuserinfo,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^http\:\/\/app\.flashdown365\.com\/ios\/login,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/avoscloud\.com\/1\.1\/users\/,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https\:\/\/pwaapi\.gao1gps\.cn\/v1\/user\/info,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.meiyan\.com\/iap\/verify\.json,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/bea\.sportq\.com\/SFitWeb\/sfit\/getUserBaseInfo,script-path=eval_script.js + +eval_script.js = type=http-request,requires-body=1,pattern=^https://8.8.8.8/api,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https://8.8.8.8/(home|app|log\/),script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js @@ -14,6 +328,8 @@ eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobil eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js + +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,script-path=eval_script.js \ No newline at end of file From cec2ab7eedfa2c6fcf764353eb48227f2872d1e2 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 09:33:14 +0800 Subject: [PATCH 1043/1191] update --- eval_script/qx_script.txt | 326 +------------------------------------- 1 file changed, 5 insertions(+), 321 deletions(-) diff --git a/eval_script/qx_script.txt b/eval_script/qx_script.txt index f3819fb0d..a7bec5f8e 100644 --- a/eval_script/qx_script.txt +++ b/eval_script/qx_script.txt @@ -1,322 +1,8 @@ -hostname = 8.8.8.8,bea.sportq.com,api.meiyan.com,*.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,api.m.jd.com,ios.prod.ftl.netflix.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js - -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js - -^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad url script-response-body eval_script.js - -^https://api.zhihu.com/moments/recommend url script-response-body eval_script.js - -^https://api.zhihu.com/topstory/recommend url script-response-body eval_script.js - -https://api.zhihu.com/v4/questions url script-response-body eval_script.js - -^https://api.zhihu.com/people/ url script-response-body eval_script.js - -^https://api.zhihu.com/market/header url script-response-body eval_script.js - -https://app.bilibili.com/x/v2/space\?access_key url script-response-body eval_script.js - -https://app.bilibili.com/x/resource/show/tab\?access_key url script-response-body eval_script.js - -https://app.bilibili.com/x/v2/feed/index\?access_key url script-response-body eval_script.js - -https://app.bilibili.com/x/v2/view\?access_key url script-response-body eval_script.js - -https://api.bilibili.com/x/v2/reply/main\?access_key url script-response-body eval_script.js - -https://api.live.bilibili.com/xlive/app-room/v1/index/getInfoByRoom\?access_key url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/aweme\/post\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/feed\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/follow\/feed\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/nearby\/feed\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/search\/item\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/general\/search\/single\/ url script-response-body eval_script.js - -^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/hot\/search\/video\/list\/ url script-response-body eval_script.js - -^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice) url script-response-body eval_script.js - -https:\/\/.*\/getGlobalData url script-response-body eval_script.js - -^http(s)://api.bjxkhc.com/index.php/app/ios/(vod/show|(user|vod|topic|type)/index) url script-response-body eval_script.js - -^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json url script-response-body eval_script.js - -^https?:\/\/getuserinfo\.321mh\.com\/app_api\/v5\/getuserinfo\/ url script-response-body eval_script.js - -^https://getuserinfo-globalapi.zymk.cn/app_api/v5/(getuserinfo|coin_account|getuserinfo_ticket|getcomicinfo)/ url script-response-body eval_script.js - -https:\/\/ap(p|i)\.bilibili\.com\/((pgc\/player\/api\/playurl)|(x\/v2\/account\/myinfo\?)|(x\/v2\/account/mine\?)) url script-response-body eval_script.js - -^https?:\/\/vsco\.co\/api\/subscriptions\/2.1\/user-subscriptions\/ url script-response-body eval_script.js - -^https?:\/\/api\.vnision\.com\/v1\/(users\/|banners) url script-response-body eval_script.js - -^https?:\/\/.+\.(my10api|(.*91.*))\.(com|tips|app|xyz)(:\d{2,5})?\/api.php$ url script-response-body eval_script.js - -^https://sp\.kaola\.com/api/openad$ url script-response-body eval_script.js - -^https://r\.inews\.qq.com\/get(QQNewsUnreadList|RecommendList) url script-response-body eval_script.js - -^https?:\/\/.*\.(lago|fuli|xiang(jiao|xiang))apps\.com\/(ucp\/index|getGlobalData|.+\/reqplay\/) url script-response-body eval_script.js - -^https?:\/\/(i|newdrugs)\.dxy\.cn\/(snsapi\/username\/|app\/user\/(pro\/stat\?|init\?timestamp=)) url script-response-body eval_script.js - -^https?:\/\/(.+)\.(\w{2,3})(:?\d*)\/(api\/public\/\?service=Live\.checkLive$|public\/\/\?service=Live\.roomCharge$|lg\/video\/loadVideoFees\.do$) url script-response-body eval_script.js - -^https:\/\/www\.luqijianggushi\.com\/api\/v2\/user\/get url script-response-body eval_script.js - -^https://account.wps.*/api/users/ url script-response-body eval_script.js - -^https:\/\/api\.gyrosco\.pe\/v1\/account\/$ url script-response-body eval_script.js - -^https:\/\/api1\.dobenge\.cn\/api\/user\/getuserinfo url script-response-body eval_script.js - -^https:\/\/api\.mvmtv\.com\/index\.php.*(c=user.*a=info|a=addr.*vid=.*) url script-response-body eval_script.js - -^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user url script-response-body eval_script.js - -https:\/\/api\.termius\.com\/api\/v3\/bulk\/account\/ url script-response-body eval_script.js - -^https:\/\/viva\.v21xy\.com\/api\/rest\/u\/vip url script-response-body eval_script.js - -^https:\/\/biz\.caiyunapp\.com\/v2\/user\?app_name\=weather url script-response-body eval_script.js - -^https:\/\/api\.gotokeep\.com\/(.+\/subject|.+\/dynamic) url script-response-body eval_script.js - -^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\? url script-response-body eval_script.js - -^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) url script-response-body eval_script.js - -^https?:\/\/mp\.bybutter\.com\/mood\/(official-templates|privileges) url script-response-body eval_script.js - -^https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json url script-response-body eval_script.js - -^https:\/\/splice\.oracle\.\w+\.com\/devices\/me url script-response-body eval_script.js - -https:\/\/pan\.baidu\.com\/rest\/2\.0\/membership\/user url script-response-body eval_script.js - -^https?://.*\.snssdk\.com/bds/(feed/stream|comment/cell_reply|cell/cell_comment|cell/detail|ward/list|user/favorite|user/cell_coment|user/cell_userfeed|user/publish_list) url script-response-body eval_script.js - -^https:\/\/viva-asia1\.vvbrd\.com\/api\/rest\/u\/vip* url script-response-body eval_script.js - -^https:\/\/api\.unfold\.app\/v1\/ios\/receipts$ url script-response-body eval_script.js - -^https:\/\/graph\.nhaccuatui\.com\/.*\/users\/info* url script-response-body eval_script.js - -^https:\/\/api\.memrise\.com\/.+\/(me\/$|dashboard\/$|leaderboards\/following\/) url script-response-body eval_script.js - -^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user$ url script-response-body eval_script.js - -^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt$ url script-response-body eval_script.js - -^https:\/\/api\.sync\.me\/api\/purchases\/(report_purchases|get_purchases) url script-response-body eval_script.js - -^https:\/\/pool\.elsanow\.io\/user\/api\/v1\/purchase$ url script-response-body eval_script.js - -^https:\/\/lambda\.us-east-1\.amazonaws\.com/.*/functions\/prod-4-syncPurchases\/invocations$ url script-response-body eval_script.js - -^https:\/\/api\.mondlylanguages\.com\/v1\/ios\/user\/sync$ url script-response-body eval_script.js - -^https:\/\/api\.busuu\.com\/users\/me* url script-response-body eval_script.js - -^https:\/\/owa\.videoshowiosglobalserver\.com\/.*\/iosPayClient url script-response-body eval_script.js - -^https:\/\/accounts\.elevateapp\.net\/api\/users\?user%5Bauthentication_token* url script-response-body eval_script.js - -^https:\/\/api-intl\.mr\.meitu\.com/.*/subs_offer_elg$ url script-response-body eval_script.js - -^https:\/\/bmall\.camera360\.com\/api\/(iap\/check-receipt$|mix\/getinfo$) url script-response-body eval_script.js - -^https?:\/\/api\.tv\.zing\.vn\/.*/user* url script-response-body eval_script.js - -^https:\/\/api\.calm\.com\/me$ url script-response-body eval_script.js - -^https:\/\/photos\.adobe\.io\/v2\/accounts* url script-response-body eval_script.js - -^https:\/\/license\.pdfexpert\.com\/api\/1\.0\/pdfexpert6\/subscription\/(refresh$|check$) url script-response-body eval_script.js - -^https:\/\/subs\.platforms\.team\/.+\/apple\/verify$ url script-response-body eval_script.js - -^https:\/\/apic\.musixmatch\.com\/ws\/.*\/config\.get url script-response-body eval_script.js - -^https:\/\/api\.getmimo\.com\/v1\/subscriptions$ url script-response-body eval_script.js - -^https:\/\/api\.revenuecat\.com\/.+\/(receipts$|subscribers\/[a-zA-Z0-9_-]*$) url script-response-body eval_script.js - -^https:\/\/api\.lingokids\.com\/v1\/renovate_session$ url script-response-body eval_script.js - -^https:\/\/www\.peacefulsoundsapp\.com\/api\/v1\/init$ url script-response-body eval_script.js - -^https:\/\/duolingo-leaderboards-prod\.duolingo\.com\/leaderboards* url script-response-body eval_script.js - -^https:\/\/commerce-i18n-api\.faceu\.mobi\/commerce\/v1\/subscription\/user_info$ url script-response-body eval_script.js - -^https:\/\/api\.global\.mp3\.zing\.vn\/1\.0\/getUserInfo\?data=* url script-response-body eval_script.js - -^https:\/\/api\.blinkist\.com\/v4\/(me$|me.json$|me\/access$) url script-response-body eval_script.js - -^https:\/\/api\.sololearn\.com\/(Profile\/GetProfile$|authenticateDevice$) url script-response-body eval_script.js - -^https:\/\/api-kinemaster-assetstore\.(nexstreaming|kinemasters)\.com\/.*\/product\/verifyReceipt$ url script-response-body eval_script.js - -^https:\/\/api\.pushover\.net\/1\/messages\.json* url script-response-body eval_script.js - -^https:\/\/api\.overhq\.com\/(user\/token\/refresh$|subscription\/verifyReceipt$) url script-response-body eval_script.js - -^https:\/\/receipt-validator\.herewetest\.com\/apple\/verifyTransaction$ url script-response-body eval_script.js - -^https:\/\/license\.pdfexpert\.com\/api\/.*\/documents\/subscription\/(refresh$|check$) url script-response-body eval_script.js - -^https:\/\/education\.github\.com\/api\/user$ url script-response-body eval_script.js - -^https:\/\/backend\.getdrafts\.com\/api\/.*\/verification* url script-response-body eval_script.js - -^https:\/\/lcs-mobile-cops\.adobe\.io\/mobile_profile url script-response-body eval_script.js - -^https:\/\/ssl-api\.itranslateapp\.com\/.*\/subscriptions\/.*\/ios$ url script-response-body eval_script.js - -^https:\/\/sk\.ulysses\.app\/api\/v1\/itunes_receipt_verify$ url script-response-body eval_script.js - -^https:\/\/dayone\.me\/api\/(users|v2\/users\/account-status)$ url script-response-body eval_script.js - -^https:\/\/api-production\.endel\.io\/.*\/user$ url script-response-body eval_script.js - -^https:\/\/api\.shred\.app\/verifyReceipt$ url script-response-body eval_script.js - -^https:\/\/subscription\.grammarly\.com\/api\/v1$ url script-response-body eval_script.js - -^https:\/\/planner5d\.com\/api\/sets url script-response-body eval_script.js - -^https:\/\/secure\.istreamer\.com\/backend$ url script-response-body eval_script.js - -^https:\/\/www\.api\.monkeyuni\.net\/api\/.+\/mobile\/account\/load-update url script-response-body eval_script.js - -^https:\/\/api\.textnow\.me\/api2.0\/users\/.* url script-response-body eval_script.js - -^https:\/\/vipapi\.jxedt\.com\/vip\/check url script-response-body eval_script.js - -^https:\/\/api\.interpreter\.caiyunai\.com\/v1\/user url script-response-body eval_script.js - -^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt url script-response-body eval_script.js - -^https:\/\/pocketlists\.com\/api\/v1\/pocketlists.me.get url script-response-body eval_script.js - -https:\/\/book\.haitunwallet\.com\/app\/vip\/status url script-response-body eval_script.js - -https:\/\/mubu\.com\/api\/app\/user\/info url script-response-body eval_script.js - -^https:\/\/app\.xunjiepdf\.com\/api\/v4\/virtualactregister url script-response-body eval_script.js - -http:\/\/miaow\.yiyongcad\.com\/api\/v4\/memprofile url script-response-body eval_script.js - -https:\/\/api\.lennou\.com\/user\/info url script-response-body eval_script.js - -^https:\/\/api\.gkocr\.com\/api\/userlogin1.php url script-response-body eval_script.js - -^https?:\/\/vira\.llsapp\.com\/api\/v2\/readings\/(accessible|limitation) url script-response-body eval_script.js - -^https:\/\/api\.rr\.tv(\/user\/privilege\/list|\/ad\/getAll|\/rrtv-video\/v4plus\/season\/detail) url script-response-body eval_script.js - -^https?:\/\/pan\.baidu\.com\/s\/ url script-response-body eval_script.js - -^https:\/\/api\.revenuecat\.com\/v1\/(receipts|\d{1,})$ url script-response-body eval_script.js - -https://(commerce-.*api|pay).(faceu|wecut).(com|mobi)/(commerce|apple)/(iosAppVerifyReceipt.php|v1/subscription/user_info) url script-response-body eval_script.js - -^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/theme) url script-response-body eval_script.js - -^http:\/\/115\.com\/lx.*$ url script-response-body eval_script.js - -^https:\/\/api\.lakecoloring\.com\/v1\/receipt url script-response-body eval_script.js - -^http://ctrl.playcvn.com/app/(init|ads) url script-response-body eval_script.js - -^https:\/\/dict\.eudic\.net\/jingting\/GetThisChapterTaskStatus? url script-response-body eval_script.js - -^https?://m.client.10010.com/uniAdmsInterface/getHomePageAd url script-response-body eval_script.js - -^https:\/\/api\.wakamoment\.ga\/init\?platform\=ios url script-response-body eval_script.js - -^https:\/\/api\.diyidan\.net\/v0\.3\/(user\/personal_homepage|vip_user\/info|tv_series\/index\?appChanne) url script-response-body eval_script.js - -^https:\/\/api\.flexibits\.com\/v1\/(auth|account)\/(device|details|appstore-receipt)\/$ url script-response-body eval_script.js - -https?:\/\/api\.jiaonizuocai\.com url script-response-body eval_script.js - -https:\/\/api\.sololearn\.com\/(authenticateDevice|challenge\/GetContestFeed|Profile\/GetProfile)$ url script-response-body eval_script.js - -^https://tncj.hortorgames.com/chicken/fight/(answer|findQuiz) url script-response-body eval_script.js - -^https:\/\/(www\.baidu.com2\.club|ayk\.tmdidi\.com|m\.pearkin\.com|souhu\.mett\.me|bkcd\.b-cdn\.net)\/(api\/movie\/WatchMovie|api\/Account\/CheckVip|api\/account\/IndexDetail) url script-response-body eval_script.js - -^https:\/\/claritywallpaper\.com\/clarity\/api\/(userInfo|special\/queryByCatalogAll) url script-response-body eval_script.js - -https:\/\/bookapi\.ihuman\.com\/(v1\/get\_user\_info|v1\/get\_purchase\_list) url script-response-body eval_script.js - -http:\/\/rest\.zhibo\.tv\/room\/get\-room\-info\-v430 url script-response-body eval_script.js - -https://note.youdao.com/yws/(mapi/payment|api/self) url script-response-body eval_script.js - -^https:\/\/billing\.peakcloud\.org\/billing\/2\/user\/me? url script-response-body eval_script.js - -^https?:\/\/api\.ithome\.com\/json\/slide\/index url script-response-body eval_script.js - -^https?:\/\/api\.ithome\.com\/json\/(newslist|listpage)\/news url script-response-body eval_script.js - -https:\/\/www\.xmind\.cn\/\_res\/devices url script-response-body eval_script.js - -^http?:\/\/.*\.arten.cn/login/login url script-response-body eval_script.js - -^https://api.weiqire.com/api3/(visitor/|user/unlockCharpter) url script-response-body eval_script.js - -https://api.shimo.im/users/ url script-response-body eval_script.js - -^https?:\/\/.*\.videostarapp\.com\/scripts\/subsNew\.php url script-response-body eval_script.js - -https:\/\/api\.revenuecat\.com\/v1\/(subscribers|receipts) url script-response-body eval_script.js - -https://app.api.versa-ai.com/pay/order/iap/check url script-response-body eval_script.js - -^https\:\/\/hjapi\.bjxkhc\.com\/v2d2\/users\/.*\/member url script-response-body eval_script.js - -http:\/\/api\.591master\.com\:8081\/(1.0|3.6.8)\/ui(forum|common)\/(downloadwallpaper|getuser) url script-response-body eval_script.js - -^http\:\/\/jdytv\.cn\/login\/login\/veifys url script-response-body eval_script.js - -http://user.shywck.com/user/userinfo url script-response-body eval_script.js - -^https?:\/\/.*\.xunjie.*\.com\/api\/v\d\/* url script-response-body eval_script.js - -^https:\/\/api\.psy-1\.com\/cosleep\/user\/info url script-response-body eval_script.js - -^https:\/\/snailsleep\.net\/snail\/v1\/profile\/get url script-response-body eval_script.js - -^https:\/\/mob2015\.kekenet\.com\/keke\/mobile\/index\.php url script-response-body eval_script.js - -^https:\/\/m\.samh\.xndm\.tech\/userapi\/info\/v1\/getuserinfo url script-response-body eval_script.js - -^http\:\/\/app\.flashdown365\.com\/ios\/login url script-response-body eval_script.js - -^https:\/\/avoscloud\.com\/1\.1\/users\/ url script-response-body eval_script.js - -^https\:\/\/pwaapi\.gao1gps\.cn\/v1\/user\/info url script-response-body eval_script.js - -^https:\/\/api\.meiyan\.com\/iap\/verify\.json url script-response-body eval_script.js - -^https:\/\/bea\.sportq\.com\/SFitWeb\/sfit\/getUserBaseInfo url script-response-body eval_script.js - -^https://8.8.8.8/api url script-request-body eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js -^https://8.8.8.8/(home|app|log\/) url script-response-body eval_script.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js @@ -324,8 +10,6 @@ http://user.shywck.com/user/userinfo url script-response-body eval_script.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath url script-response-body eval_script.js \ No newline at end of file +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js \ No newline at end of file From c3fdceb10d84fe463690af52d504b76f2ffe71d8 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 09:33:18 +0800 Subject: [PATCH 1044/1191] update --- eval_script/sg_script.sgmodule | 326 +-------------------------------- 1 file changed, 5 insertions(+), 321 deletions(-) diff --git a/eval_script/sg_script.sgmodule b/eval_script/sg_script.sgmodule index 8c4787ed9..39b0e6ebe 100644 --- a/eval_script/sg_script.sgmodule +++ b/eval_script/sg_script.sgmodule @@ -1,326 +1,12 @@ #!name=eval_script.js module [MITM] -hostname = %INSERT% 8.8.8.8,bea.sportq.com,api.meiyan.com,*.gao1gps.cn,avoscloud.com,app.flashdown365.com,m.samh.xndm.tech,mob2015.kekenet.com,api.m.jd.com,ios.prod.ftl.netflix.com,vipapi.jxedt.com,api.interpreter.caiyunai.com,pocketlists.com,book.haitunwallet.com,mubu.com,app.xunjiepdf.com,miaow.yiyongcad.com,api.lennou.com,api.gkocr.com,vira.llsapp.com,commerce-.*api.faceu.mobi,commerce-api.faceu.mobi,pan.baidu.com,api.revenuecat.com,api.rr.tv,editorapi.115.com,api.lakecoloring.com,ctrl.playcvn.com,dict.eudic.net,m.client.10010.com,api.wakamoment.ga,*.bh3.com,api.diyidan.net,api.flexibits.com,api.jiaonizuocai.com,api.sololearn.com,tncj.hortorgames.com,bkcd.b-cdn.net,souhu.mett.me,ayk.tmdidi.com,m.pearkin.com,www.baidu.com2.club,claritywallpaper.com,bookapi.ihuman.com,rest.zhibo.tv,note.youdao.com,billing.peakcloud.org,api.ithome.com,www.xmind.cn,*.arten.cn,api.weiqire.com,api.shimo.im,pay.wecut.com,*.videostarapp.com,app.api.versa-ai.com,*.bjxkhc.com,api.591master.com,jdytv.cn,user.shywck.com,*.xunjie*.com,api.psy-1.com,snailsleep.net,api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,mp.weixin.qq.com,api.bilibili.com,app.bilibili.com,*.zhihu.com,aweme*.snssdk.com,*.kuwo.cn,vip1.kuwo.cn,*.xiaoxiao*.com,*.tiktokv.com,*.musical.ly,*.amemv.com,p.du.163.com,getuserinfo.321mh.com,getuserinfo-globalapi.zymk.cn,ios.fuliapps.com,vsco.co,api.vnision.com,*.my10api.com,sp.kaola.com,r.inews.qq.com,apple.fuliapps.com,newdrugs.dxy.cn,app101.avictown.cc,api.hlo.xyz,api.ijo.xyz,www.luqijianggushi.com,account.wps.*,u.kanghuayun.com,api.gyrosco.pe,api1.dobenge.cn,api.mvmtv.com,mitaoapp.yeduapp.com,origin-prod-phoenix.jibjab.com,www.3ivf.com,pay.guoing.com,api.termius.com,api.bjxkhc.com,viva.v21xy.com,biz.caiyunapp.com,api.gotokeep.com,ap*.intsig.net,mp.bybutter.com,api.vuevideo.net,api.picsart.c*,api.meiease.c*,splice.oracle.*.com,api.gamer.com.tw,ios.xiangjiaoapps.com,apple.xiangjiaoapps.com,*.lagoapps.com,*.xiangxiangapps.com,avatar-nct.nixcdn.com,spclient.wg.spotify.com,oa.zalo.me,api.unfold.app,viva-asia1.vvbrd.com,graph.nhaccuatui.com,api.memrise.com,api.sync.me,pool.elsanow.io,lambda.us-east-1.amazonaws.com,api.mondlylanguages.com,api.busuu.com,owa.videoshowiosglobalserver.com:0,accounts.elevateapp.net,purchases.ws.pho.to,api-intl.mr.meitu.com,bmall.camera360.com,api.tv.zing.vn,api.calm.com,www.calm.com,api.global.mp3.zing.vn,apimboom2.globaldelight.net,photos.adobe.io,license.pdfexpert.com,subs.platforms.team,apic.musixmatch.com,api.getmimo.com,engbright.com,api.lingokids.com,www.peacefulsoundsapp.com,duolingo-leaderboards-prod.duolingo.com,mobile-api.adguard.com,api.blinkist.com,api-kinemaster-assetstore.*,api.pushover.net,api.overhq.com,receipt-validator.herewetest.com,lcs-mobile-cops.adobe.io,education.github.com,backend.getdrafts.com,ssl-api.itranslateapp.com,sk.ulysses.app,dayone.me,license.enpass.io,*.grammarly.com,api.keepkeep.com,planner5d.com,secure.istreamer.com,www.api.monkeyuni.net,api.textnow.me +hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com [Script] -eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/moments/recommend,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/topstory/recommend,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://api.zhihu.com/v4/questions,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/people/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://api.zhihu.com/market/header,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/space\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/resource/show/tab\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/feed/index\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://app.bilibili.com/x/v2/view\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://api.bilibili.com/x/v2/reply/main\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://api.live.bilibili.com/xlive/app-room/v1/index/getInfoByRoom\?access_key,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/aweme\/post\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/feed\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/follow\/feed\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/nearby\/feed\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/search\/item\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/general\/search\/single\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?+:\/\/[\w-]++\.amemv\.com\/aweme\/v\d\/hot\/search\/video\/list\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/.*\/getGlobalData,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http(s)://api.bjxkhc.com/index.php/app/ios/(vod/show|(user|vod|topic|type)/index),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/getuserinfo\.321mh\.com\/app_api\/v5\/getuserinfo\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://getuserinfo-globalapi.zymk.cn/app_api/v5/(getuserinfo|coin_account|getuserinfo_ticket|getcomicinfo)/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/ap(p|i)\.bilibili\.com\/((pgc\/player\/api\/playurl)|(x\/v2\/account\/myinfo\?)|(x\/v2\/account/mine\?)),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vsco\.co\/api\/subscriptions\/2.1\/user-subscriptions\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.vnision\.com\/v1\/(users\/|banners),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.+\.(my10api|(.*91.*))\.(com|tips|app|xyz)(:\d{2,5})?\/api.php$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://sp\.kaola\.com/api/openad$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://r\.inews\.qq.com\/get(QQNewsUnreadList|RecommendList),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.(lago|fuli|xiang(jiao|xiang))apps\.com\/(ucp\/index|getGlobalData|.+\/reqplay\/),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/(i|newdrugs)\.dxy\.cn\/(snsapi\/username\/|app\/user\/(pro\/stat\?|init\?timestamp=)),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/(.+)\.(\w{2,3})(:?\d*)\/(api\/public\/\?service=Live\.checkLive$|public\/\/\?service=Live\.roomCharge$|lg\/video\/loadVideoFees\.do$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.luqijianggushi\.com\/api\/v2\/user\/get,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://account.wps.*/api/users/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gyrosco\.pe\/v1\/account\/$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api1\.dobenge\.cn\/api\/user\/getuserinfo,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.mvmtv\.com\/index\.php.*(c=user.*a=info|a=addr.*vid=.*),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.termius\.com\/api\/v3\/bulk\/account\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/viva\.v21xy\.com\/api\/rest\/u\/vip,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/biz\.caiyunapp\.com\/v2\/user\?app_name\=weather,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gotokeep\.com\/(.+\/subject|.+\/dynamic),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\?,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/mp\.bybutter\.com\/mood\/(official-templates|privileges),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/splice\.oracle\.\w+\.com\/devices\/me,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/pan\.baidu\.com\/rest\/2\.0\/membership\/user,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://.*\.snssdk\.com/bds/(feed/stream|comment/cell_reply|cell/cell_comment|cell/detail|ward/list|user/favorite|user/cell_coment|user/cell_userfeed|user/publish_list),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/viva-asia1\.vvbrd\.com\/api\/rest\/u\/vip*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.unfold\.app\/v1\/ios\/receipts$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/graph\.nhaccuatui\.com\/.*\/users\/info*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.memrise\.com\/.+\/(me\/$|dashboard\/$|leaderboards\/following\/),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.sync\.me\/api\/purchases\/(report_purchases|get_purchases),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/pool\.elsanow\.io\/user\/api\/v1\/purchase$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/lambda\.us-east-1\.amazonaws\.com/.*/functions\/prod-4-syncPurchases\/invocations$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.mondlylanguages\.com\/v1\/ios\/user\/sync$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.busuu\.com\/users\/me*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/owa\.videoshowiosglobalserver\.com\/.*\/iosPayClient,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/accounts\.elevateapp\.net\/api\/users\?user%5Bauthentication_token*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-intl\.mr\.meitu\.com/.*/subs_offer_elg$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/bmall\.camera360\.com\/api\/(iap\/check-receipt$|mix\/getinfo$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.tv\.zing\.vn\/.*/user*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.calm\.com\/me$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/photos\.adobe\.io\/v2\/accounts*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/license\.pdfexpert\.com\/api\/1\.0\/pdfexpert6\/subscription\/(refresh$|check$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/subs\.platforms\.team\/.+\/apple\/verify$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/apic\.musixmatch\.com\/ws\/.*\/config\.get,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.getmimo\.com\/v1\/subscriptions$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.revenuecat\.com\/.+\/(receipts$|subscribers\/[a-zA-Z0-9_-]*$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.lingokids\.com\/v1\/renovate_session$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.peacefulsoundsapp\.com\/api\/v1\/init$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/duolingo-leaderboards-prod\.duolingo\.com\/leaderboards*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/commerce-i18n-api\.faceu\.mobi\/commerce\/v1\/subscription\/user_info$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.global\.mp3\.zing\.vn\/1\.0\/getUserInfo\?data=*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.blinkist\.com\/v4\/(me$|me.json$|me\/access$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.sololearn\.com\/(Profile\/GetProfile$|authenticateDevice$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-kinemaster-assetstore\.(nexstreaming|kinemasters)\.com\/.*\/product\/verifyReceipt$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.pushover\.net\/1\/messages\.json*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.overhq\.com\/(user\/token\/refresh$|subscription\/verifyReceipt$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/receipt-validator\.herewetest\.com\/apple\/verifyTransaction$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/license\.pdfexpert\.com\/api\/.*\/documents\/subscription\/(refresh$|check$),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/education\.github\.com\/api\/user$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/backend\.getdrafts\.com\/api\/.*\/verification*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/lcs-mobile-cops\.adobe\.io\/mobile_profile,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/ssl-api\.itranslateapp\.com\/.*\/subscriptions\/.*\/ios$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/sk\.ulysses\.app\/api\/v1\/itunes_receipt_verify$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/dayone\.me\/api\/(users|v2\/users\/account-status)$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api-production\.endel\.io\/.*\/user$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.shred\.app\/verifyReceipt$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/subscription\.grammarly\.com\/api\/v1$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/planner5d\.com\/api\/sets,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/secure\.istreamer\.com\/backend$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/www\.api\.monkeyuni\.net\/api\/.+\/mobile\/account\/load-update,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.textnow\.me\/api2.0\/users\/.*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/vipapi\.jxedt\.com\/vip\/check,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.interpreter\.caiyunai\.com\/v1\/user,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/buy\.itunes\.apple\.com\/verifyReceipt,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/pocketlists\.com\/api\/v1\/pocketlists.me.get,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/book\.haitunwallet\.com\/app\/vip\/status,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/mubu\.com\/api\/app\/user\/info,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/app\.xunjiepdf\.com\/api\/v4\/virtualactregister,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/miaow\.yiyongcad\.com\/api\/v4\/memprofile,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.lennou\.com\/user\/info,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.gkocr\.com\/api\/userlogin1.php,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vira\.llsapp\.com\/api\/v2\/readings\/(accessible|limitation),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.rr\.tv(\/user\/privilege\/list|\/ad\/getAll|\/rrtv-video\/v4plus\/season\/detail),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/pan\.baidu\.com\/s\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.revenuecat\.com\/v1\/(receipts|\d{1,})$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://(commerce-.*api|pay).(faceu|wecut).(com|mobi)/(commerce|apple)/(iosAppVerifyReceipt.php|v1/subscription/user_info),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/theme),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http:\/\/115\.com\/lx.*$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.lakecoloring\.com\/v1\/receipt,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http://ctrl.playcvn.com/app/(init|ads),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/dict\.eudic\.net\/jingting\/GetThisChapterTaskStatus?,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://m.client.10010.com/uniAdmsInterface/getHomePageAd,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.wakamoment\.ga\/init\?platform\=ios,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.diyidan\.net\/v0\.3\/(user\/personal_homepage|vip_user\/info|tv_series\/index\?appChanne),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.flexibits\.com\/v1\/(auth|account)\/(device|details|appstore-receipt)\/$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https?:\/\/api\.jiaonizuocai\.com,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.sololearn\.com\/(authenticateDevice|challenge\/GetContestFeed|Profile\/GetProfile)$,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://tncj.hortorgames.com/chicken/fight/(answer|findQuiz),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/(www\.baidu.com2\.club|ayk\.tmdidi\.com|m\.pearkin\.com|souhu\.mett\.me|bkcd\.b-cdn\.net)\/(api\/movie\/WatchMovie|api\/Account\/CheckVip|api\/account\/IndexDetail),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/claritywallpaper\.com\/clarity\/api\/(userInfo|special\/queryByCatalogAll),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/bookapi\.ihuman\.com\/(v1\/get\_user\_info|v1\/get\_purchase\_list),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/rest\.zhibo\.tv\/room\/get\-room\-info\-v430,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://note.youdao.com/yws/(mapi/payment|api/self),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/billing\.peakcloud\.org\/billing\/2\/user\/me?,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.ithome\.com\/json\/slide\/index,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/api\.ithome\.com\/json\/(newslist|listpage)\/news,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/www\.xmind\.cn\/\_res\/devices,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http?:\/\/.*\.arten.cn/login/login,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https://api.weiqire.com/api3/(visitor/|user/unlockCharpter),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://api.shimo.im/users/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.videostarapp\.com\/scripts\/subsNew\.php,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https:\/\/api\.revenuecat\.com\/v1\/(subscribers|receipts),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=https://app.api.versa-ai.com/pay/order/iap/check,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https\:\/\/hjapi\.bjxkhc\.com\/v2d2\/users\/.*\/member,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=http:\/\/api\.591master\.com\:8081\/(1.0|3.6.8)\/ui(forum|common)\/(downloadwallpaper|getuser),script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http\:\/\/jdytv\.cn\/login\/login\/veifys,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=http://user.shywck.com/user/userinfo,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?:\/\/.*\.xunjie.*\.com\/api\/v\d\/*,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.psy-1\.com\/cosleep\/user\/info,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/snailsleep\.net\/snail\/v1\/profile\/get,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/mob2015\.kekenet\.com\/keke\/mobile\/index\.php,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/m\.samh\.xndm\.tech\/userapi\/info\/v1\/getuserinfo,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^http\:\/\/app\.flashdown365\.com\/ios\/login,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/avoscloud\.com\/1\.1\/users\/,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https\:\/\/pwaapi\.gao1gps\.cn\/v1\/user\/info,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/api\.meiyan\.com\/iap\/verify\.json,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https:\/\/bea\.sportq\.com\/SFitWeb\/sfit\/getUserBaseInfo,script-path=eval_script.js - -eval_script.js = type=http-request,requires-body=1,pattern=^https://8.8.8.8/api,script-path=eval_script.js +eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https://8.8.8.8/(home|app|log\/),script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js @@ -328,8 +14,6 @@ eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobil eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js -eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js - -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js +eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js -eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,script-path=eval_script.js \ No newline at end of file +eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js \ No newline at end of file From e47ff605a013b380f6cbe9ecfee3beae6bf967cf Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 09:50:37 +0800 Subject: [PATCH 1045/1191] update From 3d45e9c5b0dbd6623a9b794482365fca45109fd3 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 09:50:39 +0800 Subject: [PATCH 1046/1191] update From 11555e493e7dcef3e8c82006a15891e75ac1b366 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 09:52:20 +0800 Subject: [PATCH 1047/1191] update From 826d51ccbd19d9921c1808f6ddbabef591997e16 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 09:52:23 +0800 Subject: [PATCH 1048/1191] update From 50894de894f1abfdd9b59d394f0c4ac90dcdb9ee Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 09:53:40 +0800 Subject: [PATCH 1049/1191] update From a4ae1e098837902f092b1933a37b8f62308399f6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 09:53:43 +0800 Subject: [PATCH 1050/1191] update From efea066e4872833efd8427eecb4d46496c8b4a73 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 09:57:47 +0800 Subject: [PATCH 1051/1191] update From e44345df43078a081d0208294dcb317d0d78d6f7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 09:57:50 +0800 Subject: [PATCH 1052/1191] update From 66caf8843f408e2e7d45d053b1423021fd925ece Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 09:59:41 +0800 Subject: [PATCH 1053/1191] update From f2be44374840bd440ce3906e2529e8e9386ed139 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 09:59:43 +0800 Subject: [PATCH 1054/1191] update From f520a381d4b546e6e158cef944401a896c49ff26 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 10:05:10 +0800 Subject: [PATCH 1055/1191] update From 243bcbcea1af51c7dd4ab802c82d5e882fbfb78a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 10:05:13 +0800 Subject: [PATCH 1056/1191] update From c9d55e456b5fa6bbf0e00c51ad3b2e3f834546e4 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 10:08:28 +0800 Subject: [PATCH 1057/1191] Update eval_script.js --- eval_script.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eval_script.js b/eval_script.js index 8918268ac..b4be4fe9b 100644 --- a/eval_script.js +++ b/eval_script.js @@ -2,7 +2,7 @@ const __conf = String.raw` [Remote] // custom remote... -https://raw.githubusercontent.com/yichahucha/surge/master/qx_sub.txt +# https://raw.githubusercontent.com/yichahucha/surge/master/qx_sub.txt [Local] @@ -643,6 +643,7 @@ function ____Tool() { return (null) } })() + _isJsBox = typeof $jsbox != "undefined" _isSurge = typeof $httpClient != "undefined" _isQuanX = typeof $task != "undefined" _isTask = typeof $request == "undefined" @@ -674,6 +675,10 @@ function ____Tool() { if (_isQuanX) $notify(title, subtitle, message) if (_isSurge) $notification.post(title, subtitle, message) if (_node) console.log(JSON.stringify({ title, subtitle, message })); + if (_isJsBox) { + const push = require("push"); + push.schedule({ title: title, body: `${subtitle}${subtitle.length > 0 ? "\n" : ""}${message}` }); + } } this.write = (value, key) => { if (_isQuanX) return $prefs.setValueForKey(value, key) From 0d257b1d6eb99d6d25b863b9ef5f3ddf10bb3ebc Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 10:16:23 +0800 Subject: [PATCH 1058/1191] update From 9e4f648659efb2442f44819cce7ba3edcd516ec0 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 10:16:27 +0800 Subject: [PATCH 1059/1191] update From 414ff1c2f663937fc8082a493e5f9311aaed085b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 10:19:25 +0800 Subject: [PATCH 1060/1191] update From 5a2c383351b88fb1a1c375d821c07e81e682e4df Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 10:19:28 +0800 Subject: [PATCH 1061/1191] update From 19689061d7d8a71a61fb3a13e0f577610a50d5c7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 10:27:06 +0800 Subject: [PATCH 1062/1191] update From f7850a6e2581bac18efb48b45cf52ae79d825012 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 10:27:08 +0800 Subject: [PATCH 1063/1191] update From f2305505e9b52a915ae6bf053e49da85a72e556c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 10:27:47 +0800 Subject: [PATCH 1064/1191] update From 58f05ada19afcab79e186ed9288dc34cedd28657 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 10:27:49 +0800 Subject: [PATCH 1065/1191] update From 8b9b5084d3d6a4e84ce13dc117a19ce1af14bab1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 10:48:58 +0800 Subject: [PATCH 1066/1191] update From c1fe8e17d666cc346690c8542d9a91c95a213633 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 10:49:01 +0800 Subject: [PATCH 1067/1191] update From 10176d1ac4b142946e73c059b602ccdd1d373af7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 10:49:36 +0800 Subject: [PATCH 1068/1191] update From 538261d3cc6b15b25b7d90b51a20dbf816ed9356 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 10:49:39 +0800 Subject: [PATCH 1069/1191] update From b18cee5c90ee625dbaace115e0b50fca2df08631 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 10:59:57 +0800 Subject: [PATCH 1070/1191] update From 18aaab6b5b2b607fbdb867f6fd111d65b3da47f9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Fri, 19 Jun 2020 10:59:59 +0800 Subject: [PATCH 1071/1191] update From 8483777fee42504373a18f102b77eb23c362f093 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 1 Jul 2020 23:14:20 +0800 Subject: [PATCH 1072/1191] Update nf_rating.js --- nf_rating.js | 78 +++++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/nf_rating.js b/nf_rating.js index 4eb1675ec..d2de2aa5d 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -30,44 +30,46 @@ if (!$tool.isResponse) { if (!IMDbApikey) updateIMDbApikey(); let obj = JSON.parse($response.body); if (consoleLog) console.log("Netflix Original Body:\n" + $response.body); - if (typeof(obj.paths[0][1]) == "string") { - const videoID = obj.paths[0][1]; - const video = obj.value.videos[videoID]; - const map = getTitleMap(); - let title = map[videoID]; - if (!title) { - title = video.summary.title; - setTitleMap(videoID, title, map); - } - let year = null; - let type = video.summary.type; - if (type == "show") { - type = "series"; - } - if (type == "movie") { - year = video.details.releaseYear; - } - delete video.details; - const requestRatings = async () => { - const IMDb = await requestIMDbRating(title, year, type); - const Douban = await requestDoubanRating(IMDb.id); - const IMDbrating = IMDb.msg.rating; - const tomatoes = IMDb.msg.tomatoes; - const country = IMDb.msg.country; - const doubanRating = Douban.rating; - const message = `${country}\n${IMDbrating}\n${doubanRating}${tomatoes.length > 0 ? "\n" + tomatoes + "\n" : "\n"}`; - return message; - } - let msg = ""; - requestRatings() - .then(message => msg = message) - .catch(error => msg = error + "\n") - .finally(() => { - let summary = obj.value.videos[videoID].summary; - summary["supplementalMessage"] = `${msg}${summary && summary.supplementalMessage ? "\n" + summary.supplementalMessage : ""}`; - if (consoleLog) console.log("Netflix Modified Body:\n" + JSON.stringify(obj)); - $done({ body: JSON.stringify(obj) }); - }); + if (typeof (obj.paths[0][1]) == "string") { + const videoID = obj.paths[0][1]; + const video = obj.value.videos[videoID]; + const map = getTitleMap(); + let title = map[videoID]; + if (!title) { + title = video.summary.title; + setTitleMap(videoID, title, map); + } + let year = null; + let type = video.summary.type; + if (type == "show") { + type = "series"; + } + if (video.details) { + if (type == "movie") { + year = video.details.releaseYear; + } + delete video.details; + } + const requestRatings = async () => { + const IMDb = await requestIMDbRating(title, year, type); + const Douban = await requestDoubanRating(IMDb.id); + const IMDbrating = IMDb.msg.rating; + const tomatoes = IMDb.msg.tomatoes; + const country = IMDb.msg.country; + const doubanRating = Douban.rating; + const message = `${country}\n${IMDbrating}\n${doubanRating}${tomatoes.length > 0 ? "\n" + tomatoes + "\n" : "\n"}`; + return message; + } + let msg = ""; + requestRatings() + .then(message => msg = message) + .catch(error => msg = error + "\n") + .finally(() => { + let summary = obj.value.videos[videoID].summary; + summary["supplementalMessage"] = `${msg}${summary && summary.supplementalMessage ? "\n" + summary.supplementalMessage : ""}`; + if (consoleLog) console.log("Netflix Modified Body:\n" + JSON.stringify(obj)); + $done({ body: JSON.stringify(obj) }); + }); } else { $done({}); } From 044bd95cebf5047c6a72b35976e5aa307d74e132 Mon Sep 17 00:00:00 2001 From: toulanboy Date: Sat, 11 Jul 2020 18:40:43 +0800 Subject: [PATCH 1073/1191] Update wb_ad.js --- wb_ad.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wb_ad.js b/wb_ad.js index c53fd4764..f95db365b 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -100,6 +100,7 @@ if ( } else if (url.indexOf(path19) != -1) { let obj = JSON.parse(body); delete obj.expandable_view; + delete obj.expandable_views; body = JSON.stringify(obj); } @@ -180,4 +181,4 @@ function is_timeline_likerecommend(title) { function is_stream_video_ad(item) { return item.ad_state && item.ad_state == 1 -} \ No newline at end of file +} From e5408d6feae7b6096fe2eca04d36d16e3b9adc03 Mon Sep 17 00:00:00 2001 From: toulanboy Date: Sat, 11 Jul 2020 19:07:59 +0800 Subject: [PATCH 1074/1191] Update wb_ad.js --- wb_ad.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wb_ad.js b/wb_ad.js index f95db365b..3d143544e 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -100,7 +100,8 @@ if ( } else if (url.indexOf(path19) != -1) { let obj = JSON.parse(body); delete obj.expandable_view; - delete obj.expandable_views; + if(obj.hasOwnProperty(expandable_views)) + delete obj.expandable_views; body = JSON.stringify(obj); } From 72dcbbe75dad5d8f24d5a6227fcad7be5531097e Mon Sep 17 00:00:00 2001 From: toulanboy Date: Sat, 11 Jul 2020 19:08:53 +0800 Subject: [PATCH 1075/1191] Update wb_ad.js --- wb_ad.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wb_ad.js b/wb_ad.js index 3d143544e..16b834bf2 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -100,7 +100,7 @@ if ( } else if (url.indexOf(path19) != -1) { let obj = JSON.parse(body); delete obj.expandable_view; - if(obj.hasOwnProperty(expandable_views)) + if(obj.hasOwnProperty('expandable_views')) delete obj.expandable_views; body = JSON.stringify(obj); } From 13ad6241f1e7ce3c7fd3781c9c43992c78686aec Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 15 Jul 2020 10:33:13 +0800 Subject: [PATCH 1076/1191] Update README.md --- README.md | 74 ------------------------------------------------------- 1 file changed, 74 deletions(-) diff --git a/README.md b/README.md index 58fefd57b..ef39cd668 100644 --- a/README.md +++ b/README.md @@ -46,12 +46,6 @@ DingDing clock in cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/surge/master/clock_in.js ``` -Script management tool -```properties -[Script] -cron "0 0 * * *" eval_script.js -``` - # Quan-X Remove weibo ads @@ -96,72 +90,4 @@ DingDing clock in 0 9,18 * * 1-5 clock_in.js ``` -Script management tool -``` -[task_local] -0 0 * * * eval_script.js -``` - -# eval_script.js 使用示例(QuanX 举例) - -```properties -1.设置任务 - -[task_local] -0 0 * * * eval_script.js - - -2.配置脚本 - -[Remote] -# 可以使用 QuanX 远程重写(如果远程重写不包含 hostname,需配置 [Hostname] ) - - -[Local] -# 可以使用 Surge 或者 QuanX 格式脚本(需配置 [Hostname]) -# nf -http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -# jd -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -# tb -http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -# wb -http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js - - -[Hostname] -api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, trade-acs.m.taobao.com, api.m.jd.com, ios.prod.ftl.netflix.com - - -3.配置 GitHub - -// 是否更新 GitHub(如果开启 true,需配置 token 或 账号密码) -const __isUpdateGithub = true -// GitHub Token(如果使用账号密码 token 请设置为空 "") -const __token = "" -// GitHub 账号 -const __username = "xxx" -// GitHub 密码 -const __password = "xxx" -// GitHub 用户名 -const __owner = "yichahucha" -// GitHub 仓库名 -const __repo = "surge" -// GitHub 分支(不指定就使用默认分支) -const __branch = "master" -// GitHub 文件路径(没有文件新创建,已有文件覆盖更新,路径为空 "" 不更新) -const __quanxPath = "eval_script/qx_script.txt" // qaunx 远程重写格式文件 -const __surgePath = "eval_script/sg_script.sgmodule" // surge 脚本模块格式文件 - - -4.执行任务更新脚本 - - -5.使用 GitHub 生成的文件链接,在 QuanX 添加远程重写 - -``` - [Issue Group](https://t.me/joinchat/GNhmPg1pixfpvKyD0h-8YA) From ffc4bcd941770ce4bc382d3a03ecca96b49b95c1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 30 Jul 2020 21:21:46 +0800 Subject: [PATCH 1077/1191] update From de4ba34c0660ff181f23e48fb651715eec573f4d Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 30 Jul 2020 21:21:49 +0800 Subject: [PATCH 1078/1191] update From 6a1f7098cfb8bd24d492019d0bdc84f1809164bd Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 1 Aug 2020 15:30:43 +0800 Subject: [PATCH 1079/1191] fix --- jd_price.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jd_price.js b/jd_price.js index 947765cd5..beb153ab7 100644 --- a/jd_price.js +++ b/jd_price.js @@ -4,6 +4,7 @@ README:https://github.com/yichahucha/surge/tree/master const path1 = "serverConfig"; const path2 = "wareBusiness"; +const path3 = "basicConfig"; const consolelog = false; const url = $request.url; const body = $response.body; @@ -12,6 +13,15 @@ const $tool = tool(); if (url.indexOf(path1) != -1) { let obj = JSON.parse(body); delete obj.serverConfig.httpdns; + delete obj.serverConfig.dnsvip; + delete obj.serverConfig.dnsvip_v6; + $done({ body: JSON.stringify(obj) }); +} + +if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + delete obj.data.JDHttpToolKit.httpdns; + delete obj.data.JDHttpToolKit.dnsvipV6; $done({ body: JSON.stringify(obj) }); } From 7bcbe0c4773417ca8da32b308fad246d1061cc41 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 1 Aug 2020 20:19:46 +0800 Subject: [PATCH 1080/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ef39cd668..71d023537 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Display jd historical price # ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=start - reject # ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=(start|queryMaterialAdverts) - reject [Script] -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js [MITM] hostname = api.m.jd.com ``` @@ -69,7 +69,7 @@ hostname = ios.prod.ftl.netflix.com Display jd historical price ```properties [rewrite_local] -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body jd_price.js +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body jd_price.js [mitm] hostname = api.m.jd.com ``` From 02257ee5e52eb4c4620be4353373f3105c804773 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 1 Aug 2020 20:20:21 +0800 Subject: [PATCH 1081/1191] Update qx_sub.txt --- qx_sub.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qx_sub.txt b/qx_sub.txt index 5bf7ea749..855814a04 100644 --- a/qx_sub.txt +++ b/qx_sub.txt @@ -4,7 +4,7 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,ap ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js ^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js @@ -12,4 +12,4 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,ap ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js \ No newline at end of file +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js From 44afd065249493efd0be427d555e141a489f3b53 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 1 Aug 2020 20:20:52 +0800 Subject: [PATCH 1082/1191] Update sg_sub.sgmodule --- sg_sub.sgmodule | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sg_sub.sgmodule b/sg_sub.sgmodule index a3610c922..d5bb46d07 100644 --- a/sg_sub.sgmodule +++ b/sg_sub.sgmodule @@ -8,7 +8,7 @@ nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/ nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js From b64e48bf9ba9823fc14cb6835f756184850d8ee6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 8 Aug 2020 17:04:21 +0800 Subject: [PATCH 1083/1191] Update wb_ad.js --- wb_ad.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wb_ad.js b/wb_ad.js index 16b834bf2..8af24ee50 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -22,6 +22,7 @@ const path17 = "/statuses/friends_timeline"; const path18 = "/!/photos/pic_recommend_status"; const path19 = "/statuses/video_mixtimeline"; const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; const url = $request.url; let body = $response.body; @@ -103,6 +104,10 @@ if ( if(obj.hasOwnProperty('expandable_views')) delete obj.expandable_views; body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = {} + } } $done({ body }); From 8f1ecf99ebf7478cbce1f5b56d83bc8bfad1f4e6 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 8 Aug 2020 17:09:41 +0800 Subject: [PATCH 1084/1191] Update wb_ad.js --- wb_ad.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wb_ad.js b/wb_ad.js index 8af24ee50..aedfc3814 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -106,7 +106,7 @@ if ( body = JSON.stringify(obj); } else if (url.indexOf(path21) != -1) { if (body.indexOf("ad_params") != -1) { - body = {} + body = "" } } From 6fd33e66b1c3952e0423ec3f24c9067dcf9dff99 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 8 Aug 2020 17:14:50 +0800 Subject: [PATCH 1085/1191] rm photo ad --- wb_ad.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wb_ad.js b/wb_ad.js index aedfc3814..b2606caa9 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -106,7 +106,7 @@ if ( body = JSON.stringify(obj); } else if (url.indexOf(path21) != -1) { if (body.indexOf("ad_params") != -1) { - body = "" + body = JSON.stringify({}); } } From 80851f002f9134494f824e54c4c41e0a62cc18fd Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 8 Aug 2020 17:22:34 +0800 Subject: [PATCH 1086/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 71d023537..daa7c59d4 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Remove weibo ads ```properties [Script] http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js [MITM] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` @@ -52,7 +52,7 @@ Remove weibo ads ```properties [rewrite_local] ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body wb_ad.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) url script-response-body wb_ad.js [mitm] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` From 074df6404689404d52fdefc29adfd21255042e1a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 8 Aug 2020 17:23:12 +0800 Subject: [PATCH 1087/1191] Update qx_sub.txt --- qx_sub.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qx_sub.txt b/qx_sub.txt index 855814a04..14e91da03 100644 --- a/qx_sub.txt +++ b/qx_sub.txt @@ -12,4 +12,4 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,ap ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js From ac003b8752683904a55a5e9e686b0b4c9c902f09 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 8 Aug 2020 17:23:46 +0800 Subject: [PATCH 1088/1191] Update sg_sub.sgmodule --- sg_sub.sgmodule | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sg_sub.sgmodule b/sg_sub.sgmodule index d5bb46d07..717907e8f 100644 --- a/sg_sub.sgmodule +++ b/sg_sub.sgmodule @@ -16,4 +16,4 @@ tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\ wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -wb_ad.js = type=http-response,requires-body=1,max-size=-1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +wb_ad.js = type=http-response,requires-body=1,max-size=-1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js From 3c99bebb6d95168085c15d06e48a7730b6daf604 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 8 Aug 2020 17:42:07 +0800 Subject: [PATCH 1089/1191] Update wb_ad.js --- wb_ad.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/wb_ad.js b/wb_ad.js index b2606caa9..274bfef9d 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -101,7 +101,7 @@ if ( } else if (url.indexOf(path19) != -1) { let obj = JSON.parse(body); delete obj.expandable_view; - if(obj.hasOwnProperty('expandable_views')) + if (obj.hasOwnProperty('expandable_views')) delete obj.expandable_views; body = JSON.stringify(obj); } else if (url.indexOf(path21) != -1) { @@ -160,6 +160,17 @@ function filter_timeline_cards(cards) { cards.splice(j, 1); break; } + } else if (card_type == 17) { + let group = card_group_item.group; + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[i]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } } } } From e3775ec395f7d2879a6f459671b5662f9f5fb510 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 8 Aug 2020 17:52:29 +0800 Subject: [PATCH 1090/1191] Update wb_ad.js --- wb_ad.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wb_ad.js b/wb_ad.js index 274bfef9d..0eae914d5 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -165,7 +165,7 @@ function filter_timeline_cards(cards) { if (group && group.length > 0) { let k = group.length; while (k--) { - let group_item = group[i]; + let group_item = group[k]; if (group_item.hasOwnProperty("promotion")) { group.splice(k, 1); } From 2584de4c77d54b4dd519cce817a326081df4dd30 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 8 Aug 2020 18:15:24 +0800 Subject: [PATCH 1091/1191] Update wb_ad.js --- wb_ad.js | 76 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 33 deletions(-) diff --git a/wb_ad.js b/wb_ad.js index 0eae914d5..2ee3f1d9c 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -144,45 +144,55 @@ function filter_timeline_cards(cards) { let j = cards.length; while (j--) { let item = cards[j]; + let card_type = item.card_type; let card_group = item.card_group; - if (card_group && card_group.length > 0) { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - let group = card_group_item.group; - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } - } + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + }else if (card_type && card_type == 11) { + filter_top_search(card_group); + }else { + filter_card_group(card_group); + } + } + } + return cards; +} + +function filter_card_group(card_group) { + if (card_group && card_group.length > 0) { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { + cards.splice(j, 1); + break; } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } else if (card_type == 17) { + filter_top_search(card_group_item.group); } } } } - return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + console.log(group_item); + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } } function is_timeline_ad(mblog) { From f0c7482c27a8883013c0e1f21937f278f1d6d6ba Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 8 Aug 2020 18:30:39 +0800 Subject: [PATCH 1092/1191] Update wb_ad.js --- wb_ad.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/wb_ad.js b/wb_ad.js index 2ee3f1d9c..b3fda527a 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -144,14 +144,19 @@ function filter_timeline_cards(cards) { let j = cards.length; while (j--) { let item = cards[j]; - let card_type = item.card_type; let card_group = item.card_group; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - }else if (card_type && card_type == 11) { + if (item.itemid && item.itemid == "hotword") { filter_top_search(card_group); - }else { - filter_card_group(card_group); + } else { + if (card_group && card_group.length > 0) { + filter_card_group(card_group); + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } } } @@ -187,7 +192,6 @@ function filter_top_search(group) { let k = group.length; while (k--) { let group_item = group[k]; - console.log(group_item); if (group_item.hasOwnProperty("promotion")) { group.splice(k, 1); } From 45cb9ae4e31aebae87563470d26cba622fe0fcc1 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 8 Aug 2020 18:53:43 +0800 Subject: [PATCH 1093/1191] Update wb_ad.js --- wb_ad.js | 61 ++++++++++++++++++++++++++------------------------------ 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/wb_ad.js b/wb_ad.js index b3fda527a..3753c84b9 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -143,48 +143,43 @@ function filter_timeline_cards(cards) { if (cards && cards.length > 0) { let j = cards.length; while (j--) { + console.log("oooo"); let item = cards[j]; let card_group = item.card_group; - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - if (card_group && card_group.length > 0) { - filter_card_group(card_group); + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + let i = card_group.length; + while (i--) { + console.log("sdsds"); + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } } } - - } - } - } - return cards; -} - -function filter_card_group(card_group) { - if (card_group && card_group.length > 0) { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); } } } } + return cards; } function filter_top_search(group) { From e0ab1138aa5928ba98dbbf58d33af0738460169b Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sat, 8 Aug 2020 18:54:30 +0800 Subject: [PATCH 1094/1191] Update wb_ad.js --- wb_ad.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/wb_ad.js b/wb_ad.js index 3753c84b9..1732a0ace 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -143,7 +143,6 @@ function filter_timeline_cards(cards) { if (cards && cards.length > 0) { let j = cards.length; while (j--) { - console.log("oooo"); let item = cards[j]; let card_group = item.card_group; if (card_group && card_group.length > 0) { @@ -152,7 +151,6 @@ function filter_timeline_cards(cards) { } else { let i = card_group.length; while (i--) { - console.log("sdsds"); let card_group_item = card_group[i]; let card_type = card_group_item.card_type; if (card_type) { From 077dd0ee384e7fb10df25cdde40774314621f49c Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Sun, 9 Aug 2020 11:34:23 +0800 Subject: [PATCH 1095/1191] Update jd_price_lite.js --- jd_price_lite.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jd_price_lite.js b/jd_price_lite.js index 530de143c..669d116e0 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -4,6 +4,7 @@ README:https://github.com/yichahucha/surge/tree/master const path1 = "serverConfig"; const path2 = "wareBusiness"; +const path3 = "basicConfig"; const consolelog = false; const url = $request.url; const body = $response.body; @@ -12,6 +13,15 @@ const $tool = tool(); if (url.indexOf(path1) != -1) { let obj = JSON.parse(body); delete obj.serverConfig.httpdns; + delete obj.serverConfig.dnsvip; + delete obj.serverConfig.dnsvip_v6; + $done({ body: JSON.stringify(obj) }); +} + +if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + delete obj.data.JDHttpToolKit.httpdns; + delete obj.data.JDHttpToolKit.dnsvipV6; $done({ body: JSON.stringify(obj) }); } From 1e0d3094420de711932deb785dcf3095b7c3b114 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 2 Sep 2020 15:21:41 +0800 Subject: [PATCH 1096/1191] fix --- nf_rating.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nf_rating.js b/nf_rating.js index d2de2aa5d..ceb162c30 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -52,12 +52,13 @@ if (!$tool.isResponse) { } const requestRatings = async () => { const IMDb = await requestIMDbRating(title, year, type); - const Douban = await requestDoubanRating(IMDb.id); + // const Douban = await requestDoubanRating(IMDb.id); const IMDbrating = IMDb.msg.rating; const tomatoes = IMDb.msg.tomatoes; const country = IMDb.msg.country; - const doubanRating = Douban.rating; - const message = `${country}\n${IMDbrating}\n${doubanRating}${tomatoes.length > 0 ? "\n" + tomatoes + "\n" : "\n"}`; + // const doubanRating = Douban.rating; + // const message = `${country}\n${IMDbrating}\n${doubanRating}${tomatoes.length > 0 ? "\n" + tomatoes + "\n" : "\n"}`; + const message = `${country}\n${IMDbrating}${tomatoes.length > 0 ? "\n" + tomatoes + "\n" : "\n"}`; return message; } let msg = ""; From 45ad2be5216a3c11b11a1570e97428cb59a3dd97 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 24 Sep 2020 08:39:19 +0800 Subject: [PATCH 1097/1191] Update clock_in.js --- clock_in.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clock_in.js b/clock_in.js index 2bd4741a0..79145b215 100644 --- a/clock_in.js +++ b/clock_in.js @@ -33,14 +33,16 @@ function Tool() { return (null) } })() - _isSurge = typeof $httpClient != "undefined" + _isLoon = typeof $loon !== "undefined"; + _isSurge = typeof $httpClient != "undefined" && !_isLoon; _isQuanX = typeof $task != "undefined" this.isSurge = _isSurge this.isQuanX = _isQuanX this.isResponse = typeof $response != "undefined" this.notify = (title, subtitle, message, option) => { if (_isQuanX) $notify(title, subtitle, message, option) - if (_isSurge) $notification.post(title, subtitle, message, option["open-url"]) + if (_isSurge) $notification.post(title, subtitle, message, {"url":option["open-url"]}) + if (_isLoon) $notification.post(title, subtitle, message, option["open-url"]) if (_node) console.log(JSON.stringify({ title, subtitle, message })); } this.write = (value, key) => { From e75ebea5853f93945873b481544396abc4ac4279 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Thu, 24 Sep 2020 08:41:40 +0800 Subject: [PATCH 1098/1191] Update clock_in.js --- clock_in.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clock_in.js b/clock_in.js index 79145b215..ef94d9f5a 100644 --- a/clock_in.js +++ b/clock_in.js @@ -11,12 +11,12 @@ $tool.get('https://dict.youdao.com/infoline/style/cardList?mode=publish&client=m let title = 'Clock' + (isAM ? ' in' : ' out') + (isAM ? ' ☀️' : ' 🌙'); let subtitle = ''; let scheme = 'dingtalk://dingtalkclient/page/link?url=https://attend.dingtalk.com/attend/index.html'; - let content = scheme; + let content = ""; let option = {"open-url" : scheme}; if (!error) { if (obj && obj.length > 1) { let yi = obj[1]; - content = yi.title + '\n' + yi.summary + '\n\n' + content; + content = yi.title + '\n' + yi.summary; option["media-url"] = yi.image[0]; } } From 8d29735201d86eae78298483f617d912253e6c86 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 6 Oct 2020 11:08:07 +0800 Subject: [PATCH 1099/1191] Create loon_sub.conf --- loon_sub.conf | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 loon_sub.conf diff --git a/loon_sub.conf b/loon_sub.conf new file mode 100644 index 000000000..8d3da7017 --- /dev/null +++ b/loon_sub.conf @@ -0,0 +1,12 @@ +http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分1 +http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分2 +http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js, tag=单集评分 +http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js, tag=微博去广告 +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js, , tag=微博去广告 +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js,tag=京东比价 +http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js,tag=淘宝比价1(内置版) +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js, tag=淘宝比价2(内置版) +http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js,tag=淘宝比价1 Lite(通知版) +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js, tag=淘宝比价2 Lite(通知版) + +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com From 0a4eaad0c9ff0ea47e2edd7d28aae17252ec0f59 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 7 Oct 2020 12:53:26 +0800 Subject: [PATCH 1100/1191] Update README.md --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index daa7c59d4..b21a3f900 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Surge -Remove weibo ads +Weibo ```properties [Script] http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js @@ -8,7 +8,7 @@ http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positiv hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` -Display netflix ratings(IMDb、douaban) +Display netflix ratings(IMDb) ```properties [Script] http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js @@ -48,7 +48,7 @@ cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/s # Quan-X -Remove weibo ads +Weibo ```properties [rewrite_local] ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body wb_launch.js @@ -89,5 +89,3 @@ DingDing clock in [task_local] 0 9,18 * * 1-5 clock_in.js ``` - -[Issue Group](https://t.me/joinchat/GNhmPg1pixfpvKyD0h-8YA) From d313b5c7c1b3ec0b2dea5d0cf1d1bcc05d3bfb5a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 7 Oct 2020 13:04:49 +0800 Subject: [PATCH 1101/1191] Update jd_price.js --- jd_price.js | 548 ++++++++++++++++++++++++++++------------------------ 1 file changed, 299 insertions(+), 249 deletions(-) diff --git a/jd_price.js b/jd_price.js index beb153ab7..fd83914ff 100644 --- a/jd_price.js +++ b/jd_price.js @@ -5,318 +5,368 @@ README:https://github.com/yichahucha/surge/tree/master const path1 = "serverConfig"; const path2 = "wareBusiness"; const path3 = "basicConfig"; +const userAgent = "JD4iPhone"; const consolelog = false; const url = $request.url; const body = $response.body; +const headers = $request.headers; const $tool = tool(); if (url.indexOf(path1) != -1) { - let obj = JSON.parse(body); + let obj = JSON.parse(body); + if (headers["User-Agent"].indexOf(userAgent) != -1) { delete obj.serverConfig.httpdns; delete obj.serverConfig.dnsvip; delete obj.serverConfig.dnsvip_v6; - $done({ body: JSON.stringify(obj) }); + } + $done({ body: JSON.stringify(obj) }); } if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); + let obj = JSON.parse(body); + if (headers["User-Agent"].indexOf(userAgent) != -1) { delete obj.data.JDHttpToolKit.httpdns; delete obj.data.JDHttpToolKit.dnsvipV6; - $done({ body: JSON.stringify(obj) }); + } + $done({ body: JSON.stringify(obj) }); } if (url.indexOf(path2) != -1) { - let obj = JSON.parse(body); - const floors = obj.floors; - const commodity_info = floors[floors.length - 1]; - const shareUrl = commodity_info.data.property.shareUrl; - request_history_price(shareUrl, function (data) { - if (data) { - const lowerword = adword_obj(); - lowerword.data.ad.textColor = "#fe0000"; - let bestIndex = 0; - for (let index = 0; index < floors.length; index++) { - const element = floors[index]; - if (element.mId == lowerword.mId) { - bestIndex = index + 1; - break; - } else { - if (element.sortId > lowerword.sortId) { - bestIndex = index; - break; - } - } - } - if (data.ok == 1 && data.single) { - const lower = lowerMsgs(data.single) - const detail = priceSummary(data) - const tip = data.PriceRemark.Tip + "(仅供参考)" - lowerword.data.ad.adword = `${lower} ${tip}\n${detail}`; - floors.insert(bestIndex, lowerword); - } - if (data.ok == 0 && data.msg.length > 0) { - lowerword.data.ad.adword = "⚠️ " + data.msg; - floors.insert(bestIndex, lowerword); - } - $done({ body: JSON.stringify(obj) }); + let obj = JSON.parse(body); + const floors = obj.floors; + const commodity_info = floors[floors.length - 1]; + const shareUrl = commodity_info.data.property.shareUrl; + request_history_price(shareUrl, function (data) { + if (data) { + const lowerword = adword_obj(); + lowerword.data.ad.textColor = "#fe0000"; + let bestIndex = 0; + for (let index = 0; index < floors.length; index++) { + const element = floors[index]; + if (element.mId == lowerword.mId) { + bestIndex = index + 1; + break; } else { - $done({ body }); + if (element.sortId > lowerword.sortId) { + bestIndex = index; + break; + } } - }) + } + if (data.ok == 1 && data.single) { + const lower = lowerMsgs(data.single); + const detail = priceSummary(data); + const tip = data.PriceRemark.Tip + "(仅供参考)"; + lowerword.data.ad.adword = `${lower} ${tip}\n${detail}`; + floors.insert(bestIndex, lowerword); + } + if (data.ok == 0 && data.msg.length > 0) { + lowerword.data.ad.adword = "⚠️ " + data.msg; + floors.insert(bestIndex, lowerword); + } + $done({ body: JSON.stringify(obj) }); + } else { + $done({ body }); + } + }); } function lowerMsgs(data) { - const lower = data.lowerPriceyh - const lowerDate = dateFormat(data.lowerDateyh) - const lowerMsg = "〽️历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` - return lowerMsg + const lower = data.lowerPriceyh; + const lowerDate = dateFormat(data.lowerDateyh); + const lowerMsg = "〽️历史最低到手价:¥" + String(lower) + ` (${lowerDate}) `; + return lowerMsg; } function priceSummary(data) { - let summary = "" - let listPriceDetail = data.PriceRemark.ListPriceDetail - listPriceDetail.pop() - let list = listPriceDetail.concat(historySummary(data.single)) - list.forEach((item, index) => { - if (item.Name == "双11价格") { - item.Name = "双十一价格" - } else if (item.Name == "618价格") { - item.Name = "六一八价格" - } else if (item.Name == "30天最低价") { - item.Name = "三十天最低" - } - summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date}${getSpace(8)}${item.Difference}` - }) - return summary + let summary = ""; + let listPriceDetail = data.PriceRemark.ListPriceDetail; + listPriceDetail.pop(); + let list = listPriceDetail.concat(historySummary(data.single)); + list.forEach((item, index) => { + if (item.Name == "双11价格") { + item.Name = "双十一价格"; + } else if (item.Name == "618价格") { + item.Name = "六一八价格"; + } else if (item.Name == "30天最低价") { + item.Name = "三十天最低"; + } + summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${ + item.Date + }${getSpace(8)}${item.Difference}`; + }); + return summary; } function historySummary(single) { - const rexMatch = /\[.*?\]/g; - const rexExec = /\[(.*),(.*),"(.*)"\]/; - let currentPrice, lowest60, lowest180, lowest360 - let list = single.jiagequshiyh.match(rexMatch); - list = list.reverse().slice(0, 360); - list.forEach((item, index) => { - if (item.length > 0) { - const result = rexExec.exec(item); - const dateUTC = new Date(eval(result[1])); - const date = dateUTC.format("yyyy-MM-dd"); - let price = parseFloat(result[2]); - if (index == 0) { - currentPrice = price - lowest60 = { Name: "六十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } - lowest180 = { Name: "一百八最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } - lowest360 = { Name: "三百六最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } - } - if (index < 60 && price <= lowest60.price) { - lowest60.price = price - lowest60.Price = `¥${String(price)}` - lowest60.Date = date - lowest60.Difference = difference(currentPrice, price) - } - if (index < 180 && price <= lowest180.price) { - lowest180.price = price - lowest180.Price = `¥${String(price)}` - lowest180.Date = date - lowest180.Difference = difference(currentPrice, price) - } - if (index < 360 && price <= lowest360.price) { - lowest360.price = price - lowest360.Price = `¥${String(price)}` - lowest360.Date = date - lowest360.Difference = difference(currentPrice, price) - } - } - }); - return [lowest60, lowest180, lowest360]; + const rexMatch = /\[.*?\]/g; + const rexExec = /\[(.*),(.*),"(.*)"\]/; + let currentPrice, lowest60, lowest180, lowest360; + let list = single.jiagequshiyh.match(rexMatch); + list = list.reverse().slice(0, 360); + list.forEach((item, index) => { + if (item.length > 0) { + const result = rexExec.exec(item); + const dateUTC = new Date(eval(result[1])); + const date = dateUTC.format("yyyy-MM-dd"); + let price = parseFloat(result[2]); + if (index == 0) { + currentPrice = price; + lowest60 = { + Name: "六十天最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + lowest180 = { + Name: "一百八最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + lowest360 = { + Name: "三百六最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + } + if (index < 60 && price <= lowest60.price) { + lowest60.price = price; + lowest60.Price = `¥${String(price)}`; + lowest60.Date = date; + lowest60.Difference = difference(currentPrice, price); + } + if (index < 180 && price <= lowest180.price) { + lowest180.price = price; + lowest180.Price = `¥${String(price)}`; + lowest180.Date = date; + lowest180.Difference = difference(currentPrice, price); + } + if (index < 360 && price <= lowest360.price) { + lowest360.price = price; + lowest360.Price = `¥${String(price)}`; + lowest360.Date = date; + lowest360.Difference = difference(currentPrice, price); + } + } + }); + return [lowest60, lowest180, lowest360]; } function difference(currentPrice, price) { - let difference = sub(currentPrice, price) - if (difference == 0) { - return "-" - } else { - return `${difference > 0 ? "↑" : "↓"}${String(difference)}` - } + let difference = sub(currentPrice, price); + if (difference == 0) { + return "-"; + } else { + return `${difference > 0 ? "↑" : "↓"}${String(difference)}`; + } } function sub(arg1, arg2) { - return add(arg1, -Number(arg2), arguments[2]); + return add(arg1, -Number(arg2), arguments[2]); } function add(arg1, arg2) { - arg1 = arg1.toString(), arg2 = arg2.toString(); - var arg1Arr = arg1.split("."), arg2Arr = arg2.split("."), d1 = arg1Arr.length == 2 ? arg1Arr[1] : "", d2 = arg2Arr.length == 2 ? arg2Arr[1] : ""; - var maxLen = Math.max(d1.length, d2.length); - var m = Math.pow(10, maxLen); - var result = Number(((arg1 * m + arg2 * m) / m).toFixed(maxLen)); - var d = arguments[2]; - return typeof d === "number" ? Number((result).toFixed(d)) : result; + (arg1 = arg1.toString()), (arg2 = arg2.toString()); + var arg1Arr = arg1.split("."), + arg2Arr = arg2.split("."), + d1 = arg1Arr.length == 2 ? arg1Arr[1] : "", + d2 = arg2Arr.length == 2 ? arg2Arr[1] : ""; + var maxLen = Math.max(d1.length, d2.length); + var m = Math.pow(10, maxLen); + var result = Number(((arg1 * m + arg2 * m) / m).toFixed(maxLen)); + var d = arguments[2]; + return typeof d === "number" ? Number(result.toFixed(d)) : result; } function request_history_price(share_url, callback) { - const options = { - url: "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", - headers: { - "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", - "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" - }, - body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent(share_url) + const options = { + url: + "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", + headers: { + "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", + "User-Agent": + "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios", + }, + body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent(share_url), + }; + $tool.post(options, function (error, response, data) { + if (!error) { + callback(JSON.parse(data)); + if (consolelog) console.log("Data:\n" + data); + } else { + callback(null, null); + if (consolelog) console.log("Error:\n" + error); } - $tool.post(options, function (error, response, data) { - if (!error) { - callback(JSON.parse(data)); - if (consolelog) console.log("Data:\n" + data); - } else { - callback(null, null); - if (consolelog) console.log("Error:\n" + error); - } - }) + }); } function dateFormat(cellval) { - const date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10)); - const month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; - const currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); - return date.getFullYear() + "-" + month + "-" + currentDate; + const date = new Date( + parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10) + ); + const month = + date.getMonth() + 1 < 10 + ? "0" + (date.getMonth() + 1) + : date.getMonth() + 1; + const currentDate = + date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); + return date.getFullYear() + "-" + month + "-" + currentDate; } function getSpace(length) { - let blank = ""; - for (let index = 0; index < length; index++) { - blank += " "; - } - return blank; + let blank = ""; + for (let index = 0; index < length; index++) { + blank += " "; + } + return blank; } function adword_obj() { - return { - "bId": "eCustom_flo_199", - "cf": { - "bgc": "#ffffff", - "spl": "empty" - }, - "data": { - "ad": { - "adword": "", - "textColor": "#8C8C8C", - "color": "#f23030", - "newALContent": true, - "hasFold": true, - "class": "com.jd.app.server.warecoresoa.domain.AdWordInfo.AdWordInfo", - "adLinkContent": "", - "adLink": "" - } - }, - "mId": "bpAdword", - "refId": "eAdword_0000000028", - "sortId": 13 - } + return { + bId: "eCustom_flo_199", + cf: { + bgc: "#ffffff", + spl: "empty", + }, + data: { + ad: { + adword: "", + textColor: "#8C8C8C", + color: "#f23030", + newALContent: true, + hasFold: true, + class: "com.jd.app.server.warecoresoa.domain.AdWordInfo.AdWordInfo", + adLinkContent: "", + adLink: "", + }, + }, + mId: "bpAdword", + refId: "eAdword_0000000028", + sortId: 13, + }; } function tool() { - const isSurge = typeof $httpClient != "undefined" - const isQuanX = typeof $task != "undefined" - const isResponse = typeof $response != "undefined" - const node = (() => { - if (typeof require == "function") { - const request = require('request') - return ({ request }) - } else { - return (null) - } - })() - const notify = (title, subtitle, message) => { - if (isQuanX) $notify(title, subtitle, message) - if (isSurge) $notification.post(title, subtitle, message) - if (node) console.log(JSON.stringify({ title, subtitle, message })); + const isSurge = typeof $httpClient != "undefined"; + const isQuanX = typeof $task != "undefined"; + const isResponse = typeof $response != "undefined"; + const node = (() => { + if (typeof require == "function") { + const request = require("request"); + return { request }; + } else { + return null; } - const write = (value, key) => { - if (isQuanX) return $prefs.setValueForKey(value, key) - if (isSurge) return $persistentStore.write(value, key) + })(); + const notify = (title, subtitle, message) => { + if (isQuanX) $notify(title, subtitle, message); + if (isSurge) $notification.post(title, subtitle, message); + if (node) console.log(JSON.stringify({ title, subtitle, message })); + }; + const write = (value, key) => { + if (isQuanX) return $prefs.setValueForKey(value, key); + if (isSurge) return $persistentStore.write(value, key); + }; + const read = (key) => { + if (isQuanX) return $prefs.valueForKey(key); + if (isSurge) return $persistentStore.read(key); + }; + const adapterStatus = (response) => { + if (response) { + if (response.status) { + response["statusCode"] = response.status; + } else if (response.statusCode) { + response["status"] = response.statusCode; + } } - const read = (key) => { - if (isQuanX) return $prefs.valueForKey(key) - if (isSurge) return $persistentStore.read(key) + return response; + }; + const get = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options }; + options["method"] = "GET"; + $task.fetch(options).then( + (response) => { + callback(null, adapterStatus(response), response.body); + }, + (reason) => callback(reason.error, null, null) + ); } - const adapterStatus = (response) => { - if (response) { - if (response.status) { - response["statusCode"] = response.status - } else if (response.statusCode) { - response["status"] = response.statusCode - } - } - return response + if (isSurge) + $httpClient.get(options, (error, response, body) => { + callback(error, adapterStatus(response), body); + }); + if (node) { + node.request(options, (error, response, body) => { + callback(error, adapterStatus(response), body); + }); } - const get = (options, callback) => { - if (isQuanX) { - if (typeof options == "string") options = { url: options } - options["method"] = "GET" - $task.fetch(options).then(response => { - callback(null, adapterStatus(response), response.body) - }, reason => callback(reason.error, null, null)) - } - if (isSurge) $httpClient.get(options, (error, response, body) => { - callback(error, adapterStatus(response), body) - }) - if (node) { - node.request(options, (error, response, body) => { - callback(error, adapterStatus(response), body) - }) - } + }; + const post = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options }; + options["method"] = "POST"; + $task.fetch(options).then( + (response) => { + callback(null, adapterStatus(response), response.body); + }, + (reason) => callback(reason.error, null, null) + ); } - const post = (options, callback) => { - if (isQuanX) { - if (typeof options == "string") options = { url: options } - options["method"] = "POST" - $task.fetch(options).then(response => { - callback(null, adapterStatus(response), response.body) - }, reason => callback(reason.error, null, null)) - } - if (isSurge) { - $httpClient.post(options, (error, response, body) => { - callback(error, adapterStatus(response), body) - }) - } - if (node) { - node.request.post(options, (error, response, body) => { - callback(error, adapterStatus(response), body) - }) - } + if (isSurge) { + $httpClient.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body); + }); + } + if (node) { + node.request.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body); + }); } - return { isQuanX, isSurge, isResponse, notify, write, read, get, post } + }; + return { isQuanX, isSurge, isResponse, notify, write, read, get, post }; } Array.prototype.insert = function (index, item) { - this.splice(index, 0, item); + this.splice(index, 0, item); }; Date.prototype.format = function (fmt) { - var o = { - "y+": this.getFullYear(), - "M+": this.getMonth() + 1, - "d+": this.getDate(), - "h+": this.getHours(), - "m+": this.getMinutes(), - "s+": this.getSeconds(), - "q+": Math.floor((this.getMonth() + 3) / 3), - "S+": this.getMilliseconds() - }; - for (var k in o) { - if (new RegExp("(" + k + ")").test(fmt)) { - if (k == "y+") { - fmt = fmt.replace(RegExp.$1, ("" + o[k]).substr(4 - RegExp.$1.length)); - } - else if (k == "S+") { - var lens = RegExp.$1.length; - lens = lens == 1 ? 3 : lens; - fmt = fmt.replace(RegExp.$1, ("00" + o[k]).substr(("" + o[k]).length - 1, lens)); - } - else { - fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); - } - } + var o = { + "y+": this.getFullYear(), + "M+": this.getMonth() + 1, + "d+": this.getDate(), + "h+": this.getHours(), + "m+": this.getMinutes(), + "s+": this.getSeconds(), + "q+": Math.floor((this.getMonth() + 3) / 3), + "S+": this.getMilliseconds(), + }; + for (var k in o) { + if (new RegExp("(" + k + ")").test(fmt)) { + if (k == "y+") { + fmt = fmt.replace(RegExp.$1, ("" + o[k]).substr(4 - RegExp.$1.length)); + } else if (k == "S+") { + var lens = RegExp.$1.length; + lens = lens == 1 ? 3 : lens; + fmt = fmt.replace( + RegExp.$1, + ("00" + o[k]).substr(("" + o[k]).length - 1, lens) + ); + } else { + fmt = fmt.replace( + RegExp.$1, + RegExp.$1.length == 1 + ? o[k] + : ("00" + o[k]).substr(("" + o[k]).length) + ); + } } - return fmt; -} + } + return fmt; +}; From 1a53b716da9e4e1bd95d5d42528803e0c9653c32 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 7 Oct 2020 13:06:04 +0800 Subject: [PATCH 1102/1191] Update jd_price.js --- jd_price.js | 615 ++++++++++++++++++++++++++-------------------------- 1 file changed, 307 insertions(+), 308 deletions(-) diff --git a/jd_price.js b/jd_price.js index fd83914ff..62e231c6e 100644 --- a/jd_price.js +++ b/jd_price.js @@ -13,360 +13,359 @@ const headers = $request.headers; const $tool = tool(); if (url.indexOf(path1) != -1) { - let obj = JSON.parse(body); - if (headers["User-Agent"].indexOf(userAgent) != -1) { - delete obj.serverConfig.httpdns; - delete obj.serverConfig.dnsvip; - delete obj.serverConfig.dnsvip_v6; - } - $done({ body: JSON.stringify(obj) }); + let obj = JSON.parse(body); + if (headers["User-Agent"].indexOf(userAgent) != -1) { + delete obj.serverConfig.httpdns; + delete obj.serverConfig.dnsvip; + delete obj.serverConfig.dnsvip_v6; + } + $done({ body: JSON.stringify(obj) }); } if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (headers["User-Agent"].indexOf(userAgent) != -1) { - delete obj.data.JDHttpToolKit.httpdns; - delete obj.data.JDHttpToolKit.dnsvipV6; - } - $done({ body: JSON.stringify(obj) }); + let obj = JSON.parse(body); + if (headers["User-Agent"].indexOf(userAgent) != -1) { + delete obj.data.JDHttpToolKit.httpdns; + delete obj.data.JDHttpToolKit.dnsvipV6; + } + $done({ body: JSON.stringify(obj) }); } if (url.indexOf(path2) != -1) { - let obj = JSON.parse(body); - const floors = obj.floors; - const commodity_info = floors[floors.length - 1]; - const shareUrl = commodity_info.data.property.shareUrl; - request_history_price(shareUrl, function (data) { - if (data) { - const lowerword = adword_obj(); - lowerword.data.ad.textColor = "#fe0000"; - let bestIndex = 0; - for (let index = 0; index < floors.length; index++) { - const element = floors[index]; - if (element.mId == lowerword.mId) { - bestIndex = index + 1; - break; + let obj = JSON.parse(body); + const floors = obj.floors; + const commodity_info = floors[floors.length - 1]; + const shareUrl = commodity_info.data.property.shareUrl; + request_history_price(shareUrl, function (data) { + if (data) { + const lowerword = adword_obj(); + lowerword.data.ad.textColor = "#fe0000"; + let bestIndex = 0; + for (let index = 0; index < floors.length; index++) { + const element = floors[index]; + if (element.mId == lowerword.mId) { + bestIndex = index + 1; + break; + } else { + if (element.sortId > lowerword.sortId) { + bestIndex = index; + break; + } + } + } + if (data.ok == 1 && data.single) { + const lower = lowerMsgs(data.single); + const detail = priceSummary(data); + const tip = data.PriceRemark.Tip + "(仅供参考)"; + lowerword.data.ad.adword = `${lower} ${tip}\n${detail}`; + floors.insert(bestIndex, lowerword); + } + if (data.ok == 0 && data.msg.length > 0) { + lowerword.data.ad.adword = "⚠️ " + data.msg; + floors.insert(bestIndex, lowerword); + } + $done({ body: JSON.stringify(obj) }); } else { - if (element.sortId > lowerword.sortId) { - bestIndex = index; - break; - } + $done({ body }); } - } - if (data.ok == 1 && data.single) { - const lower = lowerMsgs(data.single); - const detail = priceSummary(data); - const tip = data.PriceRemark.Tip + "(仅供参考)"; - lowerword.data.ad.adword = `${lower} ${tip}\n${detail}`; - floors.insert(bestIndex, lowerword); - } - if (data.ok == 0 && data.msg.length > 0) { - lowerword.data.ad.adword = "⚠️ " + data.msg; - floors.insert(bestIndex, lowerword); - } - $done({ body: JSON.stringify(obj) }); - } else { - $done({ body }); - } - }); + }); } function lowerMsgs(data) { - const lower = data.lowerPriceyh; - const lowerDate = dateFormat(data.lowerDateyh); - const lowerMsg = "〽️历史最低到手价:¥" + String(lower) + ` (${lowerDate}) `; - return lowerMsg; + const lower = data.lowerPriceyh; + const lowerDate = dateFormat(data.lowerDateyh); + const lowerMsg = "〽️历史最低到手价:¥" + String(lower) + ` (${lowerDate}) `; + return lowerMsg; } function priceSummary(data) { - let summary = ""; - let listPriceDetail = data.PriceRemark.ListPriceDetail; - listPriceDetail.pop(); - let list = listPriceDetail.concat(historySummary(data.single)); - list.forEach((item, index) => { - if (item.Name == "双11价格") { - item.Name = "双十一价格"; - } else if (item.Name == "618价格") { - item.Name = "六一八价格"; - } else if (item.Name == "30天最低价") { - item.Name = "三十天最低"; - } - summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${ - item.Date - }${getSpace(8)}${item.Difference}`; - }); - return summary; + let summary = ""; + let listPriceDetail = data.PriceRemark.ListPriceDetail; + listPriceDetail.pop(); + let list = listPriceDetail.concat(historySummary(data.single)); + list.forEach((item, index) => { + if (item.Name == "双11价格") { + item.Name = "双十一价格"; + } else if (item.Name == "618价格") { + item.Name = "六一八价格"; + } else if (item.Name == "30天最低价") { + item.Name = "三十天最低"; + } + summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date + }${getSpace(8)}${item.Difference}`; + }); + return summary; } function historySummary(single) { - const rexMatch = /\[.*?\]/g; - const rexExec = /\[(.*),(.*),"(.*)"\]/; - let currentPrice, lowest60, lowest180, lowest360; - let list = single.jiagequshiyh.match(rexMatch); - list = list.reverse().slice(0, 360); - list.forEach((item, index) => { - if (item.length > 0) { - const result = rexExec.exec(item); - const dateUTC = new Date(eval(result[1])); - const date = dateUTC.format("yyyy-MM-dd"); - let price = parseFloat(result[2]); - if (index == 0) { - currentPrice = price; - lowest60 = { - Name: "六十天最低", - Price: `¥${String(price)}`, - Date: date, - Difference: difference(currentPrice, price), - price, - }; - lowest180 = { - Name: "一百八最低", - Price: `¥${String(price)}`, - Date: date, - Difference: difference(currentPrice, price), - price, - }; - lowest360 = { - Name: "三百六最低", - Price: `¥${String(price)}`, - Date: date, - Difference: difference(currentPrice, price), - price, - }; - } - if (index < 60 && price <= lowest60.price) { - lowest60.price = price; - lowest60.Price = `¥${String(price)}`; - lowest60.Date = date; - lowest60.Difference = difference(currentPrice, price); - } - if (index < 180 && price <= lowest180.price) { - lowest180.price = price; - lowest180.Price = `¥${String(price)}`; - lowest180.Date = date; - lowest180.Difference = difference(currentPrice, price); - } - if (index < 360 && price <= lowest360.price) { - lowest360.price = price; - lowest360.Price = `¥${String(price)}`; - lowest360.Date = date; - lowest360.Difference = difference(currentPrice, price); - } - } - }); - return [lowest60, lowest180, lowest360]; + const rexMatch = /\[.*?\]/g; + const rexExec = /\[(.*),(.*),"(.*)"\]/; + let currentPrice, lowest60, lowest180, lowest360; + let list = single.jiagequshiyh.match(rexMatch); + list = list.reverse().slice(0, 360); + list.forEach((item, index) => { + if (item.length > 0) { + const result = rexExec.exec(item); + const dateUTC = new Date(eval(result[1])); + const date = dateUTC.format("yyyy-MM-dd"); + let price = parseFloat(result[2]); + if (index == 0) { + currentPrice = price; + lowest60 = { + Name: "六十天最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + lowest180 = { + Name: "一百八最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + lowest360 = { + Name: "三百六最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + } + if (index < 60 && price <= lowest60.price) { + lowest60.price = price; + lowest60.Price = `¥${String(price)}`; + lowest60.Date = date; + lowest60.Difference = difference(currentPrice, price); + } + if (index < 180 && price <= lowest180.price) { + lowest180.price = price; + lowest180.Price = `¥${String(price)}`; + lowest180.Date = date; + lowest180.Difference = difference(currentPrice, price); + } + if (index < 360 && price <= lowest360.price) { + lowest360.price = price; + lowest360.Price = `¥${String(price)}`; + lowest360.Date = date; + lowest360.Difference = difference(currentPrice, price); + } + } + }); + return [lowest60, lowest180, lowest360]; } function difference(currentPrice, price) { - let difference = sub(currentPrice, price); - if (difference == 0) { - return "-"; - } else { - return `${difference > 0 ? "↑" : "↓"}${String(difference)}`; - } + let difference = sub(currentPrice, price); + if (difference == 0) { + return "-"; + } else { + return `${difference > 0 ? "↑" : "↓"}${String(difference)}`; + } } function sub(arg1, arg2) { - return add(arg1, -Number(arg2), arguments[2]); + return add(arg1, -Number(arg2), arguments[2]); } function add(arg1, arg2) { - (arg1 = arg1.toString()), (arg2 = arg2.toString()); - var arg1Arr = arg1.split("."), - arg2Arr = arg2.split("."), - d1 = arg1Arr.length == 2 ? arg1Arr[1] : "", - d2 = arg2Arr.length == 2 ? arg2Arr[1] : ""; - var maxLen = Math.max(d1.length, d2.length); - var m = Math.pow(10, maxLen); - var result = Number(((arg1 * m + arg2 * m) / m).toFixed(maxLen)); - var d = arguments[2]; - return typeof d === "number" ? Number(result.toFixed(d)) : result; + (arg1 = arg1.toString()), (arg2 = arg2.toString()); + var arg1Arr = arg1.split("."), + arg2Arr = arg2.split("."), + d1 = arg1Arr.length == 2 ? arg1Arr[1] : "", + d2 = arg2Arr.length == 2 ? arg2Arr[1] : ""; + var maxLen = Math.max(d1.length, d2.length); + var m = Math.pow(10, maxLen); + var result = Number(((arg1 * m + arg2 * m) / m).toFixed(maxLen)); + var d = arguments[2]; + return typeof d === "number" ? Number(result.toFixed(d)) : result; } function request_history_price(share_url, callback) { - const options = { - url: - "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", - headers: { - "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", - "User-Agent": - "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios", - }, - body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent(share_url), - }; - $tool.post(options, function (error, response, data) { - if (!error) { - callback(JSON.parse(data)); - if (consolelog) console.log("Data:\n" + data); - } else { - callback(null, null); - if (consolelog) console.log("Error:\n" + error); - } - }); + const options = { + url: + "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", + headers: { + "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", + "User-Agent": + "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios", + }, + body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent(share_url), + }; + $tool.post(options, function (error, response, data) { + if (!error) { + callback(JSON.parse(data)); + if (consolelog) console.log("Data:\n" + data); + } else { + callback(null, null); + if (consolelog) console.log("Error:\n" + error); + } + }); } function dateFormat(cellval) { - const date = new Date( - parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10) - ); - const month = - date.getMonth() + 1 < 10 - ? "0" + (date.getMonth() + 1) - : date.getMonth() + 1; - const currentDate = - date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); - return date.getFullYear() + "-" + month + "-" + currentDate; + const date = new Date( + parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10) + ); + const month = + date.getMonth() + 1 < 10 + ? "0" + (date.getMonth() + 1) + : date.getMonth() + 1; + const currentDate = + date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); + return date.getFullYear() + "-" + month + "-" + currentDate; } function getSpace(length) { - let blank = ""; - for (let index = 0; index < length; index++) { - blank += " "; - } - return blank; + let blank = ""; + for (let index = 0; index < length; index++) { + blank += " "; + } + return blank; } function adword_obj() { - return { - bId: "eCustom_flo_199", - cf: { - bgc: "#ffffff", - spl: "empty", - }, - data: { - ad: { - adword: "", - textColor: "#8C8C8C", - color: "#f23030", - newALContent: true, - hasFold: true, - class: "com.jd.app.server.warecoresoa.domain.AdWordInfo.AdWordInfo", - adLinkContent: "", - adLink: "", - }, - }, - mId: "bpAdword", - refId: "eAdword_0000000028", - sortId: 13, - }; + return { + bId: "eCustom_flo_199", + cf: { + bgc: "#ffffff", + spl: "empty", + }, + data: { + ad: { + adword: "", + textColor: "#8C8C8C", + color: "#f23030", + newALContent: true, + hasFold: true, + class: "com.jd.app.server.warecoresoa.domain.AdWordInfo.AdWordInfo", + adLinkContent: "", + adLink: "", + }, + }, + mId: "bpAdword", + refId: "eAdword_0000000028", + sortId: 13, + }; } function tool() { - const isSurge = typeof $httpClient != "undefined"; - const isQuanX = typeof $task != "undefined"; - const isResponse = typeof $response != "undefined"; - const node = (() => { - if (typeof require == "function") { - const request = require("request"); - return { request }; - } else { - return null; - } - })(); - const notify = (title, subtitle, message) => { - if (isQuanX) $notify(title, subtitle, message); - if (isSurge) $notification.post(title, subtitle, message); - if (node) console.log(JSON.stringify({ title, subtitle, message })); - }; - const write = (value, key) => { - if (isQuanX) return $prefs.setValueForKey(value, key); - if (isSurge) return $persistentStore.write(value, key); - }; - const read = (key) => { - if (isQuanX) return $prefs.valueForKey(key); - if (isSurge) return $persistentStore.read(key); - }; - const adapterStatus = (response) => { - if (response) { - if (response.status) { - response["statusCode"] = response.status; - } else if (response.statusCode) { - response["status"] = response.statusCode; - } - } - return response; - }; - const get = (options, callback) => { - if (isQuanX) { - if (typeof options == "string") options = { url: options }; - options["method"] = "GET"; - $task.fetch(options).then( - (response) => { - callback(null, adapterStatus(response), response.body); - }, - (reason) => callback(reason.error, null, null) - ); - } - if (isSurge) - $httpClient.get(options, (error, response, body) => { - callback(error, adapterStatus(response), body); - }); - if (node) { - node.request(options, (error, response, body) => { - callback(error, adapterStatus(response), body); - }); - } - }; - const post = (options, callback) => { - if (isQuanX) { - if (typeof options == "string") options = { url: options }; - options["method"] = "POST"; - $task.fetch(options).then( - (response) => { - callback(null, adapterStatus(response), response.body); - }, - (reason) => callback(reason.error, null, null) - ); - } - if (isSurge) { - $httpClient.post(options, (error, response, body) => { - callback(error, adapterStatus(response), body); - }); - } - if (node) { - node.request.post(options, (error, response, body) => { - callback(error, adapterStatus(response), body); - }); - } - }; - return { isQuanX, isSurge, isResponse, notify, write, read, get, post }; + const isSurge = typeof $httpClient != "undefined"; + const isQuanX = typeof $task != "undefined"; + const isResponse = typeof $response != "undefined"; + const node = (() => { + if (typeof require == "function") { + const request = require("request"); + return { request }; + } else { + return null; + } + })(); + const notify = (title, subtitle, message) => { + if (isQuanX) $notify(title, subtitle, message); + if (isSurge) $notification.post(title, subtitle, message); + if (node) console.log(JSON.stringify({ title, subtitle, message })); + }; + const write = (value, key) => { + if (isQuanX) return $prefs.setValueForKey(value, key); + if (isSurge) return $persistentStore.write(value, key); + }; + const read = (key) => { + if (isQuanX) return $prefs.valueForKey(key); + if (isSurge) return $persistentStore.read(key); + }; + const adapterStatus = (response) => { + if (response) { + if (response.status) { + response["statusCode"] = response.status; + } else if (response.statusCode) { + response["status"] = response.statusCode; + } + } + return response; + }; + const get = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options }; + options["method"] = "GET"; + $task.fetch(options).then( + (response) => { + callback(null, adapterStatus(response), response.body); + }, + (reason) => callback(reason.error, null, null) + ); + } + if (isSurge) + $httpClient.get(options, (error, response, body) => { + callback(error, adapterStatus(response), body); + }); + if (node) { + node.request(options, (error, response, body) => { + callback(error, adapterStatus(response), body); + }); + } + }; + const post = (options, callback) => { + if (isQuanX) { + if (typeof options == "string") options = { url: options }; + options["method"] = "POST"; + $task.fetch(options).then( + (response) => { + callback(null, adapterStatus(response), response.body); + }, + (reason) => callback(reason.error, null, null) + ); + } + if (isSurge) { + $httpClient.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body); + }); + } + if (node) { + node.request.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body); + }); + } + }; + return { isQuanX, isSurge, isResponse, notify, write, read, get, post }; } Array.prototype.insert = function (index, item) { - this.splice(index, 0, item); + this.splice(index, 0, item); }; Date.prototype.format = function (fmt) { - var o = { - "y+": this.getFullYear(), - "M+": this.getMonth() + 1, - "d+": this.getDate(), - "h+": this.getHours(), - "m+": this.getMinutes(), - "s+": this.getSeconds(), - "q+": Math.floor((this.getMonth() + 3) / 3), - "S+": this.getMilliseconds(), - }; - for (var k in o) { - if (new RegExp("(" + k + ")").test(fmt)) { - if (k == "y+") { - fmt = fmt.replace(RegExp.$1, ("" + o[k]).substr(4 - RegExp.$1.length)); - } else if (k == "S+") { - var lens = RegExp.$1.length; - lens = lens == 1 ? 3 : lens; - fmt = fmt.replace( - RegExp.$1, - ("00" + o[k]).substr(("" + o[k]).length - 1, lens) - ); - } else { - fmt = fmt.replace( - RegExp.$1, - RegExp.$1.length == 1 - ? o[k] - : ("00" + o[k]).substr(("" + o[k]).length) - ); - } + var o = { + "y+": this.getFullYear(), + "M+": this.getMonth() + 1, + "d+": this.getDate(), + "h+": this.getHours(), + "m+": this.getMinutes(), + "s+": this.getSeconds(), + "q+": Math.floor((this.getMonth() + 3) / 3), + "S+": this.getMilliseconds(), + }; + for (var k in o) { + if (new RegExp("(" + k + ")").test(fmt)) { + if (k == "y+") { + fmt = fmt.replace(RegExp.$1, ("" + o[k]).substr(4 - RegExp.$1.length)); + } else if (k == "S+") { + var lens = RegExp.$1.length; + lens = lens == 1 ? 3 : lens; + fmt = fmt.replace( + RegExp.$1, + ("00" + o[k]).substr(("" + o[k]).length - 1, lens) + ); + } else { + fmt = fmt.replace( + RegExp.$1, + RegExp.$1.length == 1 + ? o[k] + : ("00" + o[k]).substr(("" + o[k]).length) + ); + } + } } - } - return fmt; + return fmt; }; From 4c200b25bb54ec97bb614ab3fd99b9e7bcf33142 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 7 Oct 2020 13:41:50 +0800 Subject: [PATCH 1103/1191] Update jd_price.js --- jd_price.js | 88 ++++++++++++++++++++++++++--------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/jd_price.js b/jd_price.js index 62e231c6e..002a1435f 100644 --- a/jd_price.js +++ b/jd_price.js @@ -12,63 +12,63 @@ const body = $response.body; const headers = $request.headers; const $tool = tool(); -if (url.indexOf(path1) != -1) { - let obj = JSON.parse(body); - if (headers["User-Agent"].indexOf(userAgent) != -1) { +if (headers["User-Agent"].indexOf(userAgent) != -1) { + if (url.indexOf(path1) != -1) { + let obj = JSON.parse(body); delete obj.serverConfig.httpdns; delete obj.serverConfig.dnsvip; delete obj.serverConfig.dnsvip_v6; + $done({ body: JSON.stringify(obj) }); } - $done({ body: JSON.stringify(obj) }); -} -if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (headers["User-Agent"].indexOf(userAgent) != -1) { + if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); delete obj.data.JDHttpToolKit.httpdns; delete obj.data.JDHttpToolKit.dnsvipV6; + $done({ body: JSON.stringify(obj) }); } - $done({ body: JSON.stringify(obj) }); -} -if (url.indexOf(path2) != -1) { - let obj = JSON.parse(body); - const floors = obj.floors; - const commodity_info = floors[floors.length - 1]; - const shareUrl = commodity_info.data.property.shareUrl; - request_history_price(shareUrl, function (data) { - if (data) { - const lowerword = adword_obj(); - lowerword.data.ad.textColor = "#fe0000"; - let bestIndex = 0; - for (let index = 0; index < floors.length; index++) { - const element = floors[index]; - if (element.mId == lowerword.mId) { - bestIndex = index + 1; - break; - } else { - if (element.sortId > lowerword.sortId) { - bestIndex = index; + if (url.indexOf(path2) != -1) { + let obj = JSON.parse(body); + const floors = obj.floors; + const commodity_info = floors[floors.length - 1]; + const shareUrl = commodity_info.data.property.shareUrl; + request_history_price(shareUrl, function (data) { + if (data) { + const lowerword = adword_obj(); + lowerword.data.ad.textColor = "#fe0000"; + let bestIndex = 0; + for (let index = 0; index < floors.length; index++) { + const element = floors[index]; + if (element.mId == lowerword.mId) { + bestIndex = index + 1; break; + } else { + if (element.sortId > lowerword.sortId) { + bestIndex = index; + break; + } } } + if (data.ok == 1 && data.single) { + const lower = lowerMsgs(data.single); + const detail = priceSummary(data); + const tip = data.PriceRemark.Tip + "(仅供参考)"; + lowerword.data.ad.adword = `${lower} ${tip}\n${detail}`; + floors.insert(bestIndex, lowerword); + } + if (data.ok == 0 && data.msg.length > 0) { + lowerword.data.ad.adword = "⚠️ " + data.msg; + floors.insert(bestIndex, lowerword); + } + $done({ body: JSON.stringify(obj) }); + } else { + $done({ body }); } - if (data.ok == 1 && data.single) { - const lower = lowerMsgs(data.single); - const detail = priceSummary(data); - const tip = data.PriceRemark.Tip + "(仅供参考)"; - lowerword.data.ad.adword = `${lower} ${tip}\n${detail}`; - floors.insert(bestIndex, lowerword); - } - if (data.ok == 0 && data.msg.length > 0) { - lowerword.data.ad.adword = "⚠️ " + data.msg; - floors.insert(bestIndex, lowerword); - } - $done({ body: JSON.stringify(obj) }); - } else { - $done({ body }); - } - }); + }); + } +} else { + $done({ body }); } function lowerMsgs(data) { From 3a771af7e637def908a6639115fedbe4fe1aec30 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 7 Oct 2020 13:44:24 +0800 Subject: [PATCH 1104/1191] Update jd_price.js --- jd_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd_price.js b/jd_price.js index 002a1435f..d70a694a3 100644 --- a/jd_price.js +++ b/jd_price.js @@ -68,7 +68,7 @@ if (headers["User-Agent"].indexOf(userAgent) != -1) { }); } } else { - $done({ body }); + $done({}); } function lowerMsgs(data) { From a07c43b94c02f6ad2390221b2349b9422f113a05 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 7 Oct 2020 13:58:38 +0800 Subject: [PATCH 1105/1191] Update jd_price.js --- jd_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd_price.js b/jd_price.js index d70a694a3..5d00a0f89 100644 --- a/jd_price.js +++ b/jd_price.js @@ -9,7 +9,7 @@ const userAgent = "JD4iPhone"; const consolelog = false; const url = $request.url; const body = $response.body; -const headers = $request.headers; +const headers = $response.headers; const $tool = tool(); if (headers["User-Agent"].indexOf(userAgent) != -1) { From bff69f03b3d8dcd7da7d3ed9ca85185067f40ee9 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 7 Oct 2020 14:03:26 +0800 Subject: [PATCH 1106/1191] Update jd_price.js --- jd_price.js | 371 +++++++++++++++++++++++----------------------------- 1 file changed, 161 insertions(+), 210 deletions(-) diff --git a/jd_price.js b/jd_price.js index 5d00a0f89..beb153ab7 100644 --- a/jd_price.js +++ b/jd_price.js @@ -5,102 +5,95 @@ README:https://github.com/yichahucha/surge/tree/master const path1 = "serverConfig"; const path2 = "wareBusiness"; const path3 = "basicConfig"; -const userAgent = "JD4iPhone"; const consolelog = false; const url = $request.url; const body = $response.body; -const headers = $response.headers; const $tool = tool(); -if (headers["User-Agent"].indexOf(userAgent) != -1) { - if (url.indexOf(path1) != -1) { - let obj = JSON.parse(body); - delete obj.serverConfig.httpdns; - delete obj.serverConfig.dnsvip; - delete obj.serverConfig.dnsvip_v6; - $done({ body: JSON.stringify(obj) }); - } +if (url.indexOf(path1) != -1) { + let obj = JSON.parse(body); + delete obj.serverConfig.httpdns; + delete obj.serverConfig.dnsvip; + delete obj.serverConfig.dnsvip_v6; + $done({ body: JSON.stringify(obj) }); +} - if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - delete obj.data.JDHttpToolKit.httpdns; - delete obj.data.JDHttpToolKit.dnsvipV6; - $done({ body: JSON.stringify(obj) }); - } +if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + delete obj.data.JDHttpToolKit.httpdns; + delete obj.data.JDHttpToolKit.dnsvipV6; + $done({ body: JSON.stringify(obj) }); +} - if (url.indexOf(path2) != -1) { - let obj = JSON.parse(body); - const floors = obj.floors; - const commodity_info = floors[floors.length - 1]; - const shareUrl = commodity_info.data.property.shareUrl; - request_history_price(shareUrl, function (data) { - if (data) { - const lowerword = adword_obj(); - lowerword.data.ad.textColor = "#fe0000"; - let bestIndex = 0; - for (let index = 0; index < floors.length; index++) { - const element = floors[index]; - if (element.mId == lowerword.mId) { - bestIndex = index + 1; +if (url.indexOf(path2) != -1) { + let obj = JSON.parse(body); + const floors = obj.floors; + const commodity_info = floors[floors.length - 1]; + const shareUrl = commodity_info.data.property.shareUrl; + request_history_price(shareUrl, function (data) { + if (data) { + const lowerword = adword_obj(); + lowerword.data.ad.textColor = "#fe0000"; + let bestIndex = 0; + for (let index = 0; index < floors.length; index++) { + const element = floors[index]; + if (element.mId == lowerword.mId) { + bestIndex = index + 1; + break; + } else { + if (element.sortId > lowerword.sortId) { + bestIndex = index; break; - } else { - if (element.sortId > lowerword.sortId) { - bestIndex = index; - break; - } } } - if (data.ok == 1 && data.single) { - const lower = lowerMsgs(data.single); - const detail = priceSummary(data); - const tip = data.PriceRemark.Tip + "(仅供参考)"; - lowerword.data.ad.adword = `${lower} ${tip}\n${detail}`; - floors.insert(bestIndex, lowerword); - } - if (data.ok == 0 && data.msg.length > 0) { - lowerword.data.ad.adword = "⚠️ " + data.msg; - floors.insert(bestIndex, lowerword); - } - $done({ body: JSON.stringify(obj) }); - } else { - $done({ body }); } - }); - } -} else { - $done({}); + if (data.ok == 1 && data.single) { + const lower = lowerMsgs(data.single) + const detail = priceSummary(data) + const tip = data.PriceRemark.Tip + "(仅供参考)" + lowerword.data.ad.adword = `${lower} ${tip}\n${detail}`; + floors.insert(bestIndex, lowerword); + } + if (data.ok == 0 && data.msg.length > 0) { + lowerword.data.ad.adword = "⚠️ " + data.msg; + floors.insert(bestIndex, lowerword); + } + $done({ body: JSON.stringify(obj) }); + } else { + $done({ body }); + } + }) } function lowerMsgs(data) { - const lower = data.lowerPriceyh; - const lowerDate = dateFormat(data.lowerDateyh); - const lowerMsg = "〽️历史最低到手价:¥" + String(lower) + ` (${lowerDate}) `; - return lowerMsg; + const lower = data.lowerPriceyh + const lowerDate = dateFormat(data.lowerDateyh) + const lowerMsg = "〽️历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` + return lowerMsg } function priceSummary(data) { - let summary = ""; - let listPriceDetail = data.PriceRemark.ListPriceDetail; - listPriceDetail.pop(); - let list = listPriceDetail.concat(historySummary(data.single)); + let summary = "" + let listPriceDetail = data.PriceRemark.ListPriceDetail + listPriceDetail.pop() + let list = listPriceDetail.concat(historySummary(data.single)) list.forEach((item, index) => { if (item.Name == "双11价格") { - item.Name = "双十一价格"; + item.Name = "双十一价格" } else if (item.Name == "618价格") { - item.Name = "六一八价格"; + item.Name = "六一八价格" } else if (item.Name == "30天最低价") { - item.Name = "三十天最低"; + item.Name = "三十天最低" } - summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date - }${getSpace(8)}${item.Difference}`; - }); - return summary; + summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date}${getSpace(8)}${item.Difference}` + }) + return summary } function historySummary(single) { const rexMatch = /\[.*?\]/g; const rexExec = /\[(.*),(.*),"(.*)"\]/; - let currentPrice, lowest60, lowest180, lowest360; + let currentPrice, lowest60, lowest180, lowest360 let list = single.jiagequshiyh.match(rexMatch); list = list.reverse().slice(0, 360); list.forEach((item, index) => { @@ -110,46 +103,28 @@ function historySummary(single) { const date = dateUTC.format("yyyy-MM-dd"); let price = parseFloat(result[2]); if (index == 0) { - currentPrice = price; - lowest60 = { - Name: "六十天最低", - Price: `¥${String(price)}`, - Date: date, - Difference: difference(currentPrice, price), - price, - }; - lowest180 = { - Name: "一百八最低", - Price: `¥${String(price)}`, - Date: date, - Difference: difference(currentPrice, price), - price, - }; - lowest360 = { - Name: "三百六最低", - Price: `¥${String(price)}`, - Date: date, - Difference: difference(currentPrice, price), - price, - }; + currentPrice = price + lowest60 = { Name: "六十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest180 = { Name: "一百八最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest360 = { Name: "三百六最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } } if (index < 60 && price <= lowest60.price) { - lowest60.price = price; - lowest60.Price = `¥${String(price)}`; - lowest60.Date = date; - lowest60.Difference = difference(currentPrice, price); + lowest60.price = price + lowest60.Price = `¥${String(price)}` + lowest60.Date = date + lowest60.Difference = difference(currentPrice, price) } if (index < 180 && price <= lowest180.price) { - lowest180.price = price; - lowest180.Price = `¥${String(price)}`; - lowest180.Date = date; - lowest180.Difference = difference(currentPrice, price); + lowest180.price = price + lowest180.Price = `¥${String(price)}` + lowest180.Date = date + lowest180.Difference = difference(currentPrice, price) } if (index < 360 && price <= lowest360.price) { - lowest360.price = price; - lowest360.Price = `¥${String(price)}`; - lowest360.Date = date; - lowest360.Difference = difference(currentPrice, price); + lowest360.price = price + lowest360.Price = `¥${String(price)}` + lowest360.Date = date + lowest360.Difference = difference(currentPrice, price) } } }); @@ -157,11 +132,11 @@ function historySummary(single) { } function difference(currentPrice, price) { - let difference = sub(currentPrice, price); + let difference = sub(currentPrice, price) if (difference == 0) { - return "-"; + return "-" } else { - return `${difference > 0 ? "↑" : "↓"}${String(difference)}`; + return `${difference > 0 ? "↑" : "↓"}${String(difference)}` } } @@ -170,29 +145,24 @@ function sub(arg1, arg2) { } function add(arg1, arg2) { - (arg1 = arg1.toString()), (arg2 = arg2.toString()); - var arg1Arr = arg1.split("."), - arg2Arr = arg2.split("."), - d1 = arg1Arr.length == 2 ? arg1Arr[1] : "", - d2 = arg2Arr.length == 2 ? arg2Arr[1] : ""; + arg1 = arg1.toString(), arg2 = arg2.toString(); + var arg1Arr = arg1.split("."), arg2Arr = arg2.split("."), d1 = arg1Arr.length == 2 ? arg1Arr[1] : "", d2 = arg2Arr.length == 2 ? arg2Arr[1] : ""; var maxLen = Math.max(d1.length, d2.length); var m = Math.pow(10, maxLen); var result = Number(((arg1 * m + arg2 * m) / m).toFixed(maxLen)); var d = arguments[2]; - return typeof d === "number" ? Number(result.toFixed(d)) : result; + return typeof d === "number" ? Number((result).toFixed(d)) : result; } function request_history_price(share_url, callback) { const options = { - url: - "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", + url: "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", headers: { "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", - "User-Agent": - "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" }, - body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent(share_url), - }; + body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent(share_url) + } $tool.post(options, function (error, response, data) { if (!error) { callback(JSON.parse(data)); @@ -201,19 +171,13 @@ function request_history_price(share_url, callback) { callback(null, null); if (consolelog) console.log("Error:\n" + error); } - }); + }) } function dateFormat(cellval) { - const date = new Date( - parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10) - ); - const month = - date.getMonth() + 1 < 10 - ? "0" + (date.getMonth() + 1) - : date.getMonth() + 1; - const currentDate = - date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); + const date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10)); + const month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; + const currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); return date.getFullYear() + "-" + month + "-" + currentDate; } @@ -227,108 +191,101 @@ function getSpace(length) { function adword_obj() { return { - bId: "eCustom_flo_199", - cf: { - bgc: "#ffffff", - spl: "empty", + "bId": "eCustom_flo_199", + "cf": { + "bgc": "#ffffff", + "spl": "empty" }, - data: { - ad: { - adword: "", - textColor: "#8C8C8C", - color: "#f23030", - newALContent: true, - hasFold: true, - class: "com.jd.app.server.warecoresoa.domain.AdWordInfo.AdWordInfo", - adLinkContent: "", - adLink: "", - }, + "data": { + "ad": { + "adword": "", + "textColor": "#8C8C8C", + "color": "#f23030", + "newALContent": true, + "hasFold": true, + "class": "com.jd.app.server.warecoresoa.domain.AdWordInfo.AdWordInfo", + "adLinkContent": "", + "adLink": "" + } }, - mId: "bpAdword", - refId: "eAdword_0000000028", - sortId: 13, - }; + "mId": "bpAdword", + "refId": "eAdword_0000000028", + "sortId": 13 + } } function tool() { - const isSurge = typeof $httpClient != "undefined"; - const isQuanX = typeof $task != "undefined"; - const isResponse = typeof $response != "undefined"; + const isSurge = typeof $httpClient != "undefined" + const isQuanX = typeof $task != "undefined" + const isResponse = typeof $response != "undefined" const node = (() => { if (typeof require == "function") { - const request = require("request"); - return { request }; + const request = require('request') + return ({ request }) } else { - return null; + return (null) } - })(); + })() const notify = (title, subtitle, message) => { - if (isQuanX) $notify(title, subtitle, message); - if (isSurge) $notification.post(title, subtitle, message); + if (isQuanX) $notify(title, subtitle, message) + if (isSurge) $notification.post(title, subtitle, message) if (node) console.log(JSON.stringify({ title, subtitle, message })); - }; + } const write = (value, key) => { - if (isQuanX) return $prefs.setValueForKey(value, key); - if (isSurge) return $persistentStore.write(value, key); - }; + if (isQuanX) return $prefs.setValueForKey(value, key) + if (isSurge) return $persistentStore.write(value, key) + } const read = (key) => { - if (isQuanX) return $prefs.valueForKey(key); - if (isSurge) return $persistentStore.read(key); - }; + if (isQuanX) return $prefs.valueForKey(key) + if (isSurge) return $persistentStore.read(key) + } const adapterStatus = (response) => { if (response) { if (response.status) { - response["statusCode"] = response.status; + response["statusCode"] = response.status } else if (response.statusCode) { - response["status"] = response.statusCode; + response["status"] = response.statusCode } } - return response; - }; + return response + } const get = (options, callback) => { if (isQuanX) { - if (typeof options == "string") options = { url: options }; - options["method"] = "GET"; - $task.fetch(options).then( - (response) => { - callback(null, adapterStatus(response), response.body); - }, - (reason) => callback(reason.error, null, null) - ); + if (typeof options == "string") options = { url: options } + options["method"] = "GET" + $task.fetch(options).then(response => { + callback(null, adapterStatus(response), response.body) + }, reason => callback(reason.error, null, null)) } - if (isSurge) - $httpClient.get(options, (error, response, body) => { - callback(error, adapterStatus(response), body); - }); + if (isSurge) $httpClient.get(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) if (node) { node.request(options, (error, response, body) => { - callback(error, adapterStatus(response), body); - }); + callback(error, adapterStatus(response), body) + }) } - }; + } const post = (options, callback) => { if (isQuanX) { - if (typeof options == "string") options = { url: options }; - options["method"] = "POST"; - $task.fetch(options).then( - (response) => { - callback(null, adapterStatus(response), response.body); - }, - (reason) => callback(reason.error, null, null) - ); + if (typeof options == "string") options = { url: options } + options["method"] = "POST" + $task.fetch(options).then(response => { + callback(null, adapterStatus(response), response.body) + }, reason => callback(reason.error, null, null)) } if (isSurge) { $httpClient.post(options, (error, response, body) => { - callback(error, adapterStatus(response), body); - }); + callback(error, adapterStatus(response), body) + }) } if (node) { node.request.post(options, (error, response, body) => { - callback(error, adapterStatus(response), body); - }); + callback(error, adapterStatus(response), body) + }) } - }; - return { isQuanX, isSurge, isResponse, notify, write, read, get, post }; + } + return { isQuanX, isSurge, isResponse, notify, write, read, get, post } } Array.prototype.insert = function (index, item) { @@ -344,28 +301,22 @@ Date.prototype.format = function (fmt) { "m+": this.getMinutes(), "s+": this.getSeconds(), "q+": Math.floor((this.getMonth() + 3) / 3), - "S+": this.getMilliseconds(), + "S+": this.getMilliseconds() }; for (var k in o) { if (new RegExp("(" + k + ")").test(fmt)) { if (k == "y+") { fmt = fmt.replace(RegExp.$1, ("" + o[k]).substr(4 - RegExp.$1.length)); - } else if (k == "S+") { + } + else if (k == "S+") { var lens = RegExp.$1.length; lens = lens == 1 ? 3 : lens; - fmt = fmt.replace( - RegExp.$1, - ("00" + o[k]).substr(("" + o[k]).length - 1, lens) - ); - } else { - fmt = fmt.replace( - RegExp.$1, - RegExp.$1.length == 1 - ? o[k] - : ("00" + o[k]).substr(("" + o[k]).length) - ); + fmt = fmt.replace(RegExp.$1, ("00" + o[k]).substr(("" + o[k]).length - 1, lens)); + } + else { + fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); } } } return fmt; -}; +} From 90e3ab489b7f43fbf6edd209a01bdd874f5a19c7 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 7 Oct 2020 14:36:50 +0800 Subject: [PATCH 1107/1191] Update jd_price.js --- jd_price.js | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/jd_price.js b/jd_price.js index beb153ab7..3279582dc 100644 --- a/jd_price.js +++ b/jd_price.js @@ -11,18 +11,26 @@ const body = $response.body; const $tool = tool(); if (url.indexOf(path1) != -1) { - let obj = JSON.parse(body); - delete obj.serverConfig.httpdns; - delete obj.serverConfig.dnsvip; - delete obj.serverConfig.dnsvip_v6; - $done({ body: JSON.stringify(obj) }); + try { + let obj = JSON.parse(body); + delete obj.serverConfig.httpdns; + delete obj.serverConfig.dnsvip; + delete obj.serverConfig.dnsvip_v6; + $done({ body: JSON.stringify(obj) }); + } catch (error) { + $done({ body }); + } } if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - delete obj.data.JDHttpToolKit.httpdns; - delete obj.data.JDHttpToolKit.dnsvipV6; - $done({ body: JSON.stringify(obj) }); + try { + let obj = JSON.parse(body); + delete obj.data.JDHttpToolKit.httpdns; + delete obj.data.JDHttpToolKit.dnsvipV6; + $done({ body: JSON.stringify(obj) }); + } catch (error) { + $done({ body }); + } } if (url.indexOf(path2) != -1) { From 4f2e80267abe523ab6929dd80f3952c36bc8cb9e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Wed, 7 Oct 2020 14:47:12 +0800 Subject: [PATCH 1108/1191] Update jd_price.js --- jd_price.js | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/jd_price.js b/jd_price.js index 3279582dc..ed1fd008c 100644 --- a/jd_price.js +++ b/jd_price.js @@ -11,26 +11,21 @@ const body = $response.body; const $tool = tool(); if (url.indexOf(path1) != -1) { - try { - let obj = JSON.parse(body); - delete obj.serverConfig.httpdns; - delete obj.serverConfig.dnsvip; - delete obj.serverConfig.dnsvip_v6; - $done({ body: JSON.stringify(obj) }); - } catch (error) { - $done({ body }); - } + let obj = JSON.parse(body); + delete obj.serverConfig.httpdns; + delete obj.serverConfig.dnsvip; + delete obj.serverConfig.dnsvip_v6; + $done({ body: JSON.stringify(obj) }); } if (url.indexOf(path3) != -1) { - try { - let obj = JSON.parse(body); + let obj = JSON.parse(body); + let JDHttpToolKit = obj.data.JDHttpToolKit; + if (JDHttpToolKit) { delete obj.data.JDHttpToolKit.httpdns; delete obj.data.JDHttpToolKit.dnsvipV6; - $done({ body: JSON.stringify(obj) }); - } catch (error) { - $done({ body }); } + $done({ body: JSON.stringify(obj) }); $done({ body }); } if (url.indexOf(path2) != -1) { From 7c971cfb5ea99274339653952712a98690a05d0a Mon Sep 17 00:00:00 2001 From: zZPiglet Date: Tue, 27 Oct 2020 12:21:37 +0800 Subject: [PATCH 1109/1191] fixed, thanks @mieqq --- jd_price.js | 2 +- jd_price_lite.js | 2 +- tb_price.js | 2 +- tb_price_lite.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jd_price.js b/jd_price.js index ed1fd008c..87e590997 100644 --- a/jd_price.js +++ b/jd_price.js @@ -95,7 +95,7 @@ function priceSummary(data) { function historySummary(single) { const rexMatch = /\[.*?\]/g; - const rexExec = /\[(.*),(.*),"(.*)"\]/; + const rexExec = /\[(.*),(.*),"(.*)".*\]/; let currentPrice, lowest60, lowest180, lowest360 let list = single.jiagequshiyh.match(rexMatch); list = list.reverse().slice(0, 360); diff --git a/jd_price_lite.js b/jd_price_lite.js index 669d116e0..de87fe5c2 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -73,7 +73,7 @@ function priceSummary(data) { function historySummary(single) { const rexMatch = /\[.*?\]/g; - const rexExec = /\[(.*),(.*),"(.*)"\]/; + const rexExec = /\[(.*),(.*),"(.*)".*\]/; let currentPrice, lowest60, lowest180, lowest360 let list = single.jiagequshiyh.match(rexMatch); list = list.reverse().slice(0, 360); diff --git a/tb_price.js b/tb_price.js index 2b9ed0a9d..3c72a95f0 100644 --- a/tb_price.js +++ b/tb_price.js @@ -186,7 +186,7 @@ function priceSummary(data) { function historySummary(single) { const rexMatch = /\[.*?\]/g; - const rexExec = /\[(.*),(.*),"(.*)"\]/; + const rexExec = /\[(.*),(.*),"(.*)".*\]/; let currentPrice, lowest60, lowest180, lowest360 let list = single.jiagequshiyh.match(rexMatch); list = list.reverse().slice(0, 360); diff --git a/tb_price_lite.js b/tb_price_lite.js index d7d212ce1..6e650c187 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -96,7 +96,7 @@ function priceSummary(data) { function historySummary(single) { const rexMatch = /\[.*?\]/g; - const rexExec = /\[(.*),(.*),"(.*)"\]/; + const rexExec = /\[(.*),(.*),"(.*)".*\]/; let currentPrice, lowest60, lowest180, lowest360 let list = single.jiagequshiyh.match(rexMatch); list = list.reverse().slice(0, 360); From 7cb4844118eaddcb119f2c9bced6a01caf12b579 Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 27 Oct 2020 12:22:44 +0800 Subject: [PATCH 1110/1191] Update jd_price.js --- jd_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd_price.js b/jd_price.js index ed1fd008c..7d3f9ab5f 100644 --- a/jd_price.js +++ b/jd_price.js @@ -97,7 +97,7 @@ function historySummary(single) { const rexMatch = /\[.*?\]/g; const rexExec = /\[(.*),(.*),"(.*)"\]/; let currentPrice, lowest60, lowest180, lowest360 - let list = single.jiagequshiyh.match(rexMatch); + let list = single.jiagequshi.match(rexMatch); list = list.reverse().slice(0, 360); list.forEach((item, index) => { if (item.length > 0) { From 1b7583848c90f9a63296fc4cd7861970ef82928e Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 27 Oct 2020 12:36:01 +0800 Subject: [PATCH 1111/1191] fix --- jd_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd_price.js b/jd_price.js index 7d3f9ab5f..ed1fd008c 100644 --- a/jd_price.js +++ b/jd_price.js @@ -97,7 +97,7 @@ function historySummary(single) { const rexMatch = /\[.*?\]/g; const rexExec = /\[(.*),(.*),"(.*)"\]/; let currentPrice, lowest60, lowest180, lowest360 - let list = single.jiagequshi.match(rexMatch); + let list = single.jiagequshiyh.match(rexMatch); list = list.reverse().slice(0, 360); list.forEach((item, index) => { if (item.length > 0) { From e31bf4894432d2621ecbe99fe19d5a2597597c2a Mon Sep 17 00:00:00 2001 From: tern <12595948+yichahucha@users.noreply.github.com> Date: Tue, 3 Nov 2020 17:44:42 +0800 Subject: [PATCH 1112/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b21a3f900..7ebddadc3 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positiv hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` -Display netflix ratings(IMDb) +Display netflix ratings(IMDb、~~douban~~) ```properties [Script] http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js @@ -57,7 +57,7 @@ Weibo hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` -Display netflix ratings(IMDb、douaban) +Display netflix ratings(IMDb、~~douban~~) ```properties [rewrite_local] ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header nf_rating.js From 5afed0313533e9e20a0c1960c456f395a4feb35e Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Thu, 3 Dec 2020 15:48:52 +0800 Subject: [PATCH 1113/1191] Update README.md --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7ebddadc3..ae3f97d28 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,8 @@ cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/s Weibo ```properties [rewrite_local] -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) url script-response-body wb_ad.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js [mitm] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` @@ -60,8 +60,8 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com Display netflix ratings(IMDb、~~douban~~) ```properties [rewrite_local] -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header nf_rating.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body nf_rating.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js [mitm] hostname = ios.prod.ftl.netflix.com ``` @@ -69,7 +69,7 @@ hostname = ios.prod.ftl.netflix.com Display jd historical price ```properties [rewrite_local] -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body jd_price.js +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js [mitm] hostname = api.m.jd.com ``` @@ -78,8 +78,8 @@ Display taobao historical price ```properties # 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [rewrite_local] -^http://.+/amdc/mobileDispatch url script-request-body tb_price.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body tb_price.js +^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [mitm] hostname = trade-acs.m.taobao.com ``` @@ -87,5 +87,5 @@ hostname = trade-acs.m.taobao.com DingDing clock in ```properties [task_local] -0 9,18 * * 1-5 clock_in.js +0 9,18 * * 1-5 https://raw.githubusercontent.com/yichahucha/surge/master/clock_in.js ``` From 5040664cbfca7418389885429ef16ffe354d6c21 Mon Sep 17 00:00:00 2001 From: goose Date: Fri, 4 Dec 2020 14:16:17 +0800 Subject: [PATCH 1114/1191] rm live/media_homelist --- .history/README_20201204134114.md | 91 ++++++++++ .history/README_20201204134653.md | 91 ++++++++++ .history/loon_sub_20201204134114.conf | 12 ++ .history/loon_sub_20201204134653.conf | 12 ++ .history/qx_sub_20201204134114.txt | 15 ++ .history/qx_sub_20201204134653.txt | 15 ++ .history/sg_sub_20201204134114.sgmodule | 19 ++ .history/sg_sub_20201204134653.sgmodule | 19 ++ .history/wb_ad_20201204134114.js | 208 ++++++++++++++++++++++ .history/wb_ad_20201204134726.js | 213 ++++++++++++++++++++++ .history/wb_ad_20201204134728.js | 213 ++++++++++++++++++++++ .history/wb_ad_20201204134731.js | 213 ++++++++++++++++++++++ .history/wb_ad_20201204134757.js | 209 ++++++++++++++++++++++ .history/wb_ad_20201204134837.js | 210 ++++++++++++++++++++++ .history/wb_ad_20201204134840.js | 210 ++++++++++++++++++++++ .history/wb_ad_20201204134848.js | 214 ++++++++++++++++++++++ .history/wb_ad_20201204134857.js | 214 ++++++++++++++++++++++ .history/wb_ad_20201204134858.js | 214 ++++++++++++++++++++++ .history/wb_ad_20201204134901.js | 214 ++++++++++++++++++++++ .history/wb_ad_20201204134904.js | 214 ++++++++++++++++++++++ .history/wb_ad_20201204134905.js | 214 ++++++++++++++++++++++ .history/wb_ad_20201204134907.js | 214 ++++++++++++++++++++++ .history/wb_ad_20201204134908.js | 214 ++++++++++++++++++++++ .history/wb_ad_20201204134913.js | 214 ++++++++++++++++++++++ .history/wb_ad_20201204141137.js | 224 ++++++++++++++++++++++++ .history/wb_ad_20201204141334.js | 214 ++++++++++++++++++++++ .history/wb_ad_20201204141337.js | 214 ++++++++++++++++++++++ .history/wb_ad_20201204141338.js | 214 ++++++++++++++++++++++ README.md | 4 +- loon_sub.conf | 2 +- qx_sub.txt | 2 +- sg_sub.sgmodule | 2 +- wb_ad.js | 30 ++-- 33 files changed, 4565 insertions(+), 17 deletions(-) create mode 100644 .history/README_20201204134114.md create mode 100644 .history/README_20201204134653.md create mode 100644 .history/loon_sub_20201204134114.conf create mode 100644 .history/loon_sub_20201204134653.conf create mode 100644 .history/qx_sub_20201204134114.txt create mode 100644 .history/qx_sub_20201204134653.txt create mode 100644 .history/sg_sub_20201204134114.sgmodule create mode 100644 .history/sg_sub_20201204134653.sgmodule create mode 100644 .history/wb_ad_20201204134114.js create mode 100644 .history/wb_ad_20201204134726.js create mode 100644 .history/wb_ad_20201204134728.js create mode 100644 .history/wb_ad_20201204134731.js create mode 100644 .history/wb_ad_20201204134757.js create mode 100644 .history/wb_ad_20201204134837.js create mode 100644 .history/wb_ad_20201204134840.js create mode 100644 .history/wb_ad_20201204134848.js create mode 100644 .history/wb_ad_20201204134857.js create mode 100644 .history/wb_ad_20201204134858.js create mode 100644 .history/wb_ad_20201204134901.js create mode 100644 .history/wb_ad_20201204134904.js create mode 100644 .history/wb_ad_20201204134905.js create mode 100644 .history/wb_ad_20201204134907.js create mode 100644 .history/wb_ad_20201204134908.js create mode 100644 .history/wb_ad_20201204134913.js create mode 100644 .history/wb_ad_20201204141137.js create mode 100644 .history/wb_ad_20201204141334.js create mode 100644 .history/wb_ad_20201204141337.js create mode 100644 .history/wb_ad_20201204141338.js diff --git a/.history/README_20201204134114.md b/.history/README_20201204134114.md new file mode 100644 index 000000000..ae3f97d28 --- /dev/null +++ b/.history/README_20201204134114.md @@ -0,0 +1,91 @@ +# Surge +Weibo +```properties +[Script] +http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +[MITM] +hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com +``` + +Display netflix ratings(IMDb、~~douban~~) +```properties +[Script] +http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +# 单集评分 +nf_rating_season.js = type=http-response,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js +[MITM] +hostname = ios.prod.ftl.netflix.com +``` + +Display jd historical price +```properties +# 不生效或失效的检查一下配置有没有这两条复写,删除试试 +# ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=start - reject +# ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=(start|queryMaterialAdverts) - reject +[Script] +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +[MITM] +hostname = api.m.jd.com +``` + +Display taobao historical price +```properties +# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 +[Script] +http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +[MITM] +hostname = trade-acs.m.taobao.com +``` + +DingDing clock in +```properties +[Script] +cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/surge/master/clock_in.js +``` + +# Quan-X + +Weibo +```properties +[rewrite_local] +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +[mitm] +hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com +``` + +Display netflix ratings(IMDb、~~douban~~) +```properties +[rewrite_local] +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +[mitm] +hostname = ios.prod.ftl.netflix.com +``` + +Display jd historical price +```properties +[rewrite_local] +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +[mitm] +hostname = api.m.jd.com +``` + +Display taobao historical price +```properties +# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 +[rewrite_local] +^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +[mitm] +hostname = trade-acs.m.taobao.com +``` + +DingDing clock in +```properties +[task_local] +0 9,18 * * 1-5 https://raw.githubusercontent.com/yichahucha/surge/master/clock_in.js +``` diff --git a/.history/README_20201204134653.md b/.history/README_20201204134653.md new file mode 100644 index 000000000..2f377b890 --- /dev/null +++ b/.history/README_20201204134653.md @@ -0,0 +1,91 @@ +# Surge +Weibo +```properties +[Script] +http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +[MITM] +hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com +``` + +Display netflix ratings(IMDb、~~douban~~) +```properties +[Script] +http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +# 单集评分 +nf_rating_season.js = type=http-response,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js +[MITM] +hostname = ios.prod.ftl.netflix.com +``` + +Display jd historical price +```properties +# 不生效或失效的检查一下配置有没有这两条复写,删除试试 +# ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=start - reject +# ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=(start|queryMaterialAdverts) - reject +[Script] +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +[MITM] +hostname = api.m.jd.com +``` + +Display taobao historical price +```properties +# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 +[Script] +http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +[MITM] +hostname = trade-acs.m.taobao.com +``` + +DingDing clock in +```properties +[Script] +cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/surge/master/clock_in.js +``` + +# Quan-X + +Weibo +```properties +[rewrite_local] +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +[mitm] +hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com +``` + +Display netflix ratings(IMDb、~~douban~~) +```properties +[rewrite_local] +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +[mitm] +hostname = ios.prod.ftl.netflix.com +``` + +Display jd historical price +```properties +[rewrite_local] +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js +[mitm] +hostname = api.m.jd.com +``` + +Display taobao historical price +```properties +# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 +[rewrite_local] +^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +[mitm] +hostname = trade-acs.m.taobao.com +``` + +DingDing clock in +```properties +[task_local] +0 9,18 * * 1-5 https://raw.githubusercontent.com/yichahucha/surge/master/clock_in.js +``` diff --git a/.history/loon_sub_20201204134114.conf b/.history/loon_sub_20201204134114.conf new file mode 100644 index 000000000..8d3da7017 --- /dev/null +++ b/.history/loon_sub_20201204134114.conf @@ -0,0 +1,12 @@ +http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分1 +http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分2 +http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js, tag=单集评分 +http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js, tag=微博去广告 +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js, , tag=微博去广告 +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js,tag=京东比价 +http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js,tag=淘宝比价1(内置版) +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js, tag=淘宝比价2(内置版) +http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js,tag=淘宝比价1 Lite(通知版) +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js, tag=淘宝比价2 Lite(通知版) + +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com diff --git a/.history/loon_sub_20201204134653.conf b/.history/loon_sub_20201204134653.conf new file mode 100644 index 000000000..70eb4412a --- /dev/null +++ b/.history/loon_sub_20201204134653.conf @@ -0,0 +1,12 @@ +http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分1 +http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分2 +http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js, tag=单集评分 +http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js, tag=微博去广告 +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js, , tag=微博去广告 +http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js,tag=京东比价 +http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js,tag=淘宝比价1(内置版) +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js, tag=淘宝比价2(内置版) +http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js,tag=淘宝比价1 Lite(通知版) +http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js, tag=淘宝比价2 Lite(通知版) + +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com diff --git a/.history/qx_sub_20201204134114.txt b/.history/qx_sub_20201204134114.txt new file mode 100644 index 000000000..14e91da03 --- /dev/null +++ b/.history/qx_sub_20201204134114.txt @@ -0,0 +1,15 @@ +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js + +^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js + +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js diff --git a/.history/qx_sub_20201204134653.txt b/.history/qx_sub_20201204134653.txt new file mode 100644 index 000000000..e35bf6a7d --- /dev/null +++ b/.history/qx_sub_20201204134653.txt @@ -0,0 +1,15 @@ +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js + +^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js + +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js diff --git a/.history/sg_sub_20201204134114.sgmodule b/.history/sg_sub_20201204134114.sgmodule new file mode 100644 index 000000000..717907e8f --- /dev/null +++ b/.history/sg_sub_20201204134114.sgmodule @@ -0,0 +1,19 @@ +#!name=eval_script.js module + +[MITM] +hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +[Script] +nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js + +tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js + +wb_ad.js = type=http-response,requires-body=1,max-size=-1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js diff --git a/.history/sg_sub_20201204134653.sgmodule b/.history/sg_sub_20201204134653.sgmodule new file mode 100644 index 000000000..125f38ae5 --- /dev/null +++ b/.history/sg_sub_20201204134653.sgmodule @@ -0,0 +1,19 @@ +#!name=eval_script.js module + +[MITM] +hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com + +[Script] +nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js + +jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js + +tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js + +wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js + +wb_ad.js = type=http-response,requires-body=1,max-size=-1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js diff --git a/.history/wb_ad_20201204134114.js b/.history/wb_ad_20201204134114.js new file mode 100644 index 000000000..1732a0ace --- /dev/null +++ b/.history/wb_ad_20201204134114.js @@ -0,0 +1,208 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || + url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty('expandable_views')) + delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if (is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element)) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return (promotiontype || mblogtype) ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1 +} diff --git a/.history/wb_ad_20201204134726.js b/.history/wb_ad_20201204134726.js new file mode 100644 index 000000000..1da339bdb --- /dev/null +++ b/.history/wb_ad_20201204134726.js @@ -0,0 +1,213 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || + url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty('expandable_views')) + delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +}else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if (is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element)) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return (promotiontype || mblogtype) ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1 +} diff --git a/.history/wb_ad_20201204134728.js b/.history/wb_ad_20201204134728.js new file mode 100644 index 000000000..7318c2278 --- /dev/null +++ b/.history/wb_ad_20201204134728.js @@ -0,0 +1,213 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || + url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty('expandable_views')) + delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if (is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element)) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return (promotiontype || mblogtype) ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1 +} diff --git a/.history/wb_ad_20201204134731.js b/.history/wb_ad_20201204134731.js new file mode 100644 index 000000000..db0ec76d6 --- /dev/null +++ b/.history/wb_ad_20201204134731.js @@ -0,0 +1,213 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || + url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty('expandable_views')) + delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} else if (url.indexOf(path22) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if (is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element)) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return (promotiontype || mblogtype) ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1 +} diff --git a/.history/wb_ad_20201204134757.js b/.history/wb_ad_20201204134757.js new file mode 100644 index 000000000..1f08948fa --- /dev/null +++ b/.history/wb_ad_20201204134757.js @@ -0,0 +1,209 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || + url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty('expandable_views')) + delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if (is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element)) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return (promotiontype || mblogtype) ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1 +} diff --git a/.history/wb_ad_20201204134837.js b/.history/wb_ad_20201204134837.js new file mode 100644 index 000000000..61e6e7b43 --- /dev/null +++ b/.history/wb_ad_20201204134837.js @@ -0,0 +1,210 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || + url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1 || +url.indexOf(path11) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty('expandable_views')) + delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if (is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element)) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return (promotiontype || mblogtype) ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1 +} diff --git a/.history/wb_ad_20201204134840.js b/.history/wb_ad_20201204134840.js new file mode 100644 index 000000000..1b05ec711 --- /dev/null +++ b/.history/wb_ad_20201204134840.js @@ -0,0 +1,210 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || + url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1 || +url.indexOf(path2) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty('expandable_views')) + delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if (is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element)) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return (promotiontype || mblogtype) ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1 +} diff --git a/.history/wb_ad_20201204134848.js b/.history/wb_ad_20201204134848.js new file mode 100644 index 000000000..d904adbca --- /dev/null +++ b/.history/wb_ad_20201204134848.js @@ -0,0 +1,214 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if ( + is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element) + ) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) + card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if ( + card_group_item.desc == + "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" + ) { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = + mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return promotiontype || mblogtype ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1; +} diff --git a/.history/wb_ad_20201204134857.js b/.history/wb_ad_20201204134857.js new file mode 100644 index 000000000..af8a7d31c --- /dev/null +++ b/.history/wb_ad_20201204134857.js @@ -0,0 +1,214 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if ( + is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element) + ) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) + card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if ( + card_group_item.desc == + "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" + ) { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = + mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return promotiontype || mblogtype ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1; +} diff --git a/.history/wb_ad_20201204134858.js b/.history/wb_ad_20201204134858.js new file mode 100644 index 000000000..af8a7d31c --- /dev/null +++ b/.history/wb_ad_20201204134858.js @@ -0,0 +1,214 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if ( + is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element) + ) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) + card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if ( + card_group_item.desc == + "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" + ) { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = + mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return promotiontype || mblogtype ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1; +} diff --git a/.history/wb_ad_20201204134901.js b/.history/wb_ad_20201204134901.js new file mode 100644 index 000000000..af8a7d31c --- /dev/null +++ b/.history/wb_ad_20201204134901.js @@ -0,0 +1,214 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if ( + is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element) + ) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) + card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if ( + card_group_item.desc == + "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" + ) { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = + mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return promotiontype || mblogtype ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1; +} diff --git a/.history/wb_ad_20201204134904.js b/.history/wb_ad_20201204134904.js new file mode 100644 index 000000000..d904adbca --- /dev/null +++ b/.history/wb_ad_20201204134904.js @@ -0,0 +1,214 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if ( + is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element) + ) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) + card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if ( + card_group_item.desc == + "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" + ) { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = + mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return promotiontype || mblogtype ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1; +} diff --git a/.history/wb_ad_20201204134905.js b/.history/wb_ad_20201204134905.js new file mode 100644 index 000000000..d904adbca --- /dev/null +++ b/.history/wb_ad_20201204134905.js @@ -0,0 +1,214 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if ( + is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element) + ) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) + card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if ( + card_group_item.desc == + "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" + ) { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = + mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return promotiontype || mblogtype ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1; +} diff --git a/.history/wb_ad_20201204134907.js b/.history/wb_ad_20201204134907.js new file mode 100644 index 000000000..af8a7d31c --- /dev/null +++ b/.history/wb_ad_20201204134907.js @@ -0,0 +1,214 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if ( + is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element) + ) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) + card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if ( + card_group_item.desc == + "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" + ) { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = + mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return promotiontype || mblogtype ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1; +} diff --git a/.history/wb_ad_20201204134908.js b/.history/wb_ad_20201204134908.js new file mode 100644 index 000000000..af8a7d31c --- /dev/null +++ b/.history/wb_ad_20201204134908.js @@ -0,0 +1,214 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if ( + is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element) + ) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) + card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if ( + card_group_item.desc == + "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" + ) { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = + mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return promotiontype || mblogtype ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1; +} diff --git a/.history/wb_ad_20201204134913.js b/.history/wb_ad_20201204134913.js new file mode 100644 index 000000000..af8a7d31c --- /dev/null +++ b/.history/wb_ad_20201204134913.js @@ -0,0 +1,214 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if ( + is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element) + ) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) + card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if ( + card_group_item.desc == + "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" + ) { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = + mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return promotiontype || mblogtype ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1; +} diff --git a/.history/wb_ad_20201204141137.js b/.history/wb_ad_20201204141137.js new file mode 100644 index 000000000..7b335fc04 --- /dev/null +++ b/.history/wb_ad_20201204141137.js @@ -0,0 +1,224 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if ( + is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element) + ) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) + card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if ( + card_group_item.desc == + "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" + ) { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + // filter_top_search(card_group_item.group); + let group = card_group_item.group; + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = + mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return promotiontype || mblogtype ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1; +} diff --git a/.history/wb_ad_20201204141334.js b/.history/wb_ad_20201204141334.js new file mode 100644 index 000000000..a5226072c --- /dev/null +++ b/.history/wb_ad_20201204141334.js @@ -0,0 +1,214 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1 || url.indexOf(path22) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if ( + is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element) + ) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) + card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if ( + card_group_item.desc == + "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" + ) { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = + mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return promotiontype || mblogtype ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1; +} diff --git a/.history/wb_ad_20201204141337.js b/.history/wb_ad_20201204141337.js new file mode 100644 index 000000000..86c365053 --- /dev/null +++ b/.history/wb_ad_20201204141337.js @@ -0,0 +1,214 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1 || url.indexOf(path22) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if ( + is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element) + ) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) + card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if ( + card_group_item.desc == + "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" + ) { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = + mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return promotiontype || mblogtype ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1; +} diff --git a/.history/wb_ad_20201204141338.js b/.history/wb_ad_20201204141338.js new file mode 100644 index 000000000..86c365053 --- /dev/null +++ b/.history/wb_ad_20201204141338.js @@ -0,0 +1,214 @@ +/* +README:https://github.com/yichahucha/surge/tree/master + */ + +const path1 = "/groups/timeline"; +const path2 = "/statuses/unread"; +const path3 = "/statuses/extend"; +const path4 = "/comments/build_comments"; +const path5 = "/photo/recommend_list"; +const path6 = "/stories/video_stream"; +const path7 = "/statuses/positives/get"; +const path8 = "/stories/home_list"; +const path9 = "/profile/statuses"; +const path10 = "/statuses/friends/timeline"; +const path11 = "/service/picfeed"; +const path12 = "/fangle/timeline"; +const path13 = "/searchall"; +const path14 = "/cardlist"; +const path15 = "/statuses/video_timeline"; +const path16 = "/page"; +const path17 = "/statuses/friends_timeline"; +const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; + +const url = $request.url; +let body = $response.body; + +if ( + url.indexOf(path1) != -1 || + url.indexOf(path2) != -1 || + url.indexOf(path10) != -1 || + url.indexOf(path15) != -1 || + url.indexOf(path17) != -1 || + url.indexOf(path20) != -1 +) { + let obj = JSON.parse(body); + if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); + if (obj.advertises) obj.advertises = []; + if (obj.ad) obj.ad = []; + if (obj.num) obj.num = obj.original_num; + if (obj.trends) obj.trends = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path3) != -1) { + let obj = JSON.parse(body); + if (obj.trend) delete obj.trend; + body = JSON.stringify(obj); +} else if (url.indexOf(path4) != -1) { + let obj = JSON.parse(body); + obj.recommend_max_id = 0; + if (obj.status) { + if (obj.top_hot_structs) { + obj.max_id = obj.top_hot_structs.call_back_struct.max_id; + delete obj.top_hot_structs; + } + if (obj.datas) obj.datas = filter_comments(obj.datas); + } else { + obj.datas = []; + } + body = JSON.stringify(obj); +} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { + let obj = JSON.parse(body); + obj.data = {}; + body = JSON.stringify(obj); +} else if (url.indexOf(path6) != -1) { + let obj = JSON.parse(body); + let segments = obj.segments; + if (segments && segments.length > 0) { + let i = segments.length; + while (i--) { + const element = segments[i]; + let is_ad = element.is_ad; + if (is_ad && is_ad == true) segments.splice(i, 1); + } + } + body = JSON.stringify(obj); +} else if (url.indexOf(path7) != -1) { + let obj = JSON.parse(body); + obj.datas = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path8) != -1) { + let obj = JSON.parse(body); + obj.story_list = []; + body = JSON.stringify(obj); +} else if (url.indexOf(path11) != -1 || url.indexOf(path22) != -1) { + let obj = JSON.parse(body); + obj.data = []; + body = JSON.stringify(obj); +} else if ( + url.indexOf(path9) != -1 || + url.indexOf(path12) != -1 || + url.indexOf(path13) != -1 || + url.indexOf(path14) != -1 || + url.indexOf(path16) != -1 +) { + let obj = JSON.parse(body); + if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); + body = JSON.stringify(obj); +} else if (url.indexOf(path19) != -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) != -1) { + if (body.indexOf("ad_params") != -1) { + body = JSON.stringify({}); + } +} + +$done({ body }); + +function filter_timeline_statuses(statuses) { + if (statuses && statuses.length > 0) { + let i = statuses.length; + while (i--) { + let element = statuses[i]; + if ( + is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element) + ) { + statuses.splice(i, 1); + } + } + } + return statuses; +} + +function filter_comments(datas) { + if (datas && datas.length > 0) { + let i = datas.length; + while (i--) { + const element = datas[i]; + const type = element.type; + if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + } + } + return datas; +} + +function filter_timeline_cards(cards) { + if (cards && cards.length > 0) { + let j = cards.length; + while (j--) { + let item = cards[j]; + let card_group = item.card_group; + if (card_group && card_group.length > 0) { + if (item.itemid && item.itemid == "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type == 9) { + if (is_timeline_ad(card_group_item.mblog)) + card_group.splice(i, 1); + } else if (card_type == 118 || card_type == 89) { + card_group.splice(i, 1); + } else if (card_type == 42) { + if ( + card_group_item.desc == + "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" + ) { + cards.splice(j, 1); + break; + } + } else if (card_type == 17) { + filter_top_search(card_group_item.group); + } + } + } + } + } else { + let card_type = item.card_type; + if (card_type && card_type == 9) { + if (is_timeline_ad(item.mblog)) cards.splice(j, 1); + } + } + } + } + return cards; +} + +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + +function is_timeline_ad(mblog) { + if (!mblog) return false; + let promotiontype = + mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; + return promotiontype || mblogtype ? true : false; +} + +function is_timeline_likerecommend(title) { + return title && title.type && title.type == "likerecommend" ? true : false; +} + +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state == 1; +} diff --git a/README.md b/README.md index ae3f97d28..2f377b890 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Weibo ```properties [Script] http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js [MITM] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` @@ -52,7 +52,7 @@ Weibo ```properties [rewrite_local] ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js [mitm] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` diff --git a/loon_sub.conf b/loon_sub.conf index 8d3da7017..70eb4412a 100644 --- a/loon_sub.conf +++ b/loon_sub.conf @@ -2,7 +2,7 @@ http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22vide http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分2 http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js, tag=单集评分 http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js, tag=微博去广告 -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js, , tag=微博去广告 +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js, , tag=微博去广告 http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js,tag=京东比价 http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js,tag=淘宝比价1(内置版) http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js, tag=淘宝比价2(内置版) diff --git a/qx_sub.txt b/qx_sub.txt index 14e91da03..e35bf6a7d 100644 --- a/qx_sub.txt +++ b/qx_sub.txt @@ -12,4 +12,4 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,ap ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js diff --git a/sg_sub.sgmodule b/sg_sub.sgmodule index 717907e8f..125f38ae5 100644 --- a/sg_sub.sgmodule +++ b/sg_sub.sgmodule @@ -16,4 +16,4 @@ tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\ wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -wb_ad.js = type=http-response,requires-body=1,max-size=-1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +wb_ad.js = type=http-response,requires-body=1,max-size=-1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js diff --git a/wb_ad.js b/wb_ad.js index 1732a0ace..86c365053 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -23,6 +23,7 @@ const path18 = "/!/photos/pic_recommend_status"; const path19 = "/statuses/video_mixtimeline"; const path20 = "/video/tiny_stream_video_list"; const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; const url = $request.url; let body = $response.body; @@ -59,8 +60,7 @@ if ( obj.datas = []; } body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || - url.indexOf(path18) != -1) { +} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { let obj = JSON.parse(body); obj.data = {}; body = JSON.stringify(obj); @@ -84,7 +84,7 @@ if ( let obj = JSON.parse(body); obj.story_list = []; body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1) { +} else if (url.indexOf(path11) != -1 || url.indexOf(path22) != -1) { let obj = JSON.parse(body); obj.data = []; body = JSON.stringify(obj); @@ -101,8 +101,7 @@ if ( } else if (url.indexOf(path19) != -1) { let obj = JSON.parse(body); delete obj.expandable_view; - if (obj.hasOwnProperty('expandable_views')) - delete obj.expandable_views; + if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; body = JSON.stringify(obj); } else if (url.indexOf(path21) != -1) { if (body.indexOf("ad_params") != -1) { @@ -117,9 +116,11 @@ function filter_timeline_statuses(statuses) { let i = statuses.length; while (i--) { let element = statuses[i]; - if (is_timeline_likerecommend(element.title) || + if ( + is_timeline_likerecommend(element.title) || is_timeline_ad(element) || - is_stream_video_ad(element)) { + is_stream_video_ad(element) + ) { statuses.splice(i, 1); } } @@ -155,11 +156,15 @@ function filter_timeline_cards(cards) { let card_type = card_group_item.card_type; if (card_type) { if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); + if (is_timeline_ad(card_group_item.mblog)) + card_group.splice(i, 1); } else if (card_type == 118 || card_type == 89) { card_group.splice(i, 1); } else if (card_type == 42) { - if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { + if ( + card_group_item.desc == + "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" + ) { cards.splice(j, 1); break; } @@ -194,9 +199,10 @@ function filter_top_search(group) { function is_timeline_ad(mblog) { if (!mblog) return false; - let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; + let promotiontype = + mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return (promotiontype || mblogtype) ? true : false; + return promotiontype || mblogtype ? true : false; } function is_timeline_likerecommend(title) { @@ -204,5 +210,5 @@ function is_timeline_likerecommend(title) { } function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1 + return item.ad_state && item.ad_state == 1; } From fdcc6f65e4371ba0e21e7b63c302c3d78f0481cf Mon Sep 17 00:00:00 2001 From: goose Date: Fri, 4 Dec 2020 14:18:02 +0800 Subject: [PATCH 1115/1191] rm --- .history/README_20201204134114.md | 91 ---------- .history/README_20201204134653.md | 91 ---------- .history/loon_sub_20201204134114.conf | 12 -- .history/loon_sub_20201204134653.conf | 12 -- .history/qx_sub_20201204134114.txt | 15 -- .history/qx_sub_20201204134653.txt | 15 -- .history/sg_sub_20201204134114.sgmodule | 19 -- .history/sg_sub_20201204134653.sgmodule | 19 -- .history/wb_ad_20201204134114.js | 208 ---------------------- .history/wb_ad_20201204134726.js | 213 ---------------------- .history/wb_ad_20201204134728.js | 213 ---------------------- .history/wb_ad_20201204134731.js | 213 ---------------------- .history/wb_ad_20201204134757.js | 209 ---------------------- .history/wb_ad_20201204134837.js | 210 ---------------------- .history/wb_ad_20201204134840.js | 210 ---------------------- .history/wb_ad_20201204134848.js | 214 ---------------------- .history/wb_ad_20201204134857.js | 214 ---------------------- .history/wb_ad_20201204134858.js | 214 ---------------------- .history/wb_ad_20201204134901.js | 214 ---------------------- .history/wb_ad_20201204134904.js | 214 ---------------------- .history/wb_ad_20201204134905.js | 214 ---------------------- .history/wb_ad_20201204134907.js | 214 ---------------------- .history/wb_ad_20201204134908.js | 214 ---------------------- .history/wb_ad_20201204134913.js | 214 ---------------------- .history/wb_ad_20201204141137.js | 224 ------------------------ .history/wb_ad_20201204141334.js | 214 ---------------------- .history/wb_ad_20201204141337.js | 214 ---------------------- .history/wb_ad_20201204141338.js | 214 ---------------------- 28 files changed, 4542 deletions(-) delete mode 100644 .history/README_20201204134114.md delete mode 100644 .history/README_20201204134653.md delete mode 100644 .history/loon_sub_20201204134114.conf delete mode 100644 .history/loon_sub_20201204134653.conf delete mode 100644 .history/qx_sub_20201204134114.txt delete mode 100644 .history/qx_sub_20201204134653.txt delete mode 100644 .history/sg_sub_20201204134114.sgmodule delete mode 100644 .history/sg_sub_20201204134653.sgmodule delete mode 100644 .history/wb_ad_20201204134114.js delete mode 100644 .history/wb_ad_20201204134726.js delete mode 100644 .history/wb_ad_20201204134728.js delete mode 100644 .history/wb_ad_20201204134731.js delete mode 100644 .history/wb_ad_20201204134757.js delete mode 100644 .history/wb_ad_20201204134837.js delete mode 100644 .history/wb_ad_20201204134840.js delete mode 100644 .history/wb_ad_20201204134848.js delete mode 100644 .history/wb_ad_20201204134857.js delete mode 100644 .history/wb_ad_20201204134858.js delete mode 100644 .history/wb_ad_20201204134901.js delete mode 100644 .history/wb_ad_20201204134904.js delete mode 100644 .history/wb_ad_20201204134905.js delete mode 100644 .history/wb_ad_20201204134907.js delete mode 100644 .history/wb_ad_20201204134908.js delete mode 100644 .history/wb_ad_20201204134913.js delete mode 100644 .history/wb_ad_20201204141137.js delete mode 100644 .history/wb_ad_20201204141334.js delete mode 100644 .history/wb_ad_20201204141337.js delete mode 100644 .history/wb_ad_20201204141338.js diff --git a/.history/README_20201204134114.md b/.history/README_20201204134114.md deleted file mode 100644 index ae3f97d28..000000000 --- a/.history/README_20201204134114.md +++ /dev/null @@ -1,91 +0,0 @@ -# Surge -Weibo -```properties -[Script] -http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js -[MITM] -hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com -``` - -Display netflix ratings(IMDb、~~douban~~) -```properties -[Script] -http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -# 单集评分 -nf_rating_season.js = type=http-response,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js -[MITM] -hostname = ios.prod.ftl.netflix.com -``` - -Display jd historical price -```properties -# 不生效或失效的检查一下配置有没有这两条复写,删除试试 -# ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=start - reject -# ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=(start|queryMaterialAdverts) - reject -[Script] -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -[MITM] -hostname = api.m.jd.com -``` - -Display taobao historical price -```properties -# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 -[Script] -http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -[MITM] -hostname = trade-acs.m.taobao.com -``` - -DingDing clock in -```properties -[Script] -cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/surge/master/clock_in.js -``` - -# Quan-X - -Weibo -```properties -[rewrite_local] -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js -[mitm] -hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com -``` - -Display netflix ratings(IMDb、~~douban~~) -```properties -[rewrite_local] -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -[mitm] -hostname = ios.prod.ftl.netflix.com -``` - -Display jd historical price -```properties -[rewrite_local] -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -[mitm] -hostname = api.m.jd.com -``` - -Display taobao historical price -```properties -# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 -[rewrite_local] -^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -[mitm] -hostname = trade-acs.m.taobao.com -``` - -DingDing clock in -```properties -[task_local] -0 9,18 * * 1-5 https://raw.githubusercontent.com/yichahucha/surge/master/clock_in.js -``` diff --git a/.history/README_20201204134653.md b/.history/README_20201204134653.md deleted file mode 100644 index 2f377b890..000000000 --- a/.history/README_20201204134653.md +++ /dev/null @@ -1,91 +0,0 @@ -# Surge -Weibo -```properties -[Script] -http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js -[MITM] -hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com -``` - -Display netflix ratings(IMDb、~~douban~~) -```properties -[Script] -http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -# 单集评分 -nf_rating_season.js = type=http-response,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js -[MITM] -hostname = ios.prod.ftl.netflix.com -``` - -Display jd historical price -```properties -# 不生效或失效的检查一下配置有没有这两条复写,删除试试 -# ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=start - reject -# ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=(start|queryMaterialAdverts) - reject -[Script] -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -[MITM] -hostname = api.m.jd.com -``` - -Display taobao historical price -```properties -# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 -[Script] -http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -[MITM] -hostname = trade-acs.m.taobao.com -``` - -DingDing clock in -```properties -[Script] -cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/surge/master/clock_in.js -``` - -# Quan-X - -Weibo -```properties -[rewrite_local] -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js -[mitm] -hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com -``` - -Display netflix ratings(IMDb、~~douban~~) -```properties -[rewrite_local] -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -[mitm] -hostname = ios.prod.ftl.netflix.com -``` - -Display jd historical price -```properties -[rewrite_local] -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -[mitm] -hostname = api.m.jd.com -``` - -Display taobao historical price -```properties -# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 -[rewrite_local] -^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js -[mitm] -hostname = trade-acs.m.taobao.com -``` - -DingDing clock in -```properties -[task_local] -0 9,18 * * 1-5 https://raw.githubusercontent.com/yichahucha/surge/master/clock_in.js -``` diff --git a/.history/loon_sub_20201204134114.conf b/.history/loon_sub_20201204134114.conf deleted file mode 100644 index 8d3da7017..000000000 --- a/.history/loon_sub_20201204134114.conf +++ /dev/null @@ -1,12 +0,0 @@ -http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分1 -http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分2 -http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js, tag=单集评分 -http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js, tag=微博去广告 -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js, , tag=微博去广告 -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js,tag=京东比价 -http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js,tag=淘宝比价1(内置版) -http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js, tag=淘宝比价2(内置版) -http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js,tag=淘宝比价1 Lite(通知版) -http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js, tag=淘宝比价2 Lite(通知版) - -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com diff --git a/.history/loon_sub_20201204134653.conf b/.history/loon_sub_20201204134653.conf deleted file mode 100644 index 70eb4412a..000000000 --- a/.history/loon_sub_20201204134653.conf +++ /dev/null @@ -1,12 +0,0 @@ -http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分1 -http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分2 -http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js, tag=单集评分 -http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js, tag=微博去广告 -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js, , tag=微博去广告 -http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js,tag=京东比价 -http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js,tag=淘宝比价1(内置版) -http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js, tag=淘宝比价2(内置版) -http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js,tag=淘宝比价1 Lite(通知版) -http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js, tag=淘宝比价2 Lite(通知版) - -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com diff --git a/.history/qx_sub_20201204134114.txt b/.history/qx_sub_20201204134114.txt deleted file mode 100644 index 14e91da03..000000000 --- a/.history/qx_sub_20201204134114.txt +++ /dev/null @@ -1,15 +0,0 @@ -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - -^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js - -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js diff --git a/.history/qx_sub_20201204134653.txt b/.history/qx_sub_20201204134653.txt deleted file mode 100644 index e35bf6a7d..000000000 --- a/.history/qx_sub_20201204134653.txt +++ /dev/null @@ -1,15 +0,0 @@ -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - -^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - -^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - -^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js - -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js diff --git a/.history/sg_sub_20201204134114.sgmodule b/.history/sg_sub_20201204134114.sgmodule deleted file mode 100644 index 717907e8f..000000000 --- a/.history/sg_sub_20201204134114.sgmodule +++ /dev/null @@ -1,19 +0,0 @@ -#!name=eval_script.js module - -[MITM] -hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com - -[Script] -nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - -nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - -jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - -tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - -tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - -wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js - -wb_ad.js = type=http-response,requires-body=1,max-size=-1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js diff --git a/.history/sg_sub_20201204134653.sgmodule b/.history/sg_sub_20201204134653.sgmodule deleted file mode 100644 index 125f38ae5..000000000 --- a/.history/sg_sub_20201204134653.sgmodule +++ /dev/null @@ -1,19 +0,0 @@ -#!name=eval_script.js module - -[MITM] -hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com - -[Script] -nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - -nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - -jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - -tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - -tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - -wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js - -wb_ad.js = type=http-response,requires-body=1,max-size=-1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js diff --git a/.history/wb_ad_20201204134114.js b/.history/wb_ad_20201204134114.js deleted file mode 100644 index 1732a0ace..000000000 --- a/.history/wb_ad_20201204134114.js +++ /dev/null @@ -1,208 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || - url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty('expandable_views')) - delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if (is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element)) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return (promotiontype || mblogtype) ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1 -} diff --git a/.history/wb_ad_20201204134726.js b/.history/wb_ad_20201204134726.js deleted file mode 100644 index 1da339bdb..000000000 --- a/.history/wb_ad_20201204134726.js +++ /dev/null @@ -1,213 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || - url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty('expandable_views')) - delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -}else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if (is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element)) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return (promotiontype || mblogtype) ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1 -} diff --git a/.history/wb_ad_20201204134728.js b/.history/wb_ad_20201204134728.js deleted file mode 100644 index 7318c2278..000000000 --- a/.history/wb_ad_20201204134728.js +++ /dev/null @@ -1,213 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || - url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty('expandable_views')) - delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if (is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element)) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return (promotiontype || mblogtype) ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1 -} diff --git a/.history/wb_ad_20201204134731.js b/.history/wb_ad_20201204134731.js deleted file mode 100644 index db0ec76d6..000000000 --- a/.history/wb_ad_20201204134731.js +++ /dev/null @@ -1,213 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || - url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty('expandable_views')) - delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} else if (url.indexOf(path22) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if (is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element)) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return (promotiontype || mblogtype) ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1 -} diff --git a/.history/wb_ad_20201204134757.js b/.history/wb_ad_20201204134757.js deleted file mode 100644 index 1f08948fa..000000000 --- a/.history/wb_ad_20201204134757.js +++ /dev/null @@ -1,209 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || - url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty('expandable_views')) - delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if (is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element)) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return (promotiontype || mblogtype) ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1 -} diff --git a/.history/wb_ad_20201204134837.js b/.history/wb_ad_20201204134837.js deleted file mode 100644 index 61e6e7b43..000000000 --- a/.history/wb_ad_20201204134837.js +++ /dev/null @@ -1,210 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || - url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1 || -url.indexOf(path11) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty('expandable_views')) - delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if (is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element)) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return (promotiontype || mblogtype) ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1 -} diff --git a/.history/wb_ad_20201204134840.js b/.history/wb_ad_20201204134840.js deleted file mode 100644 index 1b05ec711..000000000 --- a/.history/wb_ad_20201204134840.js +++ /dev/null @@ -1,210 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || - url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1 || -url.indexOf(path2) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty('expandable_views')) - delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if (is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element)) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return (promotiontype || mblogtype) ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1 -} diff --git a/.history/wb_ad_20201204134848.js b/.history/wb_ad_20201204134848.js deleted file mode 100644 index d904adbca..000000000 --- a/.history/wb_ad_20201204134848.js +++ /dev/null @@ -1,214 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if ( - is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element) - ) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) - card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if ( - card_group_item.desc == - "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" - ) { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = - mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return promotiontype || mblogtype ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1; -} diff --git a/.history/wb_ad_20201204134857.js b/.history/wb_ad_20201204134857.js deleted file mode 100644 index af8a7d31c..000000000 --- a/.history/wb_ad_20201204134857.js +++ /dev/null @@ -1,214 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if ( - is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element) - ) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) - card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if ( - card_group_item.desc == - "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" - ) { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = - mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return promotiontype || mblogtype ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1; -} diff --git a/.history/wb_ad_20201204134858.js b/.history/wb_ad_20201204134858.js deleted file mode 100644 index af8a7d31c..000000000 --- a/.history/wb_ad_20201204134858.js +++ /dev/null @@ -1,214 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if ( - is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element) - ) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) - card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if ( - card_group_item.desc == - "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" - ) { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = - mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return promotiontype || mblogtype ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1; -} diff --git a/.history/wb_ad_20201204134901.js b/.history/wb_ad_20201204134901.js deleted file mode 100644 index af8a7d31c..000000000 --- a/.history/wb_ad_20201204134901.js +++ /dev/null @@ -1,214 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if ( - is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element) - ) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) - card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if ( - card_group_item.desc == - "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" - ) { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = - mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return promotiontype || mblogtype ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1; -} diff --git a/.history/wb_ad_20201204134904.js b/.history/wb_ad_20201204134904.js deleted file mode 100644 index d904adbca..000000000 --- a/.history/wb_ad_20201204134904.js +++ /dev/null @@ -1,214 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if ( - is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element) - ) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) - card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if ( - card_group_item.desc == - "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" - ) { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = - mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return promotiontype || mblogtype ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1; -} diff --git a/.history/wb_ad_20201204134905.js b/.history/wb_ad_20201204134905.js deleted file mode 100644 index d904adbca..000000000 --- a/.history/wb_ad_20201204134905.js +++ /dev/null @@ -1,214 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if ( - is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element) - ) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) - card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if ( - card_group_item.desc == - "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" - ) { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = - mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return promotiontype || mblogtype ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1; -} diff --git a/.history/wb_ad_20201204134907.js b/.history/wb_ad_20201204134907.js deleted file mode 100644 index af8a7d31c..000000000 --- a/.history/wb_ad_20201204134907.js +++ /dev/null @@ -1,214 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if ( - is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element) - ) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) - card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if ( - card_group_item.desc == - "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" - ) { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = - mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return promotiontype || mblogtype ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1; -} diff --git a/.history/wb_ad_20201204134908.js b/.history/wb_ad_20201204134908.js deleted file mode 100644 index af8a7d31c..000000000 --- a/.history/wb_ad_20201204134908.js +++ /dev/null @@ -1,214 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if ( - is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element) - ) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) - card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if ( - card_group_item.desc == - "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" - ) { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = - mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return promotiontype || mblogtype ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1; -} diff --git a/.history/wb_ad_20201204134913.js b/.history/wb_ad_20201204134913.js deleted file mode 100644 index af8a7d31c..000000000 --- a/.history/wb_ad_20201204134913.js +++ /dev/null @@ -1,214 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if ( - is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element) - ) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) - card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if ( - card_group_item.desc == - "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" - ) { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = - mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return promotiontype || mblogtype ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1; -} diff --git a/.history/wb_ad_20201204141137.js b/.history/wb_ad_20201204141137.js deleted file mode 100644 index 7b335fc04..000000000 --- a/.history/wb_ad_20201204141137.js +++ /dev/null @@ -1,224 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1 || url.indexOf(path2) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if ( - is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element) - ) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) - card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if ( - card_group_item.desc == - "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" - ) { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - // filter_top_search(card_group_item.group); - let group = card_group_item.group; - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = - mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return promotiontype || mblogtype ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1; -} diff --git a/.history/wb_ad_20201204141334.js b/.history/wb_ad_20201204141334.js deleted file mode 100644 index a5226072c..000000000 --- a/.history/wb_ad_20201204141334.js +++ /dev/null @@ -1,214 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1 || url.indexOf(path22) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if ( - is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element) - ) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) - card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if ( - card_group_item.desc == - "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" - ) { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = - mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return promotiontype || mblogtype ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1; -} diff --git a/.history/wb_ad_20201204141337.js b/.history/wb_ad_20201204141337.js deleted file mode 100644 index 86c365053..000000000 --- a/.history/wb_ad_20201204141337.js +++ /dev/null @@ -1,214 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1 || url.indexOf(path22) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if ( - is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element) - ) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) - card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if ( - card_group_item.desc == - "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" - ) { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = - mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return promotiontype || mblogtype ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1; -} diff --git a/.history/wb_ad_20201204141338.js b/.history/wb_ad_20201204141338.js deleted file mode 100644 index 86c365053..000000000 --- a/.history/wb_ad_20201204141338.js +++ /dev/null @@ -1,214 +0,0 @@ -/* -README:https://github.com/yichahucha/surge/tree/master - */ - -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; -const path19 = "/statuses/video_mixtimeline"; -const path20 = "/video/tiny_stream_video_list"; -const path21 = "/photo/info"; -const path22 = "/live/media_homelist"; - -const url = $request.url; -let body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 || - url.indexOf(path20) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} else if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} else if (url.indexOf(path5) != -1 || url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} else if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} else if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} else if (url.indexOf(path11) != -1 || url.indexOf(path22) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} else if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} else if (url.indexOf(path19) != -1) { - let obj = JSON.parse(body); - delete obj.expandable_view; - if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; - body = JSON.stringify(obj); -} else if (url.indexOf(path21) != -1) { - if (body.indexOf("ad_params") != -1) { - body = JSON.stringify({}); - } -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if ( - is_timeline_likerecommend(element.title) || - is_timeline_ad(element) || - is_stream_video_ad(element) - ) { - statuses.splice(i, 1); - } - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - const type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - if (item.itemid && item.itemid == "hotword") { - filter_top_search(card_group); - } else { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type) { - if (card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) - card_group.splice(i, 1); - } else if (card_type == 118 || card_type == 89) { - card_group.splice(i, 1); - } else if (card_type == 42) { - if ( - card_group_item.desc == - "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" - ) { - cards.splice(j, 1); - break; - } - } else if (card_type == 17) { - filter_top_search(card_group_item.group); - } - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function filter_top_search(group) { - if (group && group.length > 0) { - let k = group.length; - while (k--) { - let group_item = group[k]; - if (group_item.hasOwnProperty("promotion")) { - group.splice(k, 1); - } - } - } -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = - mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return promotiontype || mblogtype ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -function is_stream_video_ad(item) { - return item.ad_state && item.ad_state == 1; -} From b77b16183eae3734a0ba950314d493e5256f5301 Mon Sep 17 00:00:00 2001 From: goose Date: Mon, 28 Dec 2020 10:38:32 +0800 Subject: [PATCH 1116/1191] add LICENSE --- LICENSE | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 674 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..e72bfddab --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. \ No newline at end of file From 7ea7e0ca9b467945a22c7aaa35f1997b32c6b33a Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Tue, 26 Jan 2021 09:55:46 +0800 Subject: [PATCH 1117/1191] fix --- jd_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd_price.js b/jd_price.js index 87e590997..58563900e 100644 --- a/jd_price.js +++ b/jd_price.js @@ -25,7 +25,7 @@ if (url.indexOf(path3) != -1) { delete obj.data.JDHttpToolKit.httpdns; delete obj.data.JDHttpToolKit.dnsvipV6; } - $done({ body: JSON.stringify(obj) }); $done({ body }); + $done({ body: JSON.stringify(obj) }); } if (url.indexOf(path2) != -1) { From 6954fe0d1619fefa983be9a6fb75a05bef7a2fc4 Mon Sep 17 00:00:00 2001 From: zZPiglet Date: Sun, 28 Mar 2021 04:11:40 +0800 Subject: [PATCH 1118/1191] Fix the error with launching jingfen app. --- jd_price_lite.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index de87fe5c2..aec1ff8ba 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -20,8 +20,11 @@ if (url.indexOf(path1) != -1) { if (url.indexOf(path3) != -1) { let obj = JSON.parse(body); - delete obj.data.JDHttpToolKit.httpdns; - delete obj.data.JDHttpToolKit.dnsvipV6; + let JDHttpToolKit = obj.data.JDHttpToolKit; + if (JDHttpToolKit) { + delete obj.data.JDHttpToolKit.httpdns; + delete obj.data.JDHttpToolKit.dnsvipV6; + } $done({ body: JSON.stringify(obj) }); } From 56e01554ff604628dcb8f51ab7f1be3b313d9144 Mon Sep 17 00:00:00 2001 From: asuka <54405882+ashurinn@users.noreply.github.com> Date: Tue, 30 Mar 2021 18:45:03 +0800 Subject: [PATCH 1119/1191] Update wb_ad.js --- wb_ad.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wb_ad.js b/wb_ad.js index 86c365053..ff92f40ce 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -24,6 +24,7 @@ const path19 = "/statuses/video_mixtimeline"; const path20 = "/video/tiny_stream_video_list"; const path21 = "/photo/info"; const path22 = "/live/media_homelist"; +const path23 = "/remind/unread_count"; const url = $request.url; let body = $response.body; @@ -107,8 +108,11 @@ if ( if (body.indexOf("ad_params") != -1) { body = JSON.stringify({}); } +} else if (url.indexOf(path23) != -1) { + let obj = JSON.parse(body); + obj.video = {}; + body = JSON.stringify(obj); } - $done({ body }); function filter_timeline_statuses(statuses) { From 5de75e7a0802d1062f8c386066782b9ede116f13 Mon Sep 17 00:00:00 2001 From: asuka <54405882+ashurinn@users.noreply.github.com> Date: Tue, 30 Mar 2021 18:49:21 +0800 Subject: [PATCH 1120/1191] Update sg_sub.sgmodule --- sg_sub.sgmodule | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sg_sub.sgmodule b/sg_sub.sgmodule index 125f38ae5..85f59198a 100644 --- a/sg_sub.sgmodule +++ b/sg_sub.sgmodule @@ -16,4 +16,4 @@ tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\ wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -wb_ad.js = type=http-response,requires-body=1,max-size=-1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +wb_ad.js = type=http-response,requires-body=1,max-size=-1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info|remind/unread_count),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js From b13de29d02afcc840f5f7765e2ea780e12f41c8b Mon Sep 17 00:00:00 2001 From: asuka <54405882+ashurinn@users.noreply.github.com> Date: Wed, 31 Mar 2021 09:42:57 +0800 Subject: [PATCH 1121/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2f377b890..e39a542ba 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Weibo ```properties [Script] http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info|remind/unread_count) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js [MITM] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` @@ -52,7 +52,7 @@ Weibo ```properties [rewrite_local] ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info|remind/unread_count) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js [mitm] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` From c7b00a53842cc1e7b08c7b715d6411a121d00126 Mon Sep 17 00:00:00 2001 From: asuka <54405882+ashurinn@users.noreply.github.com> Date: Wed, 31 Mar 2021 10:19:08 +0800 Subject: [PATCH 1122/1191] Update qx_sub.txt --- qx_sub.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qx_sub.txt b/qx_sub.txt index e35bf6a7d..2f9712c78 100644 --- a/qx_sub.txt +++ b/qx_sub.txt @@ -12,4 +12,4 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,ap ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info|remind/unread_count) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js From de0b43ea44f9d8d212c469c86485198bf6229b7d Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 31 Mar 2021 18:43:31 +0800 Subject: [PATCH 1123/1191] Optimal pricing --- jd_price.js | 34 +++++++++++++++++++--------------- jd_price_lite.js | 36 ++++++++++++++++++++---------------- tb_price.js | 44 ++++++++++++++++++++++---------------------- tb_price_lite.js | 36 ++++++++++++++++++++---------------- 4 files changed, 81 insertions(+), 69 deletions(-) diff --git a/jd_price.js b/jd_price.js index 87e590997..0657f55e2 100644 --- a/jd_price.js +++ b/jd_price.js @@ -71,22 +71,19 @@ if (url.indexOf(path2) != -1) { function lowerMsgs(data) { const lower = data.lowerPriceyh const lowerDate = dateFormat(data.lowerDateyh) - const lowerMsg = "〽️历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` + const lowerMsg = "🫖 历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` return lowerMsg } function priceSummary(data) { let summary = "" - let listPriceDetail = data.PriceRemark.ListPriceDetail - listPriceDetail.pop() + let listPriceDetail = data.PriceRemark.ListPriceDetail.slice(0,4) let list = listPriceDetail.concat(historySummary(data.single)) list.forEach((item, index) => { if (item.Name == "双11价格") { item.Name = "双十一价格" } else if (item.Name == "618价格") { item.Name = "六一八价格" - } else if (item.Name == "30天最低价") { - item.Name = "三十天最低" } summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date}${getSpace(8)}${item.Difference}` }) @@ -96,7 +93,7 @@ function priceSummary(data) { function historySummary(single) { const rexMatch = /\[.*?\]/g; const rexExec = /\[(.*),(.*),"(.*)".*\]/; - let currentPrice, lowest60, lowest180, lowest360 + let currentPrice, lowest30, lowest90, lowest180, lowest360 let list = single.jiagequshiyh.match(rexMatch); list = list.reverse().slice(0, 360); list.forEach((item, index) => { @@ -107,23 +104,30 @@ function historySummary(single) { let price = parseFloat(result[2]); if (index == 0) { currentPrice = price - lowest60 = { Name: "六十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest30 = { Name: "三十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest90 = { Name: "九十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } lowest180 = { Name: "一百八最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } lowest360 = { Name: "三百六最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } } - if (index < 60 && price <= lowest60.price) { - lowest60.price = price - lowest60.Price = `¥${String(price)}` - lowest60.Date = date - lowest60.Difference = difference(currentPrice, price) + if (index < 30 && price < lowest30.price) { + lowest30.price = price + lowest30.Price = `¥${String(price)}` + lowest30.Date = date + lowest30.Difference = difference(currentPrice, price) } - if (index < 180 && price <= lowest180.price) { + if (index < 90 && price < lowest90.price) { + lowest90.price = price + lowest90.Price = `¥${String(price)}` + lowest90.Date = date + lowest90.Difference = difference(currentPrice, price) + } + if (index < 180 && price < lowest180.price) { lowest180.price = price lowest180.Price = `¥${String(price)}` lowest180.Date = date lowest180.Difference = difference(currentPrice, price) } - if (index < 360 && price <= lowest360.price) { + if (index < 360 && price < lowest360.price) { lowest360.price = price lowest360.Price = `¥${String(price)}` lowest360.Date = date @@ -131,7 +135,7 @@ function historySummary(single) { } } }); - return [lowest60, lowest180, lowest360]; + return [lowest30, lowest90, lowest180, lowest360]; } function difference(currentPrice, price) { diff --git a/jd_price_lite.js b/jd_price_lite.js index de87fe5c2..fe6fe34fe 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -49,24 +49,21 @@ if (url.indexOf(path2) != -1) { function lowerMsgs(data) { const lower = data.lowerPriceyh const lowerDate = dateFormat(data.lowerDateyh) - const lowerMsg = "〽️历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` + const lowerMsg = "🫖 历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` return lowerMsg } function priceSummary(data) { let summary = "" - let listPriceDetail = data.PriceRemark.ListPriceDetail - listPriceDetail.pop() + let listPriceDetail = data.PriceRemark.ListPriceDetail.slice(0,4) let list = listPriceDetail.concat(historySummary(data.single)) list.forEach((item, index) => { if (item.Name == "双11价格") { item.Name = "双十一价格" } else if (item.Name == "618价格") { item.Name = "六一八价格" - } else if (item.Name == "30天最低价") { - item.Name = "三十天最低" } - summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` + summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date}${getSpace(8)}${item.Difference}` }) return summary } @@ -74,7 +71,7 @@ function priceSummary(data) { function historySummary(single) { const rexMatch = /\[.*?\]/g; const rexExec = /\[(.*),(.*),"(.*)".*\]/; - let currentPrice, lowest60, lowest180, lowest360 + let currentPrice, lowest30, lowest90, lowest180, lowest360 let list = single.jiagequshiyh.match(rexMatch); list = list.reverse().slice(0, 360); list.forEach((item, index) => { @@ -85,23 +82,30 @@ function historySummary(single) { let price = parseFloat(result[2]); if (index == 0) { currentPrice = price - lowest60 = { Name: "六十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest30 = { Name: "三十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest90 = { Name: "九十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } lowest180 = { Name: "一百八最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } lowest360 = { Name: "三百六最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } } - if (index < 60 && price <= lowest60.price) { - lowest60.price = price - lowest60.Price = `¥${String(price)}` - lowest60.Date = date - lowest60.Difference = difference(currentPrice, price) + if (index < 30 && price < lowest30.price) { + lowest30.price = price + lowest30.Price = `¥${String(price)}` + lowest30.Date = date + lowest30.Difference = difference(currentPrice, price) } - if (index < 180 && price <= lowest180.price) { + if (index < 90 && price < lowest90.price) { + lowest90.price = price + lowest90.Price = `¥${String(price)}` + lowest90.Date = date + lowest90.Difference = difference(currentPrice, price) + } + if (index < 180 && price < lowest180.price) { lowest180.price = price lowest180.Price = `¥${String(price)}` lowest180.Date = date lowest180.Difference = difference(currentPrice, price) } - if (index < 360 && price <= lowest360.price) { + if (index < 360 && price < lowest360.price) { lowest360.price = price lowest360.Price = `¥${String(price)}` lowest360.Date = date @@ -109,7 +113,7 @@ function historySummary(single) { } } }); - return [lowest60, lowest180, lowest360]; + return [lowest30, lowest90, lowest180, lowest360]; } function difference(currentPrice, price) { diff --git a/tb_price.js b/tb_price.js index 3c72a95f0..2023fcd42 100644 --- a/tb_price.js +++ b/tb_price.js @@ -158,36 +158,29 @@ function setTradeConsumerProtection(data, tradeConsumerProtection) { function lowerMsgs(data) { const lower = data.lowerPriceyh const lowerDate = dateFormat(data.lowerDateyh) - const lowerMsg = "最低到手价:¥" + String(lower) + `(${lowerDate})` - const lowerMsg1 = "历史最低¥" + String(lower) - return [lowerMsg, lowerMsg1] + const lowerMsg = "🫖 历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` + return lowerMsg } function priceSummary(data) { - let tbitems = [] let summary = "" - let listPriceDetail = data.PriceRemark.ListPriceDetail - listPriceDetail.pop() + let listPriceDetail = data.PriceRemark.ListPriceDetail.slice(0,4) let list = listPriceDetail.concat(historySummary(data.single)) list.forEach((item, index) => { if (item.Name == "双11价格") { item.Name = "双十一价格" } else if (item.Name == "618价格") { item.Name = "六一八价格" - } else if (item.Name == "30天最低价") { - item.Name = "三十天最低" } - summary += `\n${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` - let summaryItem = `${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` - tbitems.push(customItem(summaryItem)) + summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date}${getSpace(8)}${item.Difference}` }) - return [tbitems, summary] + return summary } function historySummary(single) { const rexMatch = /\[.*?\]/g; const rexExec = /\[(.*),(.*),"(.*)".*\]/; - let currentPrice, lowest60, lowest180, lowest360 + let currentPrice, lowest30, lowest90, lowest180, lowest360 let list = single.jiagequshiyh.match(rexMatch); list = list.reverse().slice(0, 360); list.forEach((item, index) => { @@ -198,23 +191,30 @@ function historySummary(single) { let price = parseFloat(result[2]); if (index == 0) { currentPrice = price - lowest60 = { Name: "六十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest30 = { Name: "三十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest90 = { Name: "九十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } lowest180 = { Name: "一百八最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } lowest360 = { Name: "三百六最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } } - if (index < 60 && price <= lowest60.price) { - lowest60.price = price - lowest60.Price = `¥${String(price)}` - lowest60.Date = date - lowest60.Difference = difference(currentPrice, price) + if (index < 30 && price < lowest30.price) { + lowest30.price = price + lowest30.Price = `¥${String(price)}` + lowest30.Date = date + lowest30.Difference = difference(currentPrice, price) } - if (index < 180 && price <= lowest180.price) { + if (index < 90 && price < lowest90.price) { + lowest90.price = price + lowest90.Price = `¥${String(price)}` + lowest90.Date = date + lowest90.Difference = difference(currentPrice, price) + } + if (index < 180 && price < lowest180.price) { lowest180.price = price lowest180.Price = `¥${String(price)}` lowest180.Date = date lowest180.Difference = difference(currentPrice, price) } - if (index < 360 && price <= lowest360.price) { + if (index < 360 && price < lowest360.price) { lowest360.price = price lowest360.Price = `¥${String(price)}` lowest360.Date = date @@ -222,7 +222,7 @@ function historySummary(single) { } } }); - return [lowest60, lowest180, lowest360]; + return [lowest30, lowest90, lowest180, lowest360]; } function difference(currentPrice, price) { diff --git a/tb_price_lite.js b/tb_price_lite.js index 6e650c187..2ea176af3 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -72,24 +72,21 @@ if (url.indexOf(path2) != -1) { function lowerMsgs(data) { const lower = data.lowerPriceyh const lowerDate = dateFormat(data.lowerDateyh) - const lowerMsg = "〽️历史最低到手价:¥" + String(lower) + `(${lowerDate})` + const lowerMsg = "🫖 历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` return lowerMsg } function priceSummary(data) { let summary = "" - let listPriceDetail = data.PriceRemark.ListPriceDetail - listPriceDetail.pop() + let listPriceDetail = data.PriceRemark.ListPriceDetail.slice(0,4) let list = listPriceDetail.concat(historySummary(data.single)) list.forEach((item, index) => { if (item.Name == "双11价格") { item.Name = "双十一价格" } else if (item.Name == "618价格") { item.Name = "六一八价格" - } else if (item.Name == "30天最低价") { - item.Name = "三十天最低" } - summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` + summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date}${getSpace(8)}${item.Difference}` }) return summary } @@ -97,7 +94,7 @@ function priceSummary(data) { function historySummary(single) { const rexMatch = /\[.*?\]/g; const rexExec = /\[(.*),(.*),"(.*)".*\]/; - let currentPrice, lowest60, lowest180, lowest360 + let currentPrice, lowest30, lowest90, lowest180, lowest360 let list = single.jiagequshiyh.match(rexMatch); list = list.reverse().slice(0, 360); list.forEach((item, index) => { @@ -108,23 +105,30 @@ function historySummary(single) { let price = parseFloat(result[2]); if (index == 0) { currentPrice = price - lowest60 = { Name: "六十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest30 = { Name: "三十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } + lowest90 = { Name: "九十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } lowest180 = { Name: "一百八最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } lowest360 = { Name: "三百六最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } } - if (index < 60 && price <= lowest60.price) { - lowest60.price = price - lowest60.Price = `¥${String(price)}` - lowest60.Date = date - lowest60.Difference = difference(currentPrice, price) + if (index < 30 && price < lowest30.price) { + lowest30.price = price + lowest30.Price = `¥${String(price)}` + lowest30.Date = date + lowest30.Difference = difference(currentPrice, price) } - if (index < 180 && price <= lowest180.price) { + if (index < 90 && price < lowest90.price) { + lowest90.price = price + lowest90.Price = `¥${String(price)}` + lowest90.Date = date + lowest90.Difference = difference(currentPrice, price) + } + if (index < 180 && price < lowest180.price) { lowest180.price = price lowest180.Price = `¥${String(price)}` lowest180.Date = date lowest180.Difference = difference(currentPrice, price) } - if (index < 360 && price <= lowest360.price) { + if (index < 360 && price < lowest360.price) { lowest360.price = price lowest360.Price = `¥${String(price)}` lowest360.Date = date @@ -132,7 +136,7 @@ function historySummary(single) { } } }); - return [lowest60, lowest180, lowest360]; + return [lowest30, lowest90, lowest180, lowest360]; } function difference(currentPrice, price) { From 0a3c88df9cfbe27e606c7f10e48403266e3e8c83 Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 31 Mar 2021 18:48:42 +0800 Subject: [PATCH 1124/1191] Optimal pricing --- jd_price.js | 1 + jd_price_lite.js | 1 + 2 files changed, 2 insertions(+) diff --git a/jd_price.js b/jd_price.js index 7fcffb014..daf83c116 100644 --- a/jd_price.js +++ b/jd_price.js @@ -75,6 +75,7 @@ function lowerMsgs(data) { return lowerMsg } + function priceSummary(data) { let summary = "" let listPriceDetail = data.PriceRemark.ListPriceDetail.slice(0,4) diff --git a/jd_price_lite.js b/jd_price_lite.js index f94513aa9..9229cb0f2 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -56,6 +56,7 @@ function lowerMsgs(data) { return lowerMsg } + function priceSummary(data) { let summary = "" let listPriceDetail = data.PriceRemark.ListPriceDetail.slice(0,4) From ef9e8e8ab68dd8adba26786c93b78efd1b348226 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 21:29:08 +0800 Subject: [PATCH 1125/1191] Optimal pricing --- tb_price.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tb_price.js b/tb_price.js index 2023fcd42..549820719 100644 --- a/tb_price.js +++ b/tb_price.js @@ -110,7 +110,7 @@ function sendNotify(data, shareUrl) { const lower = lowerMsgs(data.single)[0] const detail = priceSummary(data)[1] const tip = data.PriceRemark.Tip + "(仅供参考)" - $tool.notify("", "", `〽️历史${lower} ${tip}\n${detail}\n\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) + $tool.notify("", "", `🫖 历史${lower} ${tip}\n${detail}\n\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) } if (data.ok == 0 && data.msg.length > 0) { $tool.notify("", "", `⚠️ ${data.msg}`) @@ -158,11 +158,13 @@ function setTradeConsumerProtection(data, tradeConsumerProtection) { function lowerMsgs(data) { const lower = data.lowerPriceyh const lowerDate = dateFormat(data.lowerDateyh) - const lowerMsg = "🫖 历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` - return lowerMsg + const lowerMsg = "最低到手价:¥" + String(lower) + `(${lowerDate})` + const lowerMsg1 = "历史最低¥" + String(lower) + return [lowerMsg, lowerMsg1] } function priceSummary(data) { + let tbitems = [] let summary = "" let listPriceDetail = data.PriceRemark.ListPriceDetail.slice(0,4) let list = listPriceDetail.concat(historySummary(data.single)) @@ -172,9 +174,11 @@ function priceSummary(data) { } else if (item.Name == "618价格") { item.Name = "六一八价格" } - summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date}${getSpace(8)}${item.Difference}` + summary += `\n${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` + let summaryItem = `${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` + tbitems.push(customItem(summaryItem)) }) - return summary + return [tbitems, summary] } function historySummary(single) { From 93cfae654aaa4517ed7b6caf1bd2df48c43b2356 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 21:33:05 +0800 Subject: [PATCH 1126/1191] Optimal pricing --- tb_price_lite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index 2ea176af3..2ed2b1eae 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -86,7 +86,7 @@ function priceSummary(data) { } else if (item.Name == "618价格") { item.Name = "六一八价格" } - summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date}${getSpace(8)}${item.Difference}` + summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` }) return summary } From 418b3dbee840746ec60d811068de7e8207ae6a21 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 21:34:02 +0800 Subject: [PATCH 1127/1191] Optimal pricing --- jd_price_lite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index 9229cb0f2..99a6579be 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -67,7 +67,7 @@ function priceSummary(data) { } else if (item.Name == "618价格") { item.Name = "六一八价格" } - summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date}${getSpace(8)}${item.Difference}` + summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` }) return summary } From 4a74366f4e469f474aaea19b7e1b5d3452ac98bb Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 21:53:08 +0800 Subject: [PATCH 1128/1191] Update jd_price_lite.js --- jd_price_lite.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index 99a6579be..b65f427c7 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -39,8 +39,8 @@ if (url.indexOf(path2) != -1) { if (data.ok == 1 && data.single) { const lower = lowerMsgs(data.single) const detail = priceSummary(data) - const tip = data.PriceRemark.Tip + "(仅供参考)" - $tool.notify("", "", `${lower} ${tip}\n${detail}\n\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) + const tip = data.PriceRemark.Tip + $tool.notify("", "", `${lower} ${tip}\n${detail}\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) } if (data.ok == 0 && data.msg.length > 0) { $tool.notify("", "", `⚠️ ${data.msg}`) @@ -67,7 +67,7 @@ function priceSummary(data) { } else if (item.Name == "618价格") { item.Name = "六一八价格" } - summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` + summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` }) return summary } From 85d6e2175ae3d9ae34a5d2d69cee7db01b071f27 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 22:01:03 +0800 Subject: [PATCH 1129/1191] Update jd_price_lite.js --- jd_price_lite.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index b65f427c7..d189fc925 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -40,7 +40,7 @@ if (url.indexOf(path2) != -1) { const lower = lowerMsgs(data.single) const detail = priceSummary(data) const tip = data.PriceRemark.Tip - $tool.notify("", "", `${lower} ${tip}\n${detail}\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) + $tool.notify("", "", `${lower} ${tip}${detail}\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) } if (data.ok == 0 && data.msg.length > 0) { $tool.notify("", "", `⚠️ ${data.msg}`) @@ -83,7 +83,7 @@ function historySummary(single) { const result = rexExec.exec(item); const dateUTC = new Date(eval(result[1])); const date = dateUTC.format("yyyy-MM-dd"); - let price = parseFloat(result[2]); + let price = parseInt(result[2]); if (index == 0) { currentPrice = price lowest30 = { Name: "三十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } From 109f6a2a6798c3a09bc64db9a79aab77bf4457e6 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 22:03:02 +0800 Subject: [PATCH 1130/1191] Update tb_price_lite.js --- tb_price_lite.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index 2ed2b1eae..845d016d3 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -60,7 +60,7 @@ if (url.indexOf(path2) != -1) { const lower = lowerMsgs(data.single) const detail = priceSummary(data) const tip = data.PriceRemark.Tip + "(仅供参考)" - $tool.notify("", "", `${lower} ${tip}\n${detail}\n\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) + $tool.notify("", "", `${lower} ${tip}${detail}\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) } if (data.ok == 0 && data.msg.length > 0) { $tool.notify("", "", `⚠️ ${data.msg}`) @@ -86,7 +86,7 @@ function priceSummary(data) { } else if (item.Name == "618价格") { item.Name = "六一八价格" } - summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` + summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` }) return summary } @@ -102,7 +102,7 @@ function historySummary(single) { const result = rexExec.exec(item); const dateUTC = new Date(eval(result[1])); const date = dateUTC.format("yyyy-MM-dd"); - let price = parseFloat(result[2]); + let price = parseInt(result[2]); if (index == 0) { currentPrice = price lowest30 = { Name: "三十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } From 821c6ba9aae76bb6ce9c066ee0e5ba6125c05e1d Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 22:09:33 +0800 Subject: [PATCH 1131/1191] Update tb_price_lite.js --- tb_price_lite.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index 845d016d3..d9e4c42dc 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -60,7 +60,7 @@ if (url.indexOf(path2) != -1) { const lower = lowerMsgs(data.single) const detail = priceSummary(data) const tip = data.PriceRemark.Tip + "(仅供参考)" - $tool.notify("", "", `${lower} ${tip}${detail}\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) + $tool.notify("", "", `${lower}${detail}\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) } if (data.ok == 0 && data.msg.length > 0) { $tool.notify("", "", `⚠️ ${data.msg}`) @@ -72,7 +72,7 @@ if (url.indexOf(path2) != -1) { function lowerMsgs(data) { const lower = data.lowerPriceyh const lowerDate = dateFormat(data.lowerDateyh) - const lowerMsg = "🫖 历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` + const lowerMsg = "历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` return lowerMsg } @@ -136,7 +136,7 @@ function historySummary(single) { } } }); - return [lowest30, lowest90, lowest180, lowest360]; + return [lowest30, lowest90, lowest180]; } function difference(currentPrice, price) { From 8b8704bd7be2842171e6ac223a9ea9f6e7a4d6bd Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 22:15:36 +0800 Subject: [PATCH 1132/1191] Update tb_price_lite.js --- tb_price_lite.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index d9e4c42dc..830008dc4 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -60,7 +60,7 @@ if (url.indexOf(path2) != -1) { const lower = lowerMsgs(data.single) const detail = priceSummary(data) const tip = data.PriceRemark.Tip + "(仅供参考)" - $tool.notify("", "", `${lower}${detail}\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) + $tool.notify("", "", `${lower}\n${tip}${detail}`) } if (data.ok == 0 && data.msg.length > 0) { $tool.notify("", "", `⚠️ ${data.msg}`) @@ -72,7 +72,7 @@ if (url.indexOf(path2) != -1) { function lowerMsgs(data) { const lower = data.lowerPriceyh const lowerDate = dateFormat(data.lowerDateyh) - const lowerMsg = "历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` + const lowerMsg = "🍵 历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` return lowerMsg } From a821ce8597425ec98b10577c8de9a6a188c9e51a Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 22:16:39 +0800 Subject: [PATCH 1133/1191] Update tb_price_lite.js --- tb_price_lite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index 830008dc4..e5426a5c6 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -59,7 +59,7 @@ if (url.indexOf(path2) != -1) { if (data.ok == 1 && data.single) { const lower = lowerMsgs(data.single) const detail = priceSummary(data) - const tip = data.PriceRemark.Tip + "(仅供参考)" + const tip = data.PriceRemark.Tip $tool.notify("", "", `${lower}\n${tip}${detail}`) } if (data.ok == 0 && data.msg.length > 0) { From 901b2a3431dbe25d48109c9d38cf337383289765 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 22:17:36 +0800 Subject: [PATCH 1134/1191] Update jd_price_lite.js --- jd_price_lite.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index d189fc925..7b91c1932 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -40,7 +40,7 @@ if (url.indexOf(path2) != -1) { const lower = lowerMsgs(data.single) const detail = priceSummary(data) const tip = data.PriceRemark.Tip - $tool.notify("", "", `${lower} ${tip}${detail}\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) + $tool.notify("", "", `${lower}\n${tip}${detail}`) } if (data.ok == 0 && data.msg.length > 0) { $tool.notify("", "", `⚠️ ${data.msg}`) @@ -52,7 +52,7 @@ if (url.indexOf(path2) != -1) { function lowerMsgs(data) { const lower = data.lowerPriceyh const lowerDate = dateFormat(data.lowerDateyh) - const lowerMsg = "🫖 历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` + const lowerMsg = "🍵 历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` return lowerMsg } @@ -117,7 +117,7 @@ function historySummary(single) { } } }); - return [lowest30, lowest90, lowest180, lowest360]; + return [lowest30, lowest90, lowest180]; } function difference(currentPrice, price) { From 047a99e478331e0d70f8fc537e8a1e5e510a148f Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 22:22:37 +0800 Subject: [PATCH 1135/1191] Update tb_price_lite.js --- tb_price_lite.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index e5426a5c6..5d5ff7e8e 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -86,7 +86,7 @@ function priceSummary(data) { } else if (item.Name == "618价格") { item.Name = "六一八价格" } - summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` + summary += `\n${item.Name} ${String(parseInt(item.Price))} ${item.Date} ${item.Difference}` }) return summary } @@ -102,7 +102,7 @@ function historySummary(single) { const result = rexExec.exec(item); const dateUTC = new Date(eval(result[1])); const date = dateUTC.format("yyyy-MM-dd"); - let price = parseInt(result[2]); + let price = parseFloat(result[2]); if (index == 0) { currentPrice = price lowest30 = { Name: "三十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } From 783b5571f1fa9e84259fc60723c53bc3b9a560e3 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 22:35:46 +0800 Subject: [PATCH 1136/1191] Update tb_price_lite.js --- tb_price_lite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index 5d5ff7e8e..95b9ca75b 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -86,7 +86,7 @@ function priceSummary(data) { } else if (item.Name == "618价格") { item.Name = "六一八价格" } - summary += `\n${item.Name} ${String(parseInt(item.Price))} ${item.Date} ${item.Difference}` + summary += `\n${item.Name} ${"¥"+String(parseInt(item.Price).substr(1))} ${item.Date} ${item.Difference}` }) return summary } From 4409c49dc23b08115560258d34f887cfccfcf5fb Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 22:36:15 +0800 Subject: [PATCH 1137/1191] Update jd_price_lite.js --- jd_price_lite.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index 7b91c1932..241642aff 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -67,7 +67,7 @@ function priceSummary(data) { } else if (item.Name == "618价格") { item.Name = "六一八价格" } - summary += `\n${item.Name} ${item.Price} ${item.Date} ${item.Difference}` + summary += `\n${item.Name} ${"¥"+String(parseInt(item.Price).substr(1))} ${item.Date} ${item.Difference}` }) return summary } @@ -83,7 +83,7 @@ function historySummary(single) { const result = rexExec.exec(item); const dateUTC = new Date(eval(result[1])); const date = dateUTC.format("yyyy-MM-dd"); - let price = parseInt(result[2]); + let price = parseFloat(result[2]); if (index == 0) { currentPrice = price lowest30 = { Name: "三十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } From bad40c0ad0b037ab63940add6769dcfa41188680 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 22:41:24 +0800 Subject: [PATCH 1138/1191] Update tb_price.js --- tb_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price.js b/tb_price.js index 549820719..186dd85a5 100644 --- a/tb_price.js +++ b/tb_price.js @@ -110,7 +110,7 @@ function sendNotify(data, shareUrl) { const lower = lowerMsgs(data.single)[0] const detail = priceSummary(data)[1] const tip = data.PriceRemark.Tip + "(仅供参考)" - $tool.notify("", "", `🫖 历史${lower} ${tip}\n${detail}\n\n👉查看详情:http://tool.manmanbuy.com/historyLowest.aspx?url=${encodeURI(shareUrl)}`) + $tool.notify("", "", `🍵 历史${lower} ${tip}${detail}`) } if (data.ok == 0 && data.msg.length > 0) { $tool.notify("", "", `⚠️ ${data.msg}`) From 750d3eede38e8fc3e00fe39c5fc105e50aa18f15 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 22:41:53 +0800 Subject: [PATCH 1139/1191] Update jd_price.js --- jd_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd_price.js b/jd_price.js index daf83c116..4c69010d2 100644 --- a/jd_price.js +++ b/jd_price.js @@ -71,7 +71,7 @@ if (url.indexOf(path2) != -1) { function lowerMsgs(data) { const lower = data.lowerPriceyh const lowerDate = dateFormat(data.lowerDateyh) - const lowerMsg = "🫖 历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` + const lowerMsg = "🍵 历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` return lowerMsg } From 796bb03315279de597ebd6dbf80142f0ac9feb36 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 22:47:08 +0800 Subject: [PATCH 1140/1191] Update tb_price_lite.js --- tb_price_lite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index 95b9ca75b..7c21d0be9 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -86,7 +86,7 @@ function priceSummary(data) { } else if (item.Name == "618价格") { item.Name = "六一八价格" } - summary += `\n${item.Name} ${"¥"+String(parseInt(item.Price).substr(1))} ${item.Date} ${item.Difference}` + summary += `\n${item.Name} ${"¥"+String(parseInt(item.Price.substr(1)))} ${item.Date} ${item.Difference}` }) return summary } From c06b3a870d4897ab6dab194aff0ba4b36e9ab35a Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 22:47:32 +0800 Subject: [PATCH 1141/1191] Update jd_price_lite.js --- jd_price_lite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index 241642aff..c8312d56c 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -67,7 +67,7 @@ function priceSummary(data) { } else if (item.Name == "618价格") { item.Name = "六一八价格" } - summary += `\n${item.Name} ${"¥"+String(parseInt(item.Price).substr(1))} ${item.Date} ${item.Difference}` + summary += `\n${item.Name} ${"¥"+String(parseInt(item.Price.substr(1)))} ${item.Date} ${item.Difference}` }) return summary } From 9385a281dbb783f235cf5d2a774203d5caaeb3fe Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 23:01:17 +0800 Subject: [PATCH 1142/1191] Update tb_price_lite.js --- tb_price_lite.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tb_price_lite.js b/tb_price_lite.js index 7c21d0be9..57c57e03f 100644 --- a/tb_price_lite.js +++ b/tb_price_lite.js @@ -86,7 +86,8 @@ function priceSummary(data) { } else if (item.Name == "618价格") { item.Name = "六一八价格" } - summary += `\n${item.Name} ${"¥"+String(parseInt(item.Price.substr(1)))} ${item.Date} ${item.Difference}` + let price = String(parseInt(item.Price.substr(1))); + summary += `\n${item.Name} ${isNaN(price) ? "-" : "¥" + price} ${item.Date} ${item.Difference}` }) return summary } From a5bc0e2f987a5622a9fad19d2c02058897f4f067 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 31 Mar 2021 23:01:41 +0800 Subject: [PATCH 1143/1191] Update jd_price_lite.js --- jd_price_lite.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index c8312d56c..a7413a79a 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -67,7 +67,8 @@ function priceSummary(data) { } else if (item.Name == "618价格") { item.Name = "六一八价格" } - summary += `\n${item.Name} ${"¥"+String(parseInt(item.Price.substr(1)))} ${item.Date} ${item.Difference}` + let price = String(parseInt(item.Price.substr(1))); + summary += `\n${item.Name} ${isNaN(price) ? "-" : "¥" + price} ${item.Date} ${item.Difference}` }) return summary } From cc026c3c4b160961e9fc6472d9b21f0906c92107 Mon Sep 17 00:00:00 2001 From: zZPiglet Date: Tue, 13 Apr 2021 17:37:33 +0800 Subject: [PATCH 1144/1191] Add support for jdlite, jdpingou and jdHealth. Fix Quantumult X "$done()" issue. --- jd_price_lite.js | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/jd_price_lite.js b/jd_price_lite.js index a7413a79a..82813f2c2 100644 --- a/jd_price_lite.js +++ b/jd_price_lite.js @@ -1,10 +1,13 @@ /* README:https://github.com/yichahucha/surge/tree/master +^https?://api\.m\.jd\.com/(client\.action|api)\?functionId=(wareBusiness|serverConfig|basicConfig|lite_wareBusiness|pingou_item) */ const path1 = "serverConfig"; const path2 = "wareBusiness"; +const path2h = "wareBusiness.style"; const path3 = "basicConfig"; +const path4 = "pingou_item"; const consolelog = false; const url = $request.url; const body = $response.body; @@ -21,19 +24,32 @@ if (url.indexOf(path1) != -1) { if (url.indexOf(path3) != -1) { let obj = JSON.parse(body); let JDHttpToolKit = obj.data.JDHttpToolKit; + let jCommandConfig = obj.data.jCommandConfig; if (JDHttpToolKit) { delete obj.data.JDHttpToolKit.httpdns; delete obj.data.JDHttpToolKit.dnsvipV6; } + if (jCommandConfig) { + delete obj.data.jCommandConfig.httpdnsConfig; + } $done({ body: JSON.stringify(obj) }); } -if (url.indexOf(path2) != -1) { - $done({ body }); +if (url.indexOf(path2) != -1 || url.indexOf(path4) != -1) { + if (!$tool.isQuanX) { + $done({ body }); + } let obj = JSON.parse(body); const floors = obj.floors; const commodity_info = floors[floors.length - 1]; - const shareUrl = commodity_info.data.property.shareUrl; + const others = obj.others; + const domain = obj.domain; + const shareUrl = + url.indexOf(path4) != -1 + ? domain.h5Url + : url.indexOf(path2h) != -1 + ? others.property.shareUrl + : commodity_info.data.property.shareUrl; request_history_price(shareUrl, function (data) { if (data) { if (data.ok == 1 && data.single) { @@ -46,6 +62,7 @@ if (url.indexOf(path2) != -1) { $tool.notify("", "", `⚠️ ${data.msg}`) } } + $done({ body }); }) } @@ -273,4 +290,4 @@ Date.prototype.format = function (fmt) { } } return fmt; -} +} \ No newline at end of file From 4f1ac8f5645951ad8ac9d1f4723e63ad4146f880 Mon Sep 17 00:00:00 2001 From: asuka <54405882+ashurinn@users.noreply.github.com> Date: Mon, 19 Apr 2021 10:11:52 +0800 Subject: [PATCH 1145/1191] Update README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e39a542ba..e33c5d782 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,12 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com Display netflix ratings(IMDb、~~douban~~) ```properties [Script] -http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +http-request ^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +http-response ^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js # 单集评分 -nf_rating_season.js = type=http-response,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js +nf_rating_season.js = type=http-response,pattern=^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js [MITM] -hostname = ios.prod.ftl.netflix.com +hostname = ios-h2.prod.ftl.netflix.com ``` Display jd historical price @@ -60,10 +60,10 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com Display netflix ratings(IMDb、~~douban~~) ```properties [rewrite_local] -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js [mitm] -hostname = ios.prod.ftl.netflix.com +hostname = ios-h2.prod.ftl.netflix.com ``` Display jd historical price From 1fe7c39b82b64bf78179fbb8572c807921ffb157 Mon Sep 17 00:00:00 2001 From: asuka <54405882+ashurinn@users.noreply.github.com> Date: Mon, 19 Apr 2021 10:14:38 +0800 Subject: [PATCH 1146/1191] Update qx_sub.txt --- qx_sub.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qx_sub.txt b/qx_sub.txt index 2f9712c78..211c937d6 100644 --- a/qx_sub.txt +++ b/qx_sub.txt @@ -1,8 +1,8 @@ -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios-h2.prod.ftl.netflix.com -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js From c51170607168012d1cc5405329297d8287403b43 Mon Sep 17 00:00:00 2001 From: asuka <54405882+ashurinn@users.noreply.github.com> Date: Mon, 19 Apr 2021 10:16:04 +0800 Subject: [PATCH 1147/1191] Update sg_sub.sgmodule --- sg_sub.sgmodule | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sg_sub.sgmodule b/sg_sub.sgmodule index 85f59198a..1393852ed 100644 --- a/sg_sub.sgmodule +++ b/sg_sub.sgmodule @@ -1,12 +1,12 @@ #!name=eval_script.js module [MITM] -hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios-h2.prod.ftl.netflix.com [Script] -nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +nf_rating.js = type=http-request,pattern=^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js From 990b71f5554395bec388ef7829cfd65b39ea267b Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Mon, 19 Apr 2021 16:25:24 +0800 Subject: [PATCH 1148/1191] Update loon_sub.conf --- loon_sub.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/loon_sub.conf b/loon_sub.conf index 70eb4412a..65b408586 100644 --- a/loon_sub.conf +++ b/loon_sub.conf @@ -1,6 +1,6 @@ -http-request ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分1 -http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分2 -http-response ^https?://ios\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js, tag=单集评分 +http-request ^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分1 +http-response ^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分2 +http-response ^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js, tag=单集评分 http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js, tag=微博去广告 http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js, , tag=微博去广告 http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js,tag=京东比价 @@ -9,4 +9,4 @@ http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getde http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js,tag=淘宝比价1 Lite(通知版) http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js, tag=淘宝比价2 Lite(通知版) -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios-h2.prod.ftl.netflix.com From 68e1e78c83a34363d1b52f5fef6bc1695902f294 Mon Sep 17 00:00:00 2001 From: NobyDa <53217160+NobyDa@users.noreply.github.com> Date: Sat, 1 May 2021 14:44:13 +0800 Subject: [PATCH 1149/1191] Add Douban rating support. --- nf_rating.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/nf_rating.js b/nf_rating.js index ceb162c30..1d5f6aa8e 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -52,13 +52,12 @@ if (!$tool.isResponse) { } const requestRatings = async () => { const IMDb = await requestIMDbRating(title, year, type); - // const Douban = await requestDoubanRating(IMDb.id); + const Douban = await requestDoubanRating(IMDb.id); const IMDbrating = IMDb.msg.rating; const tomatoes = IMDb.msg.tomatoes; const country = IMDb.msg.country; - // const doubanRating = Douban.rating; - // const message = `${country}\n${IMDbrating}\n${doubanRating}${tomatoes.length > 0 ? "\n" + tomatoes + "\n" : "\n"}`; - const message = `${country}\n${IMDbrating}${tomatoes.length > 0 ? "\n" + tomatoes + "\n" : "\n"}`; + const doubanRating = Douban.rating; + const message = `${country}\n${IMDbrating}\n${doubanRating}${tomatoes.length > 0 ? "\n" + tomatoes + "\n" : "\n"}`; return message; } let msg = ""; @@ -88,14 +87,13 @@ function setTitleMap(id, title, map) { function requestDoubanRating(imdbId) { return new Promise(function (resolve, reject) { - const url = "https://api.douban.com/v2/movie/imdb/" + imdbId + "?apikey=0df993c66c0c636e29ecbb5344252a4a"; + const url = `https://www.douban.com/search?cat=1002&q=${imdbId}`; if (consoleLog) console.log("Netflix Douban Rating URL:\n" + url); $tool.get(url, function (error, response, data) { if (!error) { if (consoleLog) console.log("Netflix Douban Rating Data:\n" + data); if (response.status == 200) { - const obj = JSON.parse(data); - const rating = get_douban_rating_message(obj); + const rating = get_douban_rating_message(data); resolve({ rating }); } else { resolve({ rating: "Douban: " + errorTip().noData }); @@ -178,9 +176,11 @@ function get_IMDb_message(data) { } function get_douban_rating_message(data) { - const average = data.rating.average; - const numRaters = data.rating.numRaters; - const rating_message = `Douban: ⭐️ ${average.length > 0 ? average + "/10" : "N/A"} ${numRaters == 0 ? "" : parseFloat(numRaters).toLocaleString()}`; + const s = data.replace(/\n| |&#\d{2}/g, '') + .match(/\[\u7535\u5f71\].+?subject-cast\">.+?<\/span>/g); + const average = s ? s[0].split(/">(\d\.\d) Date: Tue, 18 May 2021 10:32:52 +0800 Subject: [PATCH 1150/1191] Update jd_price.js --- jd_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd_price.js b/jd_price.js index 4c69010d2..5df30271e 100644 --- a/jd_price.js +++ b/jd_price.js @@ -58,7 +58,7 @@ if (url.indexOf(path2) != -1) { floors.insert(bestIndex, lowerword); } if (data.ok == 0 && data.msg.length > 0) { - lowerword.data.ad.adword = "⚠️ " + data.msg; + lowerword.data.ad.adword = "⚠️ " + "脚本使用的比价接口加了 token 验证,不能用了,没有找到合适的比价接口之前,先禁用脚本吧"; floors.insert(bestIndex, lowerword); } $done({ body: JSON.stringify(obj) }); From 686bec7c2d5e77113cc9cf47c9ea05cb823dc6fe Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Tue, 18 May 2021 10:57:46 +0800 Subject: [PATCH 1151/1191] Update README.md --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e33c5d782..e966ab569 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,11 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com Display netflix ratings(IMDb、~~douban~~) ```properties [Script] -http-request ^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -http-response ^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +nf_rating.js = type=http-request,pattern=^https?:\/\/ios(-.*)?\.prod\.ftl\.netflix\.com\/iosui\/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +nf_rating.js = type=http-response,requires-body=1,pattern=^https?:\/\/ios(-.*)?\.prod\.ftl\.netflix\.com\/iosui\/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js # 单集评分 -nf_rating_season.js = type=http-response,pattern=^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js +nf_rating_season.js = type=http-response,pattern=^https?:\/\/ios(-.*)?\.prod\.ftl\.netflix\.com\/iosui\/warmer/.+type=show-ath,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js + [MITM] hostname = ios-h2.prod.ftl.netflix.com ``` @@ -60,8 +61,8 @@ hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com Display netflix ratings(IMDb、~~douban~~) ```properties [rewrite_local] -^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js [mitm] hostname = ios-h2.prod.ftl.netflix.com ``` From 75646cc754d1e7591a2fb37bb6e24e837c1f7253 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Tue, 18 May 2021 10:58:19 +0800 Subject: [PATCH 1152/1191] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index e966ab569..5f4974cd8 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,6 @@ nf_rating.js = type=http-request,pattern=^https?:\/\/ios(-.*)?\.prod\.ftl\.netfl nf_rating.js = type=http-response,requires-body=1,pattern=^https?:\/\/ios(-.*)?\.prod\.ftl\.netflix\.com\/iosui\/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js # 单集评分 nf_rating_season.js = type=http-response,pattern=^https?:\/\/ios(-.*)?\.prod\.ftl\.netflix\.com\/iosui\/warmer/.+type=show-ath,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js - [MITM] hostname = ios-h2.prod.ftl.netflix.com ``` From c997f4c29b6071daadf92353144ab0b911e1307a Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Tue, 18 May 2021 10:59:01 +0800 Subject: [PATCH 1153/1191] Update qx_sub.txt --- qx_sub.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qx_sub.txt b/qx_sub.txt index 211c937d6..951f6ecaf 100644 --- a/qx_sub.txt +++ b/qx_sub.txt @@ -1,8 +1,8 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios-h2.prod.ftl.netflix.com -^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js From a7d1544306c33f37ffee33ce4a2a88164e4da024 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Tue, 18 May 2021 10:59:27 +0800 Subject: [PATCH 1154/1191] Update sg_sub.sgmodule --- sg_sub.sgmodule | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sg_sub.sgmodule b/sg_sub.sgmodule index 1393852ed..d99c2a4bc 100644 --- a/sg_sub.sgmodule +++ b/sg_sub.sgmodule @@ -4,9 +4,9 @@ hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios-h2.prod.ftl.netflix.com [Script] -nf_rating.js = type=http-request,pattern=^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +nf_rating.js = type=http-request,pattern=^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js From 219402868f5a548edb958189c481c8fd635176ec Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Tue, 18 May 2021 10:59:56 +0800 Subject: [PATCH 1155/1191] Update loon_sub.conf --- loon_sub.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/loon_sub.conf b/loon_sub.conf index 65b408586..203625fba 100644 --- a/loon_sub.conf +++ b/loon_sub.conf @@ -1,6 +1,6 @@ -http-request ^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分1 -http-response ^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分2 -http-response ^https?://ios-h2\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js, tag=单集评分 +http-request ^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分1 +http-response ^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js, tag=奈飞评分2 +http-response ^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=show-ath requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js, tag=单集评分 http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js, tag=微博去广告 http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js, , tag=微博去广告 http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js,tag=京东比价 From 66daf0da1ed8c0ae8e1beeb08d7c080f9ed5a544 Mon Sep 17 00:00:00 2001 From: goose Date: Tue, 18 May 2021 11:06:02 +0800 Subject: [PATCH 1156/1191] fix --- README.md | 4 ++-- loon_sub.conf | 2 +- qx_sub.txt | 8 +------- sg_sub.sgmodule | 8 +------- 4 files changed, 5 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 5f4974cd8..491a93289 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ nf_rating.js = type=http-response,requires-body=1,pattern=^https?:\/\/ios(-.*)?\ # 单集评分 nf_rating_season.js = type=http-response,pattern=^https?:\/\/ios(-.*)?\.prod\.ftl\.netflix\.com\/iosui\/warmer/.+type=show-ath,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js [MITM] -hostname = ios-h2.prod.ftl.netflix.com +hostname = ios-*.prod.ftl.netflix.com,ios.prod.ftl.netflix.com ``` Display jd historical price @@ -63,7 +63,7 @@ Display netflix ratings(IMDb、~~douban~~) ^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js ^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js [mitm] -hostname = ios-h2.prod.ftl.netflix.com +hostname = ios-*.prod.ftl.netflix.com,ios.prod.ftl.netflix.com ``` Display jd historical price diff --git a/loon_sub.conf b/loon_sub.conf index 203625fba..005f7cc26 100644 --- a/loon_sub.conf +++ b/loon_sub.conf @@ -9,4 +9,4 @@ http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getde http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js,tag=淘宝比价1 Lite(通知版) http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js, tag=淘宝比价2 Lite(通知版) -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios-h2.prod.ftl.netflix.com +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios-*.prod.ftl.netflix.com,ios.prod.ftl.netflix.com diff --git a/qx_sub.txt b/qx_sub.txt index 951f6ecaf..3aa4578a1 100644 --- a/qx_sub.txt +++ b/qx_sub.txt @@ -1,15 +1,9 @@ -hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios-h2.prod.ftl.netflix.com +hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios-*.prod.ftl.netflix.com,ios.prod.ftl.netflix.com ^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - ^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - ^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js - ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info|remind/unread_count) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js diff --git a/sg_sub.sgmodule b/sg_sub.sgmodule index d99c2a4bc..d96c5acaf 100644 --- a/sg_sub.sgmodule +++ b/sg_sub.sgmodule @@ -1,19 +1,13 @@ #!name=eval_script.js module [MITM] -hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios-h2.prod.ftl.netflix.com +hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios-*.prod.ftl.netflix.com,ios.prod.ftl.netflix.com [Script] nf_rating.js = type=http-request,pattern=^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js - jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js - tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js - wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js - wb_ad.js = type=http-response,requires-body=1,max-size=-1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info|remind/unread_count),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js From d76d8d68ed34eaa6d417f8b12488459dbab42613 Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 19 May 2021 12:09:45 +0800 Subject: [PATCH 1157/1191] new api --- jd_price.js | 280 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 162 insertions(+), 118 deletions(-) diff --git a/jd_price.js b/jd_price.js index 5df30271e..dde625981 100644 --- a/jd_price.js +++ b/jd_price.js @@ -5,7 +5,6 @@ README:https://github.com/yichahucha/surge/tree/master const path1 = "serverConfig"; const path2 = "wareBusiness"; const path3 = "basicConfig"; -const consolelog = false; const url = $request.url; const body = $response.body; const $tool = tool(); @@ -33,110 +32,182 @@ if (url.indexOf(path2) != -1) { const floors = obj.floors; const commodity_info = floors[floors.length - 1]; const shareUrl = commodity_info.data.property.shareUrl; - request_history_price(shareUrl, function (data) { - if (data) { - const lowerword = adword_obj(); - lowerword.data.ad.textColor = "#fe0000"; - let bestIndex = 0; + let msg = "" + request_history_price(shareUrl) + .then(data => msg = priceSummary(data.priceTrend)) + .catch(error => msg = "获取比价结果失败") + .finally(() => { + // console.log(msg) + const lowerword = adword_obj() + lowerword.data.ad.textColor = "#fe0000" + let bestIndex = 0 for (let index = 0; index < floors.length; index++) { - const element = floors[index]; + const element = floors[index] if (element.mId == lowerword.mId) { - bestIndex = index + 1; - break; + bestIndex = index + 1 + break } else { if (element.sortId > lowerword.sortId) { - bestIndex = index; - break; + bestIndex = index + break } } } - if (data.ok == 1 && data.single) { - const lower = lowerMsgs(data.single) - const detail = priceSummary(data) - const tip = data.PriceRemark.Tip + "(仅供参考)" - lowerword.data.ad.adword = `${lower} ${tip}\n${detail}`; - floors.insert(bestIndex, lowerword); - } - if (data.ok == 0 && data.msg.length > 0) { - lowerword.data.ad.adword = "⚠️ " + "脚本使用的比价接口加了 token 验证,不能用了,没有找到合适的比价接口之前,先禁用脚本吧"; - floors.insert(bestIndex, lowerword); - } - $done({ body: JSON.stringify(obj) }); - } else { - $done({ body }); - } - }) + lowerword.data.ad.adword = msg + floors.insert(bestIndex, lowerword) + $done({ body: JSON.stringify(obj) }) + }) } -function lowerMsgs(data) { - const lower = data.lowerPriceyh - const lowerDate = dateFormat(data.lowerDateyh) - const lowerMsg = "🍵 历史最低到手价:¥" + String(lower) + ` (${lowerDate}) ` - return lowerMsg +function priceSummary(data) { + data = data.series[0] + let summary = `当前价: ${parseFloat(data.current / 100.0)}${getSpace(8)}最低: ${parseFloat(data.min / 100.0)}${getSpace(8)}最高: ${parseFloat(data.max / 100.0)}`; + const list = historySummary(data.data); + list.forEach((item, index) => { + summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date + }${getSpace(8)}${item.Difference}`; + }); + return summary; } +function historySummary(list) { + let currentPrice, lowest30, lowest90, lowest180, lowest360, price11, price618; + list = list.reverse().slice(0, 360); + list.forEach((item, index) => { + const date = getExactTime(item.x); + let price = parseFloat(item.y / 100.0); + if (index == 0) { + currentPrice = price; + price618 = { + Name: "六一八价格", + Price: "-", + Date: "-", + Difference: "-", + price: "-", + }; + price11 = { + Name: "双十一价格", + Price: "-", + Date: "-", + Difference: "-", + price: "-", + }; + lowest30 = { + Name: "三十天最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + lowest90 = { + Name: "九十天最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + lowest180 = { + Name: "一百八最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + lowest360 = { + Name: "三百六最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + } + if (date.indexOf("06-18") != -1) { + price618.price = price; + price618.Price = `¥${String(price)}`; + price618.Date = date; + price618.Difference = difference(currentPrice, price); + } + if (date.indexOf("11-11") != -1) { + price11.price = price; + price11.Price = `¥${String(price)}`; + price11.Date = date; + price11.Difference = difference(currentPrice, price); + } + if (index < 30 && price < lowest30.price) { + lowest30.price = price; + lowest30.Price = `¥${String(price)}`; + lowest30.Date = date; + lowest30.Difference = difference(currentPrice, price); + } + if (index < 90 && price < lowest90.price) { + lowest90.price = price; + lowest90.Price = `¥${String(price)}`; + lowest90.Date = date; + lowest90.Difference = difference(currentPrice, price); + } + if (index < 180 && price < lowest180.price) { + lowest180.price = price; + lowest180.Price = `¥${String(price)}`; + lowest180.Date = date; + lowest180.Difference = difference(currentPrice, price); + } + if (index < 360 && price < lowest360.price) { + lowest360.price = price; + lowest360.Price = `¥${String(price)}`; + lowest360.Date = date; + lowest360.Difference = difference(currentPrice, price); + } + }); + return [lowest30, lowest90, lowest180, lowest360, price618, price11]; +} -function priceSummary(data) { - let summary = "" - let listPriceDetail = data.PriceRemark.ListPriceDetail.slice(0,4) - let list = listPriceDetail.concat(historySummary(data.single)) - list.forEach((item, index) => { - if (item.Name == "双11价格") { - item.Name = "双十一价格" - } else if (item.Name == "618价格") { - item.Name = "六一八价格" - } - summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date}${getSpace(8)}${item.Difference}` - }) - return summary +async function request_history_price(share_url) { + const options = { + headers: { + "User-Agent": + "bijiago/1.4.2 (com.bijiago.app; build:65; iOS 14.5.1) Alamofire/4.9.1", + "Content-Type": "application/x-www-form-urlencoded", + }, + }; + + const rid = new Promise(function (resolve, reject) { + options.url = "https://app.bijiago.com/service/product?app_platform=ios&app_version=65&device=750%2A1334&opt=product&posi=default&url=" + encodeURIComponent(share_url); + $tool.get(options, function (error, response, data) { + if (!error) { + resolve(JSON.parse(data)) + } else { + reject(error) + } + }) + }) + + const priceTrend = (rid, dq_id) => { + return new Promise(function (resolve, reject) { + options.url = "https://app.bijiago.com/service/product" + options.body = `app_platform=ios&app_version=10000&append_promo=1&dp_id=${dq_id}&from=url&opt=priceTrend&rid=${rid}` + $tool.post(options, function (error, response, data) { + if (!error) { + resolve(JSON.parse(data)); + } else { + reject(error) + } + }) + }) + } + const ridData = await (rid) + const priceTrendData = await (priceTrend(ridData.rid, ridData.product.dp_id)) + return priceTrendData } -function historySummary(single) { - const rexMatch = /\[.*?\]/g; - const rexExec = /\[(.*),(.*),"(.*)".*\]/; - let currentPrice, lowest30, lowest90, lowest180, lowest360 - let list = single.jiagequshiyh.match(rexMatch); - list = list.reverse().slice(0, 360); - list.forEach((item, index) => { - if (item.length > 0) { - const result = rexExec.exec(item); - const dateUTC = new Date(eval(result[1])); - const date = dateUTC.format("yyyy-MM-dd"); - let price = parseFloat(result[2]); - if (index == 0) { - currentPrice = price - lowest30 = { Name: "三十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } - lowest90 = { Name: "九十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } - lowest180 = { Name: "一百八最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } - lowest360 = { Name: "三百六最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } - } - if (index < 30 && price < lowest30.price) { - lowest30.price = price - lowest30.Price = `¥${String(price)}` - lowest30.Date = date - lowest30.Difference = difference(currentPrice, price) - } - if (index < 90 && price < lowest90.price) { - lowest90.price = price - lowest90.Price = `¥${String(price)}` - lowest90.Date = date - lowest90.Difference = difference(currentPrice, price) - } - if (index < 180 && price < lowest180.price) { - lowest180.price = price - lowest180.Price = `¥${String(price)}` - lowest180.Date = date - lowest180.Difference = difference(currentPrice, price) - } - if (index < 360 && price < lowest360.price) { - lowest360.price = price - lowest360.Price = `¥${String(price)}` - lowest360.Date = date - lowest360.Difference = difference(currentPrice, price) - } - } - }); - return [lowest30, lowest90, lowest180, lowest360]; +function getExactTime(time) { + var date = new Date(time * 1000); + var year = date.getFullYear() + "-"; + var month = + (date.getMonth() + 1 < 10 + ? "0" + (date.getMonth() + 1) + : date.getMonth() + 1) + "-"; + var dates = date.getDate(); + return year + month + dates; } function difference(currentPrice, price) { @@ -162,33 +233,6 @@ function add(arg1, arg2) { return typeof d === "number" ? Number((result).toFixed(d)) : result; } -function request_history_price(share_url, callback) { - const options = { - url: "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", - headers: { - "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", - "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" - }, - body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent(share_url) - } - $tool.post(options, function (error, response, data) { - if (!error) { - callback(JSON.parse(data)); - if (consolelog) console.log("Data:\n" + data); - } else { - callback(null, null); - if (consolelog) console.log("Error:\n" + error); - } - }) -} - -function dateFormat(cellval) { - const date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10)); - const month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; - const currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); - return date.getFullYear() + "-" + month + "-" + currentDate; -} - function getSpace(length) { let blank = ""; for (let index = 0; index < length; index++) { From 6d81ce5e4061d25c629702adb12641bc4d4d280e Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 19 May 2021 15:35:14 +0800 Subject: [PATCH 1158/1191] fix --- jd_price.js | 10 +- tb_price.js | 323 +++++++++++++++++++++++++++------------------------- 2 files changed, 174 insertions(+), 159 deletions(-) diff --git a/jd_price.js b/jd_price.js index dde625981..005f1a7f3 100644 --- a/jd_price.js +++ b/jd_price.js @@ -34,10 +34,12 @@ if (url.indexOf(path2) != -1) { const shareUrl = commodity_info.data.property.shareUrl; let msg = "" request_history_price(shareUrl) - .then(data => msg = priceSummary(data.priceTrend)) - .catch(error => msg = "获取比价结果失败") + .then(data => { + if (data.priceTrend.series.length == 0) throw new Error('Whoops!') + msg = priceSummary(data.priceTrend) + }) + .catch(error => msg = "暂无价格信息") .finally(() => { - // console.log(msg) const lowerword = adword_obj() lowerword.data.ad.textColor = "#fe0000" let bestIndex = 0 @@ -61,7 +63,7 @@ if (url.indexOf(path2) != -1) { function priceSummary(data) { data = data.series[0] - let summary = `当前价: ${parseFloat(data.current / 100.0)}${getSpace(8)}最低: ${parseFloat(data.min / 100.0)}${getSpace(8)}最高: ${parseFloat(data.max / 100.0)}`; + let summary = `🍵 当前: ${parseFloat(data.current / 100.0)}${getSpace(8)}最低: ${parseFloat(data.min / 100.0)}${getSpace(8)}最高: ${parseFloat(data.max / 100.0)}`; const list = historySummary(data.data); list.forEach((item, index) => { summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date diff --git a/tb_price.js b/tb_price.js index 186dd85a5..98ed07228 100644 --- a/tb_price.js +++ b/tb_price.js @@ -53,8 +53,14 @@ if (url.indexOf(path2) != -1) { let obj = JSON.parse(body) let item = obj.data.item let shareUrl = `https://item.taobao.com/item.htm?id=${item.itemId}` - requestPrice(shareUrl, function (data) { - if (data) { + let msg + request_history_price(shareUrl) + .then(data => { + msg = data + if (msg.priceTrend.series.length == 0) throw new Error('Whoops!') + }) + .catch(error => msg = "暂无价格信息") + .finally(() => { if (obj.data.apiStack) { let apiStack = obj.data.apiStack[0] let value = JSON.parse(apiStack.value) @@ -74,62 +80,43 @@ if (url.indexOf(path2) != -1) { vertical = value.vertical } if (trade && trade.useWap == "true") { - $done({ body }) - sendNotify(data, shareUrl) + sendNotify(msg) } else { if (vertical && vertical.hasOwnProperty("tmallhkDirectSale")) { - // if (value.global) { - // value.global.data["tradeConsumerProtection"] = customTradeConsumerProtection() - // value.global.data.tradeConsumerProtection = setTradeConsumerProtection(data, value.global.data.tradeConsumerProtection) - // } else { - // value["tradeConsumerProtection"] = customTradeConsumerProtection() - // value.tradeConsumerProtection = setTradeConsumerProtection(data, value.tradeConsumerProtection) - // } - $done({ body }) - sendNotify(data, shareUrl) + sendNotify(msg) } else if (tradeConsumerProtection) { - tradeConsumerProtection = setTradeConsumerProtection(data, tradeConsumerProtection) + tradeConsumerProtection = setTradeConsumerProtection(msg, tradeConsumerProtection) } else { - consumerProtection = setConsumerProtection(data, consumerProtection) + consumerProtection = setConsumerProtection(msg, consumerProtection) } apiStack.value = JSON.stringify(value) - $done({ body: JSON.stringify(obj) }) } } else { - $done({ body }) - sendNotify(data, shareUrl) + sendNotify(msg) } - } else { - $done({ body }) - } - }) + $done({ body: JSON.stringify(obj) }) + }) } -function sendNotify(data, shareUrl) { - if (data.ok == 1 && data.single) { - const lower = lowerMsgs(data.single)[0] +function sendNotify(data) { + if (typeof data == "string") { + $tool.notify("", "", `${data}`) + } else { const detail = priceSummary(data)[1] - const tip = data.PriceRemark.Tip + "(仅供参考)" - $tool.notify("", "", `🍵 历史${lower} ${tip}${detail}`) - } - if (data.ok == 0 && data.msg.length > 0) { - $tool.notify("", "", `⚠️ ${data.msg}`) + $tool.notify("", "", `🍵 ${detail}`) } } function setConsumerProtection(data, consumerProtection) { let basicService = consumerProtection.serviceProtection.basicService let items = consumerProtection.items - if (data.ok == 1 && data.single) { - const lower = lowerMsgs(data.single) - const tip = data.PriceRemark.Tip - const summary = priceSummary(data)[1] - const item = customItem(lower[1], [`${lower[0]} ${tip}(仅供参考)\n${summary}`]) + if (typeof data == "string") { + let item = customItem(data, []) basicService.services.unshift(item) items.unshift(item) - } - if (data.ok == 0 && data.msg.length > 0) { - let item = customItem("暂无历史价格", [data.msg]) + } else { + const summary = priceSummary(data.priceTrend)[1] + const item = customItem("价格详情", [`${summary}`]) basicService.services.unshift(item) items.unshift(item) } @@ -138,95 +125,169 @@ function setConsumerProtection(data, consumerProtection) { function setTradeConsumerProtection(data, tradeConsumerProtection) { let service = tradeConsumerProtection.tradeConsumerService.service - if (data.ok == 1 && data.single) { - const lower = lowerMsgs(data.single) - const tip = data.PriceRemark.Tip - const tbitems = priceSummary(data)[0] - const item = customItem(lower[1], `${lower[0]} ${tip}(仅供参考)`) + if (typeof data == "string") { + service.items.unshift(customItem(data, "")) + } else { + const tbitems = priceSummary(data.priceTrend)[0] let nonService = tradeConsumerProtection.tradeConsumerService.nonService service.items = service.items.concat(nonService.items) nonService.title = "价格详情" nonService.items = tbitems - service.items.unshift(item) - } - if (data.ok == 0 && data.msg.length > 0) { - service.items.unshift(customItem("暂无历史价格", data.msg)) } return tradeConsumerProtection } -function lowerMsgs(data) { - const lower = data.lowerPriceyh - const lowerDate = dateFormat(data.lowerDateyh) - const lowerMsg = "最低到手价:¥" + String(lower) + `(${lowerDate})` - const lowerMsg1 = "历史最低¥" + String(lower) - return [lowerMsg, lowerMsg1] -} - function priceSummary(data) { - let tbitems = [] - let summary = "" - let listPriceDetail = data.PriceRemark.ListPriceDetail.slice(0,4) - let list = listPriceDetail.concat(historySummary(data.single)) + data = data.series[0] + let summary = `当前: ${parseFloat(data.current / 100.0)}${getSpace(4)}最低: ${parseFloat(data.min / 100.0)}${getSpace(4)}最高: ${parseFloat(data.max / 100.0)}` + let tbitems = [customItem(summary)] + const list = historySummary(data.data) list.forEach((item, index) => { - if (item.Name == "双11价格") { - item.Name = "双十一价格" - } else if (item.Name == "618价格") { - item.Name = "六一八价格" - } summary += `\n${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` let summaryItem = `${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` tbitems.push(customItem(summaryItem)) - }) + }); return [tbitems, summary] } -function historySummary(single) { - const rexMatch = /\[.*?\]/g; - const rexExec = /\[(.*),(.*),"(.*)".*\]/; - let currentPrice, lowest30, lowest90, lowest180, lowest360 - let list = single.jiagequshiyh.match(rexMatch); +function historySummary(list) { + let currentPrice, lowest30, lowest90, lowest180, lowest360, price11, price618; list = list.reverse().slice(0, 360); list.forEach((item, index) => { - if (item.length > 0) { - const result = rexExec.exec(item); - const dateUTC = new Date(eval(result[1])); - const date = dateUTC.format("yyyy-MM-dd"); - let price = parseFloat(result[2]); - if (index == 0) { - currentPrice = price - lowest30 = { Name: "三十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } - lowest90 = { Name: "九十天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } - lowest180 = { Name: "一百八最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } - lowest360 = { Name: "三百六最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price } - } - if (index < 30 && price < lowest30.price) { - lowest30.price = price - lowest30.Price = `¥${String(price)}` - lowest30.Date = date - lowest30.Difference = difference(currentPrice, price) - } - if (index < 90 && price < lowest90.price) { - lowest90.price = price - lowest90.Price = `¥${String(price)}` - lowest90.Date = date - lowest90.Difference = difference(currentPrice, price) - } - if (index < 180 && price < lowest180.price) { - lowest180.price = price - lowest180.Price = `¥${String(price)}` - lowest180.Date = date - lowest180.Difference = difference(currentPrice, price) - } - if (index < 360 && price < lowest360.price) { - lowest360.price = price - lowest360.Price = `¥${String(price)}` - lowest360.Date = date - lowest360.Difference = difference(currentPrice, price) - } + const date = getExactTime(item.x); + let price = parseFloat(item.y / 100.0); + if (index == 0) { + currentPrice = price; + price618 = { + Name: "六一八价格", + Price: "-", + Date: "-", + Difference: "-", + price: "-", + }; + price11 = { + Name: "双十一价格", + Price: "-", + Date: "-", + Difference: "-", + price: "-", + }; + lowest30 = { + Name: "三十天最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + lowest90 = { + Name: "九十天最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + lowest180 = { + Name: "一百八最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + lowest360 = { + Name: "三百六最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + } + if (date.indexOf("06-18") != -1) { + price618.price = price; + price618.Price = `¥${String(price)}`; + price618.Date = date; + price618.Difference = difference(currentPrice, price); + } + if (date.indexOf("11-11") != -1) { + price11.price = price; + price11.Price = `¥${String(price)}`; + price11.Date = date; + price11.Difference = difference(currentPrice, price); + } + if (index < 30 && price < lowest30.price) { + lowest30.price = price; + lowest30.Price = `¥${String(price)}`; + lowest30.Date = date; + lowest30.Difference = difference(currentPrice, price); + } + if (index < 90 && price < lowest90.price) { + lowest90.price = price; + lowest90.Price = `¥${String(price)}`; + lowest90.Date = date; + lowest90.Difference = difference(currentPrice, price); + } + if (index < 180 && price < lowest180.price) { + lowest180.price = price; + lowest180.Price = `¥${String(price)}`; + lowest180.Date = date; + lowest180.Difference = difference(currentPrice, price); + } + if (index < 360 && price < lowest360.price) { + lowest360.price = price; + lowest360.Price = `¥${String(price)}`; + lowest360.Date = date; + lowest360.Difference = difference(currentPrice, price); } }); - return [lowest30, lowest90, lowest180, lowest360]; + return [lowest30, lowest90, lowest180, lowest360, price618, price11]; +} + +async function request_history_price(share_url) { + const options = { + headers: { + "User-Agent": + "bijiago/1.4.2 (com.bijiago.app; build:65; iOS 14.5.1) Alamofire/4.9.1", + "Content-Type": "application/x-www-form-urlencoded", + }, + }; + + const rid = new Promise(function (resolve, reject) { + options.url = "https://app.bijiago.com/service/product?app_platform=ios&app_version=65&device=750%2A1334&opt=product&posi=default&url=" + encodeURIComponent(share_url); + $tool.get(options, function (error, response, data) { + if (!error) { + resolve(JSON.parse(data)) + } else { + reject(error) + } + }) + }) + + const priceTrend = (rid, dq_id) => { + return new Promise(function (resolve, reject) { + options.url = "https://app.bijiago.com/service/product" + options.body = `app_platform=ios&app_version=10000&append_promo=1&dp_id=${dq_id}&from=url&opt=priceTrend&rid=${rid}` + $tool.post(options, function (error, response, data) { + if (!error) { + resolve(JSON.parse(data)); + } else { + reject(error) + } + }) + }) + } + const ridData = await (rid) + const priceTrendData = await (priceTrend(ridData.rid, ridData.product.dp_id)) + return priceTrendData +} + +function getExactTime(time) { + var date = new Date(time * 1000); + var year = date.getFullYear() + "-"; + var month = + (date.getMonth() + 1 < 10 + ? "0" + (date.getMonth() + 1) + : date.getMonth() + 1) + "-"; + var dates = date.getDate(); + return year + month + dates; } function difference(currentPrice, price) { @@ -252,33 +313,6 @@ function add(arg1, arg2) { return typeof d === "number" ? Number((result).toFixed(d)) : result; } -function requestPrice(share_url, callback) { - const options = { - url: "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx", - headers: { - "Content-Type": "application/x-www-form-urlencoded;charset=utf-8", - "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios" - }, - body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent(share_url) - } - $tool.post(options, function (error, response, data) { - if (!error) { - callback(JSON.parse(data)); - if (consoleLog) console.log("Data:\n" + data); - } else { - callback(null, null); - if (consoleLog) console.log("Error:\n" + error); - } - }) -} - -function dateFormat(cellval) { - const date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10)); - const month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; - const currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); - return date.getFullYear() + "-" + month + "-" + currentDate; -} - function getSpace(length) { let blank = ""; for (let index = 0; index < length; index++) { @@ -296,27 +330,6 @@ function customItem(title, desc) { } } -function customTradeConsumerProtection() { - return { - "tradeConsumerService": { - "service": { - "items": [ - ], - "icon": "", - "title": "基础服务" - }, - "nonService": { - "items": [ - ], - "title": "其他" - } - }, - "passValue": "all", - "url": "https://h5.m.taobao.com/app/detailsubpage/consumer/index.js", - "type": "0" - } -} - function Qs2Json(url) { var search = url.substring(url.lastIndexOf("?") + 1); var obj = {}; From 024778da48d9b2e1e471676dc13dfdf226fda652 Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 19 May 2021 15:45:47 +0800 Subject: [PATCH 1159/1191] fix --- jd_price.js | 2 +- tb_price.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jd_price.js b/jd_price.js index 005f1a7f3..56ea5403b 100644 --- a/jd_price.js +++ b/jd_price.js @@ -217,7 +217,7 @@ function difference(currentPrice, price) { if (difference == 0) { return "-" } else { - return `${difference > 0 ? "↑" : "↓"}${String(difference)}` + return `${difference > 0 ? "↑" : "↓"}${String(Math.abs(difference))}` } } diff --git a/tb_price.js b/tb_price.js index 98ed07228..f8c072d5d 100644 --- a/tb_price.js +++ b/tb_price.js @@ -295,7 +295,7 @@ function difference(currentPrice, price) { if (difference == 0) { return "-" } else { - return `${difference > 0 ? "↑" : "↓"}${String(difference)}` + return `${difference > 0 ? "↑" : "↓"}${String(Math.abs(difference))}` } } From 9fb97e09097dd59ff6db3c5a45e3f333fb88de6f Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Wed, 19 May 2021 16:15:35 +0800 Subject: [PATCH 1160/1191] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 491a93289..6c688062d 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positiv hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` -Display netflix ratings(IMDb、~~douban~~) +Display netflix ratings(IMDb、douban) ```properties [Script] nf_rating.js = type=http-request,pattern=^https?:\/\/ios(-.*)?\.prod\.ftl\.netflix\.com\/iosui\/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js @@ -57,7 +57,7 @@ Weibo hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` -Display netflix ratings(IMDb、~~douban~~) +Display netflix ratings(IMDb、douban) ```properties [rewrite_local] ^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js From 57988800454847ae7b4adc59aec7b80c36e70dd2 Mon Sep 17 00:00:00 2001 From: luotiandong <974070535@qq.com> Date: Thu, 2 Dec 2021 23:09:55 +0800 Subject: [PATCH 1161/1191] change jd api --- jd_price.js | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/jd_price.js b/jd_price.js index 56ea5403b..f33e3f584 100644 --- a/jd_price.js +++ b/jd_price.js @@ -35,8 +35,8 @@ if (url.indexOf(path2) != -1) { let msg = "" request_history_price(shareUrl) .then(data => { - if (data.priceTrend.series.length == 0) throw new Error('Whoops!') - msg = priceSummary(data.priceTrend) + if (data.errno == -1) throw new Error('Whoops!') + msg = priceSummary(data.data) }) .catch(error => msg = "暂无价格信息") .finally(() => { @@ -62,9 +62,9 @@ if (url.indexOf(path2) != -1) { } function priceSummary(data) { - data = data.series[0] - let summary = `🍵 当前: ${parseFloat(data.current / 100.0)}${getSpace(8)}最低: ${parseFloat(data.min / 100.0)}${getSpace(8)}最高: ${parseFloat(data.max / 100.0)}`; - const list = historySummary(data.data); +// let summary = `🍵 当前: ${parseFloat(data.current / 100.0)}${getSpace(8)}最低: ${parseFloat(data.min / 100.0)}${getSpace(8)}最高: ${parseFloat(data.max / 100.0)}`; + let summary = `🍵 当前: ${data.CurrentPrice}${getSpace(8)}最低: ${data.LowestPrice}`; + const list = historySummary(data.PricesHistory); list.forEach((item, index) => { summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date }${getSpace(8)}${item.Difference}`; @@ -166,14 +166,12 @@ function historySummary(list) { async function request_history_price(share_url) { const options = { headers: { - "User-Agent": - "bijiago/1.4.2 (com.bijiago.app; build:65; iOS 14.5.1) Alamofire/4.9.1", - "Content-Type": "application/x-www-form-urlencoded", + "Content-Type": "application/json; charset=utf-8", }, }; - const rid = new Promise(function (resolve, reject) { - options.url = "https://app.bijiago.com/service/product?app_platform=ios&app_version=65&device=750%2A1334&opt=product&posi=default&url=" + encodeURIComponent(share_url); + const priceTrend = new Promise(function (resolve, reject) { + options.url = "https://price.icharle.xyz/?product_id=" + share_url; $tool.get(options, function (error, response, data) { if (!error) { resolve(JSON.parse(data)) @@ -182,22 +180,7 @@ async function request_history_price(share_url) { } }) }) - - const priceTrend = (rid, dq_id) => { - return new Promise(function (resolve, reject) { - options.url = "https://app.bijiago.com/service/product" - options.body = `app_platform=ios&app_version=10000&append_promo=1&dp_id=${dq_id}&from=url&opt=priceTrend&rid=${rid}` - $tool.post(options, function (error, response, data) { - if (!error) { - resolve(JSON.parse(data)); - } else { - reject(error) - } - }) - }) - } - const ridData = await (rid) - const priceTrendData = await (priceTrend(ridData.rid, ridData.product.dp_id)) + const priceTrendData = await (priceTrend) return priceTrendData } From 6ef9d963f0ccb22bae4d26cd4730f7f3a960c54f Mon Sep 17 00:00:00 2001 From: luotiandong <974070535@qq.com> Date: Thu, 2 Dec 2021 23:17:42 +0800 Subject: [PATCH 1162/1191] fix domain --- jd_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd_price.js b/jd_price.js index f33e3f584..03d46fd00 100644 --- a/jd_price.js +++ b/jd_price.js @@ -171,7 +171,7 @@ async function request_history_price(share_url) { }; const priceTrend = new Promise(function (resolve, reject) { - options.url = "https://price.icharle.xyz/?product_id=" + share_url; + options.url = "https://price.icharle.com/?product_id=" + share_url; $tool.get(options, function (error, response, data) { if (!error) { resolve(JSON.parse(data)) From 9eb321650f3e6d82819f8b77138c96285eccad6a Mon Sep 17 00:00:00 2001 From: luotiandong <974070535@qq.com> Date: Thu, 2 Dec 2021 23:22:54 +0800 Subject: [PATCH 1163/1191] fix jd --- jd_price.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jd_price.js b/jd_price.js index 03d46fd00..f10c84a6a 100644 --- a/jd_price.js +++ b/jd_price.js @@ -76,8 +76,8 @@ function historySummary(list) { let currentPrice, lowest30, lowest90, lowest180, lowest360, price11, price618; list = list.reverse().slice(0, 360); list.forEach((item, index) => { - const date = getExactTime(item.x); - let price = parseFloat(item.y / 100.0); + const date = item.Date; + let price = item.Price; if (index == 0) { currentPrice = price; price618 = { From c04359e53bcf928ccd14529431762f8ed8c0aef7 Mon Sep 17 00:00:00 2001 From: luotiandong <974070535@qq.com> Date: Thu, 2 Dec 2021 23:24:47 +0800 Subject: [PATCH 1164/1191] Update jd_price.js --- jd_price.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jd_price.js b/jd_price.js index f10c84a6a..6c4201689 100644 --- a/jd_price.js +++ b/jd_price.js @@ -77,7 +77,7 @@ function historySummary(list) { list = list.reverse().slice(0, 360); list.forEach((item, index) => { const date = item.Date; - let price = item.Price; + let price = item.Price if (index == 0) { currentPrice = price; price618 = { @@ -109,14 +109,14 @@ function historySummary(list) { price, }; lowest180 = { - Name: "一百八最低", + Name: "一百八天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), price, }; lowest360 = { - Name: "三百六最低", + Name: "三百六天最低", Price: `¥${String(price)}`, Date: date, Difference: difference(currentPrice, price), From e8da857f2b6570e96ea144cf35a80671ac5a4d79 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 9 Dec 2021 15:30:57 +0800 Subject: [PATCH 1165/1191] fix --- jd_price.js | 442 +++++++++++++++++++++++++++------------------------- tb_price.js | 52 ++----- 2 files changed, 246 insertions(+), 248 deletions(-) diff --git a/jd_price.js b/jd_price.js index 6c4201689..cf1e57220 100644 --- a/jd_price.js +++ b/jd_price.js @@ -32,175 +32,175 @@ if (url.indexOf(path2) != -1) { const floors = obj.floors; const commodity_info = floors[floors.length - 1]; const shareUrl = commodity_info.data.property.shareUrl; - let msg = "" + let msg = ""; request_history_price(shareUrl) - .then(data => { - if (data.errno == -1) throw new Error('Whoops!') - msg = priceSummary(data.data) + .then((data) => { + if (data.errno == -1) throw new Error("Whoops!"); + msg = priceSummary(data.data); }) - .catch(error => msg = "暂无价格信息") + .catch((error) => (msg = "暂无价格信息")) .finally(() => { - const lowerword = adword_obj() - lowerword.data.ad.textColor = "#fe0000" - let bestIndex = 0 + const lowerword = adword_obj(); + lowerword.data.ad.textColor = "#fe0000"; + let bestIndex = 0; for (let index = 0; index < floors.length; index++) { - const element = floors[index] + const element = floors[index]; if (element.mId == lowerword.mId) { - bestIndex = index + 1 - break + bestIndex = index + 1; + break; } else { if (element.sortId > lowerword.sortId) { - bestIndex = index - break + bestIndex = index; + break; } } } - lowerword.data.ad.adword = msg - floors.insert(bestIndex, lowerword) - $done({ body: JSON.stringify(obj) }) - }) + lowerword.data.ad.adword = msg; + floors.insert(bestIndex, lowerword); + $done({ body: JSON.stringify(obj) }); + }); } function priceSummary(data) { -// let summary = `🍵 当前: ${parseFloat(data.current / 100.0)}${getSpace(8)}最低: ${parseFloat(data.min / 100.0)}${getSpace(8)}最高: ${parseFloat(data.max / 100.0)}`; - let summary = `🍵 当前: ${data.CurrentPrice}${getSpace(8)}最低: ${data.LowestPrice}`; - const list = historySummary(data.PricesHistory); - list.forEach((item, index) => { - summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date - }${getSpace(8)}${item.Difference}`; - }); - return summary; + let summary = `🌨 当前: ${data.CurrentPrice}${getSpace(8)}最低: ${data.LowestPrice + }`; + const list = historySummary(data.PricesHistory); + list.forEach((item, index) => { + summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date + }${getSpace(8)}${item.Difference}`; + }); + return summary; } function historySummary(list) { - let currentPrice, lowest30, lowest90, lowest180, lowest360, price11, price618; - list = list.reverse().slice(0, 360); - list.forEach((item, index) => { - const date = item.Date; - let price = item.Price - if (index == 0) { - currentPrice = price; - price618 = { - Name: "六一八价格", - Price: "-", - Date: "-", - Difference: "-", - price: "-", - }; - price11 = { - Name: "双十一价格", - Price: "-", - Date: "-", - Difference: "-", - price: "-", - }; - lowest30 = { - Name: "三十天最低", - Price: `¥${String(price)}`, - Date: date, - Difference: difference(currentPrice, price), - price, - }; - lowest90 = { - Name: "九十天最低", - Price: `¥${String(price)}`, - Date: date, - Difference: difference(currentPrice, price), - price, - }; - lowest180 = { - Name: "一百八天最低", - Price: `¥${String(price)}`, - Date: date, - Difference: difference(currentPrice, price), - price, - }; - lowest360 = { - Name: "三百六天最低", - Price: `¥${String(price)}`, - Date: date, - Difference: difference(currentPrice, price), - price, - }; - } - if (date.indexOf("06-18") != -1) { - price618.price = price; - price618.Price = `¥${String(price)}`; - price618.Date = date; - price618.Difference = difference(currentPrice, price); - } - if (date.indexOf("11-11") != -1) { - price11.price = price; - price11.Price = `¥${String(price)}`; - price11.Date = date; - price11.Difference = difference(currentPrice, price); - } - if (index < 30 && price < lowest30.price) { - lowest30.price = price; - lowest30.Price = `¥${String(price)}`; - lowest30.Date = date; - lowest30.Difference = difference(currentPrice, price); - } - if (index < 90 && price < lowest90.price) { - lowest90.price = price; - lowest90.Price = `¥${String(price)}`; - lowest90.Date = date; - lowest90.Difference = difference(currentPrice, price); - } - if (index < 180 && price < lowest180.price) { - lowest180.price = price; - lowest180.Price = `¥${String(price)}`; - lowest180.Date = date; - lowest180.Difference = difference(currentPrice, price); - } - if (index < 360 && price < lowest360.price) { - lowest360.price = price; - lowest360.Price = `¥${String(price)}`; - lowest360.Date = date; - lowest360.Difference = difference(currentPrice, price); - } - }); - return [lowest30, lowest90, lowest180, lowest360, price618, price11]; + let currentPrice, lowest30, lowest90, lowest180, lowest360, price11, price618; + list = list.reverse().slice(0, 360); + list.forEach((item, index) => { + const date = item.Date; + let price = item.Price; + if (index == 0) { + currentPrice = price; + price618 = { + Name: "六一八价格", + Price: "-", + Date: "-", + Difference: "-", + price: "-", + }; + price11 = { + Name: "双十一价格", + Price: "-", + Date: "-", + Difference: "-", + price: "-", + }; + lowest30 = { + Name: "三十天最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + lowest90 = { + Name: "九十天最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + lowest180 = { + Name: "一百八最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + lowest360 = { + Name: "三百六最低", + Price: `¥${String(price)}`, + Date: date, + Difference: difference(currentPrice, price), + price, + }; + } + if (date.indexOf("06-18") != -1) { + price618.price = price; + price618.Price = `¥${String(price)}`; + price618.Date = date; + price618.Difference = difference(currentPrice, price); + } + if (date.indexOf("11-11") != -1) { + price11.price = price; + price11.Price = `¥${String(price)}`; + price11.Date = date; + price11.Difference = difference(currentPrice, price); + } + if (index < 30 && price < lowest30.price) { + lowest30.price = price; + lowest30.Price = `¥${String(price)}`; + lowest30.Date = date; + lowest30.Difference = difference(currentPrice, price); + } + if (index < 90 && price < lowest90.price) { + lowest90.price = price; + lowest90.Price = `¥${String(price)}`; + lowest90.Date = date; + lowest90.Difference = difference(currentPrice, price); + } + if (index < 180 && price < lowest180.price) { + lowest180.price = price; + lowest180.Price = `¥${String(price)}`; + lowest180.Date = date; + lowest180.Difference = difference(currentPrice, price); + } + if (index < 360 && price < lowest360.price) { + lowest360.price = price; + lowest360.Price = `¥${String(price)}`; + lowest360.Date = date; + lowest360.Difference = difference(currentPrice, price); + } + }); + return [lowest30, lowest90, lowest180, lowest360, price618, price11]; } async function request_history_price(share_url) { - const options = { - headers: { - "Content-Type": "application/json; charset=utf-8", - }, - }; + const options = { + headers: { + "Content-Type": "application/json; charset=utf-8", + }, + }; - const priceTrend = new Promise(function (resolve, reject) { - options.url = "https://price.icharle.com/?product_id=" + share_url; - $tool.get(options, function (error, response, data) { - if (!error) { - resolve(JSON.parse(data)) - } else { - reject(error) - } - }) - }) - const priceTrendData = await (priceTrend) - return priceTrendData + const priceTrend = new Promise(function (resolve, reject) { + options.url = "https://price.icharle.com/?product_id=" + share_url; + $tool.get(options, function (error, response, data) { + if (!error) { + resolve(JSON.parse(data)); + } else { + reject(error); + } + }); + }); + const priceTrendData = await priceTrend; + return priceTrendData; } function getExactTime(time) { - var date = new Date(time * 1000); - var year = date.getFullYear() + "-"; - var month = - (date.getMonth() + 1 < 10 - ? "0" + (date.getMonth() + 1) - : date.getMonth() + 1) + "-"; - var dates = date.getDate(); - return year + month + dates; + var date = new Date(time * 1000); + var year = date.getFullYear() + "-"; + var month = + (date.getMonth() + 1 < 10 + ? "0" + (date.getMonth() + 1) + : date.getMonth() + 1) + "-"; + var dates = date.getDate(); + return year + month + dates; } function difference(currentPrice, price) { - let difference = sub(currentPrice, price) + let difference = sub(currentPrice, price); if (difference == 0) { - return "-" + return "-"; } else { - return `${difference > 0 ? "↑" : "↓"}${String(Math.abs(difference))}` + return `${difference > 0 ? "↑" : "↓"}${String(Math.abs(difference))}`; } } @@ -209,13 +209,16 @@ function sub(arg1, arg2) { } function add(arg1, arg2) { - arg1 = arg1.toString(), arg2 = arg2.toString(); - var arg1Arr = arg1.split("."), arg2Arr = arg2.split("."), d1 = arg1Arr.length == 2 ? arg1Arr[1] : "", d2 = arg2Arr.length == 2 ? arg2Arr[1] : ""; + (arg1 = arg1.toString()), (arg2 = arg2.toString()); + var arg1Arr = arg1.split("."), + arg2Arr = arg2.split("."), + d1 = arg1Arr.length == 2 ? arg1Arr[1] : "", + d2 = arg2Arr.length == 2 ? arg2Arr[1] : ""; var maxLen = Math.max(d1.length, d2.length); var m = Math.pow(10, maxLen); var result = Number(((arg1 * m + arg2 * m) / m).toFixed(maxLen)); var d = arguments[2]; - return typeof d === "number" ? Number((result).toFixed(d)) : result; + return typeof d === "number" ? Number(result.toFixed(d)) : result; } function getSpace(length) { @@ -228,101 +231,108 @@ function getSpace(length) { function adword_obj() { return { - "bId": "eCustom_flo_199", - "cf": { - "bgc": "#ffffff", - "spl": "empty" + bId: "eCustom_flo_199", + cf: { + bgc: "#ffffff", + spl: "empty", }, - "data": { - "ad": { - "adword": "", - "textColor": "#8C8C8C", - "color": "#f23030", - "newALContent": true, - "hasFold": true, - "class": "com.jd.app.server.warecoresoa.domain.AdWordInfo.AdWordInfo", - "adLinkContent": "", - "adLink": "" - } + data: { + ad: { + adword: "", + textColor: "#8C8C8C", + color: "#f23030", + newALContent: true, + hasFold: true, + class: "com.jd.app.server.warecoresoa.domain.AdWordInfo.AdWordInfo", + adLinkContent: "", + adLink: "", + }, }, - "mId": "bpAdword", - "refId": "eAdword_0000000028", - "sortId": 13 - } + mId: "bpAdword", + refId: "eAdword_0000000028", + sortId: 13, + }; } function tool() { - const isSurge = typeof $httpClient != "undefined" - const isQuanX = typeof $task != "undefined" - const isResponse = typeof $response != "undefined" + const isSurge = typeof $httpClient != "undefined"; + const isQuanX = typeof $task != "undefined"; + const isResponse = typeof $response != "undefined"; const node = (() => { if (typeof require == "function") { - const request = require('request') - return ({ request }) + const request = require("request"); + return { request }; } else { - return (null) + return null; } - })() + })(); const notify = (title, subtitle, message) => { - if (isQuanX) $notify(title, subtitle, message) - if (isSurge) $notification.post(title, subtitle, message) + if (isQuanX) $notify(title, subtitle, message); + if (isSurge) $notification.post(title, subtitle, message); if (node) console.log(JSON.stringify({ title, subtitle, message })); - } + }; const write = (value, key) => { - if (isQuanX) return $prefs.setValueForKey(value, key) - if (isSurge) return $persistentStore.write(value, key) - } + if (isQuanX) return $prefs.setValueForKey(value, key); + if (isSurge) return $persistentStore.write(value, key); + }; const read = (key) => { - if (isQuanX) return $prefs.valueForKey(key) - if (isSurge) return $persistentStore.read(key) - } + if (isQuanX) return $prefs.valueForKey(key); + if (isSurge) return $persistentStore.read(key); + }; const adapterStatus = (response) => { if (response) { if (response.status) { - response["statusCode"] = response.status + response["statusCode"] = response.status; } else if (response.statusCode) { - response["status"] = response.statusCode + response["status"] = response.statusCode; } } - return response - } + return response; + }; const get = (options, callback) => { if (isQuanX) { - if (typeof options == "string") options = { url: options } - options["method"] = "GET" - $task.fetch(options).then(response => { - callback(null, adapterStatus(response), response.body) - }, reason => callback(reason.error, null, null)) + if (typeof options == "string") options = { url: options }; + options["method"] = "GET"; + $task.fetch(options).then( + (response) => { + callback(null, adapterStatus(response), response.body); + }, + (reason) => callback(reason.error, null, null) + ); } - if (isSurge) $httpClient.get(options, (error, response, body) => { - callback(error, adapterStatus(response), body) - }) + if (isSurge) + $httpClient.get(options, (error, response, body) => { + callback(error, adapterStatus(response), body); + }); if (node) { node.request(options, (error, response, body) => { - callback(error, adapterStatus(response), body) - }) + callback(error, adapterStatus(response), body); + }); } - } + }; const post = (options, callback) => { if (isQuanX) { - if (typeof options == "string") options = { url: options } - options["method"] = "POST" - $task.fetch(options).then(response => { - callback(null, adapterStatus(response), response.body) - }, reason => callback(reason.error, null, null)) + if (typeof options == "string") options = { url: options }; + options["method"] = "POST"; + $task.fetch(options).then( + (response) => { + callback(null, adapterStatus(response), response.body); + }, + (reason) => callback(reason.error, null, null) + ); } if (isSurge) { $httpClient.post(options, (error, response, body) => { - callback(error, adapterStatus(response), body) - }) + callback(error, adapterStatus(response), body); + }); } if (node) { node.request.post(options, (error, response, body) => { - callback(error, adapterStatus(response), body) - }) + callback(error, adapterStatus(response), body); + }); } - } - return { isQuanX, isSurge, isResponse, notify, write, read, get, post } + }; + return { isQuanX, isSurge, isResponse, notify, write, read, get, post }; } Array.prototype.insert = function (index, item) { @@ -338,22 +348,28 @@ Date.prototype.format = function (fmt) { "m+": this.getMinutes(), "s+": this.getSeconds(), "q+": Math.floor((this.getMonth() + 3) / 3), - "S+": this.getMilliseconds() + "S+": this.getMilliseconds(), }; for (var k in o) { if (new RegExp("(" + k + ")").test(fmt)) { if (k == "y+") { fmt = fmt.replace(RegExp.$1, ("" + o[k]).substr(4 - RegExp.$1.length)); - } - else if (k == "S+") { + } else if (k == "S+") { var lens = RegExp.$1.length; lens = lens == 1 ? 3 : lens; - fmt = fmt.replace(RegExp.$1, ("00" + o[k]).substr(("" + o[k]).length - 1, lens)); - } - else { - fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + fmt = fmt.replace( + RegExp.$1, + ("00" + o[k]).substr(("" + o[k]).length - 1, lens) + ); + } else { + fmt = fmt.replace( + RegExp.$1, + RegExp.$1.length == 1 + ? o[k] + : ("00" + o[k]).substr(("" + o[k]).length) + ); } } } return fmt; -} +}; diff --git a/tb_price.js b/tb_price.js index f8c072d5d..3bfd5aa9d 100644 --- a/tb_price.js +++ b/tb_price.js @@ -57,7 +57,7 @@ if (url.indexOf(path2) != -1) { request_history_price(shareUrl) .then(data => { msg = data - if (msg.priceTrend.series.length == 0) throw new Error('Whoops!') + if (data.errno == -1) throw new Error('Whoops!') }) .catch(error => msg = "暂无价格信息") .finally(() => { @@ -102,7 +102,7 @@ function sendNotify(data) { if (typeof data == "string") { $tool.notify("", "", `${data}`) } else { - const detail = priceSummary(data)[1] + const detail = priceSummary(data.data) $tool.notify("", "", `🍵 ${detail}`) } } @@ -115,7 +115,7 @@ function setConsumerProtection(data, consumerProtection) { basicService.services.unshift(item) items.unshift(item) } else { - const summary = priceSummary(data.priceTrend)[1] + const summary = priceSummary(data.data) const item = customItem("价格详情", [`${summary}`]) basicService.services.unshift(item) items.unshift(item) @@ -128,7 +128,7 @@ function setTradeConsumerProtection(data, tradeConsumerProtection) { if (typeof data == "string") { service.items.unshift(customItem(data, "")) } else { - const tbitems = priceSummary(data.priceTrend)[0] + const tbitems = priceSummary(data.data) let nonService = tradeConsumerProtection.tradeConsumerService.nonService service.items = service.items.concat(nonService.items) nonService.title = "价格详情" @@ -138,10 +138,9 @@ function setTradeConsumerProtection(data, tradeConsumerProtection) { } function priceSummary(data) { - data = data.series[0] - let summary = `当前: ${parseFloat(data.current / 100.0)}${getSpace(4)}最低: ${parseFloat(data.min / 100.0)}${getSpace(4)}最高: ${parseFloat(data.max / 100.0)}` + let summary = `🌨 当前: ${data.CurrentPrice}${getSpace(8)}最低: ${data.LowestPrice}` let tbitems = [customItem(summary)] - const list = historySummary(data.data) + const list = historySummary(data.PricesHistory) list.forEach((item, index) => { summary += `\n${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` let summaryItem = `${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` @@ -154,8 +153,8 @@ function historySummary(list) { let currentPrice, lowest30, lowest90, lowest180, lowest360, price11, price618; list = list.reverse().slice(0, 360); list.forEach((item, index) => { - const date = getExactTime(item.x); - let price = parseFloat(item.y / 100.0); + const date = item.Date; + let price = item.Price; if (index == 0) { currentPrice = price; price618 = { @@ -244,39 +243,22 @@ function historySummary(list) { async function request_history_price(share_url) { const options = { headers: { - "User-Agent": - "bijiago/1.4.2 (com.bijiago.app; build:65; iOS 14.5.1) Alamofire/4.9.1", - "Content-Type": "application/x-www-form-urlencoded", + "Content-Type": "application/json; charset=utf-8", }, }; - const rid = new Promise(function (resolve, reject) { - options.url = "https://app.bijiago.com/service/product?app_platform=ios&app_version=65&device=750%2A1334&opt=product&posi=default&url=" + encodeURIComponent(share_url); + const priceTrend = new Promise(function (resolve, reject) { + options.url = "https://price.icharle.com/?product_id=" + share_url; $tool.get(options, function (error, response, data) { if (!error) { - resolve(JSON.parse(data)) + resolve(JSON.parse(data)); } else { - reject(error) + reject(error); } - }) - }) - - const priceTrend = (rid, dq_id) => { - return new Promise(function (resolve, reject) { - options.url = "https://app.bijiago.com/service/product" - options.body = `app_platform=ios&app_version=10000&append_promo=1&dp_id=${dq_id}&from=url&opt=priceTrend&rid=${rid}` - $tool.post(options, function (error, response, data) { - if (!error) { - resolve(JSON.parse(data)); - } else { - reject(error) - } - }) - }) - } - const ridData = await (rid) - const priceTrendData = await (priceTrend(ridData.rid, ridData.product.dp_id)) - return priceTrendData + }); + }); + const priceTrendData = await priceTrend; + return priceTrendData; } function getExactTime(time) { From 8f3b6df36cfe9422e4584db9159e840181843234 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 9 Dec 2021 15:42:06 +0800 Subject: [PATCH 1166/1191] fix --- jd_price.js | 6 ++---- tb_price.js | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/jd_price.js b/jd_price.js index cf1e57220..a5957b6de 100644 --- a/jd_price.js +++ b/jd_price.js @@ -62,12 +62,10 @@ if (url.indexOf(path2) != -1) { } function priceSummary(data) { - let summary = `🌨 当前: ${data.CurrentPrice}${getSpace(8)}最低: ${data.LowestPrice - }`; + let summary = `🌨 当前: ${data.CurrentPrice}${getSpace(8)}历史最低: ${data.LowestPrice}(${data.LowestDate})`; const list = historySummary(data.PricesHistory); list.forEach((item, index) => { - summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date - }${getSpace(8)}${item.Difference}`; + summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date}${getSpace(8)}${item.Difference}`; }); return summary; } diff --git a/tb_price.js b/tb_price.js index 3bfd5aa9d..0f53f3383 100644 --- a/tb_price.js +++ b/tb_price.js @@ -138,7 +138,7 @@ function setTradeConsumerProtection(data, tradeConsumerProtection) { } function priceSummary(data) { - let summary = `🌨 当前: ${data.CurrentPrice}${getSpace(8)}最低: ${data.LowestPrice}` + let summary = `🌨 当前: ${data.CurrentPrice}${getSpace(8)}最低: ${data.LowestPrice}(${data.LowestDate})` let tbitems = [customItem(summary)] const list = historySummary(data.PricesHistory) list.forEach((item, index) => { From ea9daeda71805c47ea72cc28e8aef74000580a29 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 9 Dec 2021 21:05:20 +0800 Subject: [PATCH 1167/1191] fix --- README.md | 4 ++-- loon_sub.conf | 4 ++-- qx_sub.txt | 2 +- sg_sub.sgmodule | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6c688062d..a49a00e05 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Display taobao historical price ```properties # 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [Script] -http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +http-response ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [MITM] hostname = trade-acs.m.taobao.com @@ -78,7 +78,7 @@ Display taobao historical price ```properties # 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [rewrite_local] -^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^http://.+/amdc/mobileDispatch url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [mitm] hostname = trade-acs.m.taobao.com diff --git a/loon_sub.conf b/loon_sub.conf index 005f7cc26..337f6fa06 100644 --- a/loon_sub.conf +++ b/loon_sub.conf @@ -4,9 +4,9 @@ http-response ^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/warmer/.+type=s http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js, tag=微博去广告 http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js, , tag=微博去广告 http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js,tag=京东比价 -http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js,tag=淘宝比价1(内置版) +http-response ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js,tag=淘宝比价1(内置版) http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js, tag=淘宝比价2(内置版) -http-request ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js,tag=淘宝比价1 Lite(通知版) +http-response ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js,tag=淘宝比价1 Lite(通知版) http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price_lite.js, tag=淘宝比价2 Lite(通知版) hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios-*.prod.ftl.netflix.com,ios.prod.ftl.netflix.com diff --git a/qx_sub.txt b/qx_sub.txt index 3aa4578a1..29bd911d8 100644 --- a/qx_sub.txt +++ b/qx_sub.txt @@ -3,7 +3,7 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,ap ^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js ^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +^http://.+/amdc/mobileDispatch url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info|remind/unread_count) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js diff --git a/sg_sub.sgmodule b/sg_sub.sgmodule index d96c5acaf..4d1c89862 100644 --- a/sg_sub.sgmodule +++ b/sg_sub.sgmodule @@ -7,7 +7,7 @@ hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taob nf_rating.js = type=http-request,pattern=^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js -tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js +tb_price.js = type=http-response,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js wb_ad.js = type=http-response,requires-body=1,max-size=-1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info|remind/unread_count),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js From f3e87b9df8cce333afed687bac8cb938386f49f9 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 9 Dec 2021 21:10:48 +0800 Subject: [PATCH 1168/1191] fix --- tb_price.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tb_price.js b/tb_price.js index 0f53f3383..7a135a0fe 100644 --- a/tb_price.js +++ b/tb_price.js @@ -103,7 +103,7 @@ function sendNotify(data) { $tool.notify("", "", `${data}`) } else { const detail = priceSummary(data.data) - $tool.notify("", "", `🍵 ${detail}`) + $tool.notify("", "", `${detail}`) } } @@ -115,8 +115,8 @@ function setConsumerProtection(data, consumerProtection) { basicService.services.unshift(item) items.unshift(item) } else { - const summary = priceSummary(data.data) - const item = customItem("价格详情", [`${summary}`]) + const summary = priceSummary(data.data)[1] + const item = customItem("历史价格详情", [`${summary}`]) basicService.services.unshift(item) items.unshift(item) } @@ -128,10 +128,10 @@ function setTradeConsumerProtection(data, tradeConsumerProtection) { if (typeof data == "string") { service.items.unshift(customItem(data, "")) } else { - const tbitems = priceSummary(data.data) + const tbitems = priceSummary(data.data)[0] let nonService = tradeConsumerProtection.tradeConsumerService.nonService service.items = service.items.concat(nonService.items) - nonService.title = "价格详情" + nonService.title = "历史价格详情" nonService.items = tbitems } return tradeConsumerProtection @@ -142,7 +142,7 @@ function priceSummary(data) { let tbitems = [customItem(summary)] const list = historySummary(data.PricesHistory) list.forEach((item, index) => { - summary += `\n${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` + summary += `${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}\n` let summaryItem = `${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` tbitems.push(customItem(summaryItem)) }); From 037fdda1c93eb55da79aa5475c946921aed0e295 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 9 Dec 2021 21:16:09 +0800 Subject: [PATCH 1169/1191] fix --- jd_price.js | 2 +- tb_price.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jd_price.js b/jd_price.js index a5957b6de..cdec860f4 100644 --- a/jd_price.js +++ b/jd_price.js @@ -62,7 +62,7 @@ if (url.indexOf(path2) != -1) { } function priceSummary(data) { - let summary = `🌨 当前: ${data.CurrentPrice}${getSpace(8)}历史最低: ${data.LowestPrice}(${data.LowestDate})`; + let summary = `🌨 当前: ${data.CurrentPrice}${getSpace(8)}最低: ${data.LowestPrice} (${data.LowestDate})`; const list = historySummary(data.PricesHistory); list.forEach((item, index) => { summary += `\n${item.Name}${getSpace(8)}${item.Price}${getSpace(8)}${item.Date}${getSpace(8)}${item.Difference}`; diff --git a/tb_price.js b/tb_price.js index 7a135a0fe..86d231b63 100644 --- a/tb_price.js +++ b/tb_price.js @@ -138,7 +138,7 @@ function setTradeConsumerProtection(data, tradeConsumerProtection) { } function priceSummary(data) { - let summary = `🌨 当前: ${data.CurrentPrice}${getSpace(8)}最低: ${data.LowestPrice}(${data.LowestDate})` + let summary = `🌨 当前: ${data.CurrentPrice}${getSpace(8)}最低: ${data.LowestPrice} (${data.LowestDate})` let tbitems = [customItem(summary)] const list = historySummary(data.PricesHistory) list.forEach((item, index) => { From 9f3ce57300347e80924a281a5130de2d63385680 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 9 Dec 2021 21:17:56 +0800 Subject: [PATCH 1170/1191] fix --- tb_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price.js b/tb_price.js index 86d231b63..0658b4f27 100644 --- a/tb_price.js +++ b/tb_price.js @@ -142,7 +142,7 @@ function priceSummary(data) { let tbitems = [customItem(summary)] const list = historySummary(data.PricesHistory) list.forEach((item, index) => { - summary += `${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}\n` + summary += `\n${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` let summaryItem = `${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` tbitems.push(customItem(summaryItem)) }); From 6ee264d14646682428b801304856b291bae3a84b Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 9 Dec 2021 21:25:47 +0800 Subject: [PATCH 1171/1191] fix --- tb_price.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tb_price.js b/tb_price.js index 0658b4f27..690eb9aff 100644 --- a/tb_price.js +++ b/tb_price.js @@ -99,8 +99,8 @@ if (url.indexOf(path2) != -1) { } function sendNotify(data) { - if (typeof data == "string") { - $tool.notify("", "", `${data}`) + if (data.data.PricesHistory.length == 0) { + $tool.notify("", "", `暂无历史价格`) } else { const detail = priceSummary(data.data) $tool.notify("", "", `${detail}`) @@ -110,8 +110,8 @@ function sendNotify(data) { function setConsumerProtection(data, consumerProtection) { let basicService = consumerProtection.serviceProtection.basicService let items = consumerProtection.items - if (typeof data == "string") { - let item = customItem(data, []) + if (data.data.PricesHistory.length == 0) { + let item = customItem("暂无历史价格", []) basicService.services.unshift(item) items.unshift(item) } else { @@ -125,8 +125,8 @@ function setConsumerProtection(data, consumerProtection) { function setTradeConsumerProtection(data, tradeConsumerProtection) { let service = tradeConsumerProtection.tradeConsumerService.service - if (typeof data == "string") { - service.items.unshift(customItem(data, "")) + if (data.data.PricesHistory.length == 0) { + service.items.unshift(customItem("暂无历史价格", "")) } else { const tbitems = priceSummary(data.data)[0] let nonService = tradeConsumerProtection.tradeConsumerService.nonService From cc7ac526a33f0ca7d13f84323c1ed22c0f4c9341 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 9 Dec 2021 21:30:21 +0800 Subject: [PATCH 1172/1191] fix --- tb_price.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tb_price.js b/tb_price.js index 690eb9aff..694091a33 100644 --- a/tb_price.js +++ b/tb_price.js @@ -99,7 +99,7 @@ if (url.indexOf(path2) != -1) { } function sendNotify(data) { - if (data.data.PricesHistory.length == 0) { + if (data.data.PricesHistory == null) { $tool.notify("", "", `暂无历史价格`) } else { const detail = priceSummary(data.data) @@ -110,7 +110,7 @@ function sendNotify(data) { function setConsumerProtection(data, consumerProtection) { let basicService = consumerProtection.serviceProtection.basicService let items = consumerProtection.items - if (data.data.PricesHistory.length == 0) { + if (data.data.PricesHistory == null) { let item = customItem("暂无历史价格", []) basicService.services.unshift(item) items.unshift(item) @@ -125,7 +125,7 @@ function setConsumerProtection(data, consumerProtection) { function setTradeConsumerProtection(data, tradeConsumerProtection) { let service = tradeConsumerProtection.tradeConsumerService.service - if (data.data.PricesHistory.length == 0) { + if (data.data.PricesHistory == null) { service.items.unshift(customItem("暂无历史价格", "")) } else { const tbitems = priceSummary(data.data)[0] From 7556c61c8842a817260a0c38b03961e7399bdcde Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 9 Dec 2021 21:32:53 +0800 Subject: [PATCH 1173/1191] fix --- tb_price.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tb_price.js b/tb_price.js index 694091a33..73039d192 100644 --- a/tb_price.js +++ b/tb_price.js @@ -116,7 +116,7 @@ function setConsumerProtection(data, consumerProtection) { items.unshift(item) } else { const summary = priceSummary(data.data)[1] - const item = customItem("历史价格详情", [`${summary}`]) + const item = customItem("🌨 历史价格详情", [`${summary}`]) basicService.services.unshift(item) items.unshift(item) } @@ -131,14 +131,14 @@ function setTradeConsumerProtection(data, tradeConsumerProtection) { const tbitems = priceSummary(data.data)[0] let nonService = tradeConsumerProtection.tradeConsumerService.nonService service.items = service.items.concat(nonService.items) - nonService.title = "历史价格详情" + nonService.title = "🌨 历史价格详情" nonService.items = tbitems } return tradeConsumerProtection } function priceSummary(data) { - let summary = `🌨 当前: ${data.CurrentPrice}${getSpace(8)}最低: ${data.LowestPrice} (${data.LowestDate})` + let summary = `当前: ${data.CurrentPrice}${getSpace(8)}最低: ${data.LowestPrice} (${data.LowestDate})` let tbitems = [customItem(summary)] const list = historySummary(data.PricesHistory) list.forEach((item, index) => { From 82a250c61dbd6f0355d0dedb99cb8bfce1df0f5d Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 9 Dec 2021 21:33:20 +0800 Subject: [PATCH 1174/1191] fix --- tb_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price.js b/tb_price.js index 73039d192..3994c793f 100644 --- a/tb_price.js +++ b/tb_price.js @@ -143,7 +143,7 @@ function priceSummary(data) { const list = historySummary(data.PricesHistory) list.forEach((item, index) => { summary += `\n${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` - let summaryItem = `${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` + let summaryItem = `${item.Name}${getSpace(2)}${item.Price}${getSpace(2)}${item.Date}${getSpace(2)}${item.Difference}` tbitems.push(customItem(summaryItem)) }); return [tbitems, summary] From 6964a9c920ed23cebc84e2783dd3d34388d340f9 Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 9 Dec 2021 21:35:28 +0800 Subject: [PATCH 1175/1191] fix --- tb_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price.js b/tb_price.js index 3994c793f..0b9fe5a11 100644 --- a/tb_price.js +++ b/tb_price.js @@ -143,7 +143,7 @@ function priceSummary(data) { const list = historySummary(data.PricesHistory) list.forEach((item, index) => { summary += `\n${item.Name}${getSpace(4)}${item.Price}${getSpace(4)}${item.Date}${getSpace(4)}${item.Difference}` - let summaryItem = `${item.Name}${getSpace(2)}${item.Price}${getSpace(2)}${item.Date}${getSpace(2)}${item.Difference}` + let summaryItem = `${item.Name}${getSpace(3)}${item.Price}${getSpace(3)}${item.Date}${getSpace(3)}${item.Difference}` tbitems.push(customItem(summaryItem)) }); return [tbitems, summary] From d16a5f57c2371b1eca8bfa29ab8edd05671b140d Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Fri, 10 Dec 2021 19:37:43 +0800 Subject: [PATCH 1176/1191] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a49a00e05..d5ab0fe3b 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,8 @@ Display netflix ratings(IMDb、douban) [rewrite_local] ^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js ^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +# 单集评分 +^https?:\/\/ios(-.*)?\.prod\.ftl\.netflix\.com\/iosui\/warmer/.+type=show-ath url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js [mitm] hostname = ios-*.prod.ftl.netflix.com,ios.prod.ftl.netflix.com ``` From 52bb771cc3e2c815bc2cf77fde1019f9b62edffb Mon Sep 17 00:00:00 2001 From: goose Date: Fri, 10 Dec 2021 19:50:05 +0800 Subject: [PATCH 1177/1191] fix --- tb_price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tb_price.js b/tb_price.js index 0b9fe5a11..593e8ceda 100644 --- a/tb_price.js +++ b/tb_price.js @@ -56,8 +56,8 @@ if (url.indexOf(path2) != -1) { let msg request_history_price(shareUrl) .then(data => { - msg = data if (data.errno == -1) throw new Error('Whoops!') + msg = data }) .catch(error => msg = "暂无价格信息") .finally(() => { From f5f0da1a4810936a03ae1dc1a19e694fd16b63ad Mon Sep 17 00:00:00 2001 From: NobyDa <53217160+NobyDa@users.noreply.github.com> Date: Mon, 16 May 2022 18:59:17 +0800 Subject: [PATCH 1178/1191] Fix Douban rating. --- nf_rating.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_rating.js b/nf_rating.js index 1d5f6aa8e..342940501 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -177,7 +177,7 @@ function get_IMDb_message(data) { function get_douban_rating_message(data) { const s = data.replace(/\n| |&#\d{2}/g, '') - .match(/\[\u7535\u5f71\].+?subject-cast\">.+?<\/span>/g); + .match(/\[(\u7535\u5f71|\u7535\u89c6\u5267)\].+?subject-cast\">.+?<\/span>/g); const average = s ? s[0].split(/">(\d\.\d) Date: Fri, 27 Jan 2023 15:48:31 +0800 Subject: [PATCH 1179/1191] fix --- nf_rating.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nf_rating.js b/nf_rating.js index 342940501..9404064c3 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -67,6 +67,12 @@ if (!$tool.isResponse) { .finally(() => { let summary = obj.value.videos[videoID].summary; summary["supplementalMessage"] = `${msg}${summary && summary.supplementalMessage ? "\n" + summary.supplementalMessage : ""}`; + msg_obj = {"tagline":summary.supplementalMessage, "classification":"REGULAR"} + if (summary["supplementalMessages"]) { + summary["supplementalMessages"].push(msg_obj) + }else { + summary["supplementalMessages"] = [msg_obj] + } if (consoleLog) console.log("Netflix Modified Body:\n" + JSON.stringify(obj)); $done({ body: JSON.stringify(obj) }); }); From a772e0c980061dcd58bda20ddf2301b5e50cba60 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Jan 2023 16:01:02 +0800 Subject: [PATCH 1180/1191] fix --- README.md | 62 +++++++++++++++++++------------------------------------ 1 file changed, 21 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index d5ab0fe3b..2824452c5 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,33 @@ # Surge -Weibo + +Netflix ratings(IMDb、douban) ```properties [Script] -http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info|remind/unread_count) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +nf_rating.js = type=http-request,pattern=^https?:\/\/ios(-.*)?\.prod\.ftl\.netflix\.com\/iosui\/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +nf_rating.js = type=http-response,requires-body=1,pattern=^https?:\/\/ios(-.*)?\.prod\.ftl\.netflix\.com\/iosui\/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js [MITM] -hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com +hostname = ios-*.prod.ftl.netflix.com,ios.prod.ftl.netflix.com ``` -Display netflix ratings(IMDb、douban) +Weibo ```properties [Script] -nf_rating.js = type=http-request,pattern=^https?:\/\/ios(-.*)?\.prod\.ftl\.netflix\.com\/iosui\/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -nf_rating.js = type=http-response,requires-body=1,pattern=^https?:\/\/ios(-.*)?\.prod\.ftl\.netflix\.com\/iosui\/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -# 单集评分 -nf_rating_season.js = type=http-response,pattern=^https?:\/\/ios(-.*)?\.prod\.ftl\.netflix\.com\/iosui\/warmer/.+type=show-ath,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js +http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info|remind/unread_count) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js [MITM] -hostname = ios-*.prod.ftl.netflix.com,ios.prod.ftl.netflix.com +hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` -Display jd historical price +~~Display jd historical price~~ ```properties -# 不生效或失效的检查一下配置有没有这两条复写,删除试试 -# ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=start - reject -# ^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=(start|queryMaterialAdverts) - reject [Script] http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js [MITM] hostname = api.m.jd.com ``` -Display taobao historical price +~~Display taobao historical price~~ ```properties -# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [Script] http-response ^http://.+/amdc/mobileDispatch requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js @@ -40,35 +35,27 @@ http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getde hostname = trade-acs.m.taobao.com ``` -DingDing clock in -```properties -[Script] -cron "0 9,18 * * 1-5" script-path=https://raw.githubusercontent.com/yichahucha/surge/master/clock_in.js -``` - # Quan-X -Weibo +Netflix ratings(IMDb、douban) ```properties [rewrite_local] -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info|remind/unread_count) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js +^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js [mitm] -hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com +hostname = ios-*.prod.ftl.netflix.com,ios.prod.ftl.netflix.com ``` -Display netflix ratings(IMDb、douban) +Weibo ```properties [rewrite_local] -^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js -# 单集评分 -^https?:\/\/ios(-.*)?\.prod\.ftl\.netflix\.com\/iosui\/warmer/.+type=show-ath url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating_season.js +^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js +^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info|remind/unread_count) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js [mitm] -hostname = ios-*.prod.ftl.netflix.com,ios.prod.ftl.netflix.com +hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` -Display jd historical price +~~Display jd historical price~~ ```properties [rewrite_local] ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js @@ -76,18 +63,11 @@ Display jd historical price hostname = api.m.jd.com ``` -Display taobao historical price +~~Display taobao historical price~~ ```properties -# 不生效或失效的需要卸载 tb 重装,注意不开脚本进 tb 会失效 [rewrite_local] ^http://.+/amdc/mobileDispatch url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [mitm] hostname = trade-acs.m.taobao.com ``` - -DingDing clock in -```properties -[task_local] -0 9,18 * * 1-5 https://raw.githubusercontent.com/yichahucha/surge/master/clock_in.js -``` From cbaaca2fe088a0e3b158b465ce83f541679430ad Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Jan 2023 18:50:21 +0800 Subject: [PATCH 1181/1191] fix --- wb_ad.js | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/wb_ad.js b/wb_ad.js index ff92f40ce..ce983a33a 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -25,6 +25,12 @@ const path20 = "/video/tiny_stream_video_list"; const path21 = "/photo/info"; const path22 = "/live/media_homelist"; const path23 = "/remind/unread_count"; +const path24 = "/search/container_timeline" +const path25 = "/messageflow/notice" +const path26 = "/statuses/container_timeline_hot" +const path27 = "/search/finder" +const path28 = "/statuses/container_timeline_unread" +const path29 = "/statuses/container_timeline" const url = $request.url; let body = $response.body; @@ -112,9 +118,77 @@ if ( let obj = JSON.parse(body); obj.video = {}; body = JSON.stringify(obj); +} else if (url.indexOf(path24) != -1) { + let obj = JSON.parse(body); + filter_items_feed(obj) + body = JSON.stringify(obj); +} else if (url.indexOf(path25) != -1) { + let obj = JSON.parse(body); + filter_messageflow_notice(obj) + body = JSON.stringify(obj); +} else if (url.indexOf(path26) != -1 || url.indexOf(path28) != -1 || url.indexOf(path29) != -1) { + let obj = JSON.parse(body); + filter_items_feed(obj) + body = JSON.stringify(obj); +} else if (url.indexOf(path27) != -1) { + let obj = JSON.parse(body); + filter_search_finder(obj) + body = JSON.stringify(obj); } + $done({ body }); +function filter_search_finder(data) { + channels = data["channelInfo"]["channels"] + for (let index = 0; index < channels.length; index++) { + const element = channels[index]; + if (element["en_name"] == "Discover") { + filter_finder_items(element["payload"]) + } + } +} + +function filter_finder_items(data) { + items = data["items"] + for (let index = items.length-1; index >= 0; index--) { + const item = items[index]; + if (item["category"] == "card") { + type = item["data"]["card_type"] + if (type == 118) { + items.splice(index,1) + } + }else if (item["category"] == "feed") { + type = item["data"]["mblogtype"] + if (type == 1) { + items.splice(index,1) + } + } + } +} + +function filter_messageflow_notice(data) { + items = data["messages"] + for (let index = items.length-1; index >= 0; index--) { + const item = items[index]; + if (item["isrecommend"] == true) { + items.splice(index,1) + } + } +} + +function filter_items_feed(data) { + items = data["items"] + for (let index = items.length-1; index >= 0; index--) { + const item = items[index]; + if (item["category"] == "feed") { + type = item["data"]["mblogtype"] + if (type == 1) { + items.splice(index,1) + } + } + } +} + function filter_timeline_statuses(statuses) { if (statuses && statuses.length > 0) { let i = statuses.length; From 3def6751adc7b19700ba3981b27a7252452fd788 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Jan 2023 19:03:35 +0800 Subject: [PATCH 1182/1191] fix --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2824452c5..6c0be16d0 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Weibo ```properties [Script] http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -http-response ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info|remind/unread_count) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +http-response ^https?://m?api\.weibo\.c(n|om)/2/(messageflow/notice|search/(container_timeline|finder)|statuses/(container_timeline_hot|container_timeline_unread|container_timeline|unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info|remind/unread_count) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js [MITM] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` @@ -50,7 +50,7 @@ Weibo ```properties [rewrite_local] ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info|remind/unread_count) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js +^https?://m?api\.weibo\.c(n|om)/2/(messageflow/notice|search/(container_timeline|finder)|statuses/(container_timeline_hot|container_timeline_unread|container_timeline|unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info|remind/unread_count) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js [mitm] hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com ``` From acbcf45a32e0764547c1dba98280782be88af486 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Jan 2023 19:11:52 +0800 Subject: [PATCH 1183/1191] fix --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6c0be16d0..4131253a5 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ nf_rating.js = type=http-response,requires-body=1,pattern=^https?:\/\/ios(-.*)?\ hostname = ios-*.prod.ftl.netflix.com,ios.prod.ftl.netflix.com ``` -Weibo +Wb ```properties [Script] http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js @@ -46,7 +46,7 @@ Netflix ratings(IMDb、douban) hostname = ios-*.prod.ftl.netflix.com,ios.prod.ftl.netflix.com ``` -Weibo +Wb ```properties [rewrite_local] ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js From 14544b3831ba505402a633854706b5ef8b932d7f Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Jan 2023 21:13:56 +0800 Subject: [PATCH 1184/1191] fix --- nf_rating.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nf_rating.js b/nf_rating.js index 9404064c3..727c82dd6 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -56,8 +56,9 @@ if (!$tool.isResponse) { const IMDbrating = IMDb.msg.rating; const tomatoes = IMDb.msg.tomatoes; const country = IMDb.msg.country; + const awards = IMDb.msg.awards; const doubanRating = Douban.rating; - const message = `${country}\n${IMDbrating}\n${doubanRating}${tomatoes.length > 0 ? "\n" + tomatoes + "\n" : "\n"}`; + const message = `\n${awards.length > 0 ? awards + "\n": ""}${country}\n${IMDbrating}\n${doubanRating}${tomatoes.length > 0 ? "\n" + tomatoes + "\n" : "\n"}`; return message; } let msg = ""; @@ -160,6 +161,10 @@ function get_IMDb_message(data) { let tomatoes_message = ""; let country_message = ""; let ratings = data.Ratings; + let awards_message = ""; + if (data.Awards && data.Awards != "N/A") { + awards_message = "🏆 " + data.Awards; + } if (ratings.length > 0) { const imdb_source = ratings[0]["Source"]; if (imdb_source == "Internet Movie Database") { @@ -178,7 +183,7 @@ function get_IMDb_message(data) { } } country_message = get_country_message(data.Country); - return { rating: rating_message, tomatoes: tomatoes_message, country: country_message } + return { rating: rating_message, tomatoes: tomatoes_message, country: country_message, awards: awards_message } } function get_douban_rating_message(data) { From 8ba0b024714c568158c6c147f8dd7738df34b772 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Jan 2023 21:20:08 +0800 Subject: [PATCH 1185/1191] fix --- nf_rating.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nf_rating.js b/nf_rating.js index 727c82dd6..22b40a911 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -58,13 +58,13 @@ if (!$tool.isResponse) { const country = IMDb.msg.country; const awards = IMDb.msg.awards; const doubanRating = Douban.rating; - const message = `\n${awards.length > 0 ? awards + "\n": ""}${country}\n${IMDbrating}\n${doubanRating}${tomatoes.length > 0 ? "\n" + tomatoes + "\n" : "\n"}`; + const message = `\n${country}\n${IMDbrating}\n${doubanRating}\n${tomatoes.length > 0 ? tomatoes + "\n" : ""}${awards.length > 0 ? "\n" + awards + "\n": "\n"}`; return message; } let msg = ""; requestRatings() .then(message => msg = message) - .catch(error => msg = error + "\n") + .catch(error => msg = "\n" + error + "\n") .finally(() => { let summary = obj.value.videos[videoID].summary; summary["supplementalMessage"] = `${msg}${summary && summary.supplementalMessage ? "\n" + summary.supplementalMessage : ""}`; From e73634aaa16957fe3cfbe8e717254334245a25f6 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Jan 2023 21:27:35 +0800 Subject: [PATCH 1186/1191] fix --- nf_rating.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_rating.js b/nf_rating.js index 22b40a911..0cfb98e7e 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -58,7 +58,7 @@ if (!$tool.isResponse) { const country = IMDb.msg.country; const awards = IMDb.msg.awards; const doubanRating = Douban.rating; - const message = `\n${country}\n${IMDbrating}\n${doubanRating}\n${tomatoes.length > 0 ? tomatoes + "\n" : ""}${awards.length > 0 ? "\n" + awards + "\n": "\n"}`; + const message = `\n${country}\n${IMDbrating}\n${doubanRating}\n${tomatoes.length > 0 ? tomatoes + "\n" : ""}${awards.length > 0 ? awards + "\n": "\n"}`; return message; } let msg = ""; From 747efaa79adb140254fccb9d8ffea9978380ab34 Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Fri, 27 Jan 2023 21:33:43 +0800 Subject: [PATCH 1187/1191] fix --- nf_rating.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nf_rating.js b/nf_rating.js index 0cfb98e7e..9dd4c49a7 100644 --- a/nf_rating.js +++ b/nf_rating.js @@ -58,13 +58,13 @@ if (!$tool.isResponse) { const country = IMDb.msg.country; const awards = IMDb.msg.awards; const doubanRating = Douban.rating; - const message = `\n${country}\n${IMDbrating}\n${doubanRating}\n${tomatoes.length > 0 ? tomatoes + "\n" : ""}${awards.length > 0 ? awards + "\n": "\n"}`; + const message = `${awards.length > 0 ? awards + "\n": ""}${country}\n${IMDbrating}\n${doubanRating}${tomatoes.length > 0 ? "\n" + tomatoes + "\n" : "\n"}`; return message; } let msg = ""; requestRatings() .then(message => msg = message) - .catch(error => msg = "\n" + error + "\n") + .catch(error => msg = error + "\n") .finally(() => { let summary = obj.value.videos[videoID].summary; summary["supplementalMessage"] = `${msg}${summary && summary.supplementalMessage ? "\n" + summary.supplementalMessage : ""}`; From 613f9b278aaf2386d81cf0aa06da75d7b7861d2f Mon Sep 17 00:00:00 2001 From: yichahucha <12595948+yichahucha@users.noreply.github.com> Date: Sat, 28 Jan 2023 06:30:42 +0800 Subject: [PATCH 1188/1191] fix --- wb_ad.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wb_ad.js b/wb_ad.js index ce983a33a..3de4ce491 100644 --- a/wb_ad.js +++ b/wb_ad.js @@ -31,6 +31,7 @@ const path26 = "/statuses/container_timeline_hot" const path27 = "/search/finder" const path28 = "/statuses/container_timeline_unread" const path29 = "/statuses/container_timeline" +const path30 = "/profile/container_timeline" const url = $request.url; let body = $response.body; @@ -126,7 +127,7 @@ if ( let obj = JSON.parse(body); filter_messageflow_notice(obj) body = JSON.stringify(obj); -} else if (url.indexOf(path26) != -1 || url.indexOf(path28) != -1 || url.indexOf(path29) != -1) { +} else if ( url.indexOf(path30) != -1 || url.indexOf(path26) != -1 || url.indexOf(path28) != -1 || url.indexOf(path29) != -1) { let obj = JSON.parse(body); filter_items_feed(obj) body = JSON.stringify(obj); From ed4a2556e19a46121dba87e9684806a5984a2b81 Mon Sep 17 00:00:00 2001 From: yichahucha Date: Sat, 7 Jun 2025 02:05:39 +0800 Subject: [PATCH 1189/1191] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4131253a5..8fb27d2c8 100644 --- a/README.md +++ b/README.md @@ -71,3 +71,4 @@ hostname = api.m.jd.com [mitm] hostname = trade-acs.m.taobao.com ``` +[![Powered by DartNode](https://dartnode.com/branding/DN-Open-Source-sm.png)](https://dartnode.com "Powered by DartNode - Free VPS for Open Source") From 2779d0aafa2e185aca6b6bc0f94bd92614cd7592 Mon Sep 17 00:00:00 2001 From: yichahucha Date: Wed, 9 Jul 2025 06:16:38 +0800 Subject: [PATCH 1190/1191] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 8fb27d2c8..b8de39b73 100644 --- a/README.md +++ b/README.md @@ -70,5 +70,4 @@ hostname = api.m.jd.com ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [mitm] hostname = trade-acs.m.taobao.com -``` -[![Powered by DartNode](https://dartnode.com/branding/DN-Open-Source-sm.png)](https://dartnode.com "Powered by DartNode - Free VPS for Open Source") +``` \ No newline at end of file From 06d6e36771880959c008d3c59c192068f00ddd51 Mon Sep 17 00:00:00 2001 From: yichahucha Date: Sat, 30 May 2026 18:25:12 +0800 Subject: [PATCH 1191/1191] Fix. Fix. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b8de39b73..4131253a5 100644 --- a/README.md +++ b/README.md @@ -70,4 +70,4 @@ hostname = api.m.jd.com ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js [mitm] hostname = trade-acs.m.taobao.com -``` \ No newline at end of file +```