Epic手机商店限免《纪念碑谷》1和2

https://store.epicgames.com/zh-CN/p/monument-valley-2-android-b21888 为例:
控制台命令

JSON.parse(
  document.querySelector('#_schemaOrgMarkup-Product').textContent
).sku

获取id是_schemaOrgMarkup-Product的元素中sku的值,可以拿到一串字符 e6abebfda00f45e2b3b9ba79970bc511:9667d66729ab41a0baf52570873c8472
然后拼接一下: https://store.epicgames.com/purchase?offers=1-e6abebfda00f45e2b3b9ba79970bc511-9667d66729ab41a0baf52570873c8472

可以直接写个控制台脚本:

(() => {
  const el = document.querySelector('#_schemaOrgMarkup-Product');
  if (!el) return '找不到元素';
  const { sku } = JSON.parse(el.textContent);
  const url = `https://store.epicgames.com/purchase?offers=1-${sku.replace(':', '-')}`;
  return url;
})();

购物车放入多个物品,也就是加多个参数就行了: https://store.epicgames.com/purchase?offers=1-游戏A?offers=1-游戏B?offers=1-游戏C

5 个赞