MCPcopy Create free account
hub / github.com/anyehttp/quantumult-x / parseAppInAppPurchases

Function parseAppInAppPurchases

task/AppStore.js:59–64  ·  view source on GitHub ↗
(html)

Source from the content-addressed store, hash-verified

57
58// 解析 app 内购项目
59function parseAppInAppPurchases(html) {
60 const appTitles = [...html.matchAll(/<span class="truncate-single-line truncate-single-line--block">([\s\S]*?)<\/span>/g)].map(m => m[1].trim());
61 const appPrices = [...html.matchAll(/<span class="list-with-numbers__item__price small-hide medium-show-tablecell">([\s\S]*?)<\/span>/g)].map(m => m[1].trim());
62 console.log(`解析内购项目: ${appTitles.length} 项`);
63 return { appTitles, appPrices };
64}
65
66// 读取本地数据
67function readLocalData() {

Callers 1

fetchAppDataFunction · 0.85

Calls 1

logMethod · 0.45

Tested by

no test coverage detected