logo科技微讯

免费游戏监测

作者:科技微讯
日期:2021-08-04
📝 笔记

epic 每周限免

Epic Games Store 每周公布一两款限免游戏,同时会列出即将免费但还没免费的游戏。每一款游戏都清晰地标注了免费期限。有 api 可以直接拿到 josn 数据。

这个链接获取 mapping:

const api = "https://store-content.ak.epicgames.com/api/content/productmapping";

这个链接获取某一款游戏的详情,貌似只能获取已经发布一段时间的游戏,对于最近发布的新游戏,无法获取信息:

const api = `https://store-content.ak.epicgames.com/api/content/products/${slug}`;

或者:

const api = `https://store-content-ipv4.ak.epicgames.com/api/zh-CN/content/products/fortnite`;

epic 官方博客:

const api =
  "https://store-content.ak.epicgames.com/api/ru/content/blog/sticky?locale=en";
const api2 =
  "https://store-content.ak.epicgames.com/api/en/content/blog?limit=25";

找到 epic 的 graphql api:

const api = "https://github.com/Tectors/EpicGraphQL/tree/main/docs/graphql";

一些让我找到 epic API 的 GitHub Repo:repo1repo2repo3repo4repo5

repo4 很好,但作者不维护了,repo5 类似 repo4,但不太好用。

//使用 graphql api 的例子,通过 namespace 搜索一款游戏
const query = `
 {
    Catalog {
      searchStore(
        namespace:"25d726130e6c4fe68f88e71933bda955",
      ) {
        elements {
          title
          id
          namespace
          description
          effectiveDate
          keyImages {
            type
            url
          }
          currentPrice
          seller {
            id
            name
          }
          productSlug
          urlSlug
          url
          tags {
            id
          }
          items {
            id
            namespace
          }
          customAttributes {
            key
            value
          }
          categories {
            path
          }
          catalogNs {
            mappings(pageType: "productHome") {
              pageSlug
              pageType
            }
          }
          offerMappings {
            pageSlug
            pageType
          }
          price(country: "cn") {
            totalPrice {
              discountPrice
              originalPrice
              voucherDiscount
              discount
              currencyCode
              currencyInfo {
                decimals
              }
              fmtPrice(locale: "zh-CN") {
                originalPrice
                discountPrice
                intermediatePrice
              }
            }
            lineOffers {
              appliedRules {
                id
                endDate
                discountSetting {
                  discountType
                }
              }
            }
          }
        }
        paging {
          count
          total
        }
      }
    }
  }
  `;
const re = await got("https://graphql.epicgames.com/graphql", {
  method: "post",
  responseType: "json",
  headers: {
    "Content-Type": "application/json",
    referer: "https://store.epicgames.com/",
  },
  body: JSON.stringify({ query: query }),
})
  .then((res) => {
    return res.body;
  })
  .catch((err) => {
    console.log(err.response.body);
  });
const id = "f2496286331e405793d69807755b7b23";
const aa = re.data.Catalog.searchStore.elements;
for (let ii of aa) {
  if (ii.id === id) {
    console.log(ii);
  }
}

steam 免费新游戏

steam 和 GOG 都是游戏商城,有不少游戏会在两个平台上架,它们的区别可以看这个帖子

GOG 貌似最主要的特点是 DRM-free,官网表示“购买即拥有”。steam 有一些小组会收集来自 steam、gog、epic 的免费游戏,并提供 rss 等多种途径订阅这些列表。

steam 免费游戏可以通过搜索页面找到,搜索页面提供了一些筛选条件,最后可以得到一条更简洁的链接,这个链接就是按照时间排序的免费游戏列表了,通过这个列表可以获得游戏 id,然后用 steam 的 api 可以获得这个游戏的详细信息,以下是一些比较重要的属性:

  • release_date.coming_soon: 有时候发行日期显示今天,但是这个值显示 true,表示还未真正上架,如果是 false 则表示已经上架可以下载使用了;
  • is_free 如果是 true 表示免费,false 表示收费;
  • about_the_game:关于这款游戏的介绍;
  • supported_languages:支持的语言
  • header_image:封面图
  • pc_requirements:最低电脑配置

找到一个更好的链接,这个链接可以设定返回多少个游戏,也是从搜索页面找到的,搜素之后,往下滚动,刷新出新的游戏,数据就是由这个链接提供的:

const api =
  "https://store.steampowered.com/search/results/?query&start=0&count=10&dynamic_data=&sort_by=Released_DESC&force_infinite=1&maxprice=free&category1=998&snr=1_7_7_230_7&infinite=1";

steam 限时免费游戏

B 站有人分享了如何查找 steam 限时免费游戏,其实就是在 steamDB 中点底部的 Free promotions,之后会看到一些免费游戏,免费游戏又可以分为两类,一种是 Keep,一种是 Weekend,其中 keep 表示可以永久入库,而 Weekend 表示只是周末免费

Steam 一个额外的营销功能是“免费周末”,顾客在指定的时间段中可以暂时访问您的游戏。 用户可以免费试玩游戏,但除非他们购买游戏,否则在活动结束后就会失去访问权限。 免费周末通常和折扣搭配使用。

donation赞赏
thumbsup0
thumbsdown0
暂无评论