TankNee / LOL_Game_Subscription

lpl,ldl professional match calendar subscription!
https://tanknee.github.io/LOL_Game_Subscription/#/
71 stars 7 forks source link

lck #3

Open famiji opened 2 years ago

famiji commented 2 years ago

希望增加订阅lck赛程的功能

TankNee commented 2 years ago

暂时没有lck赛程的接口,后面我有时间找找看。

ChengLuffy commented 2 years ago

暂时没有lck赛程的接口,后面我有时间找找看。

一个不成熟的建议,抓取 lolesports 数据

https://lolesports.com/schedule?leagues=lck

curl 格式的 json 接口如下:

curl 'https://esports-api.lolesports.com/persisted/gw/getSchedule?hl=en-US&leagueId=98767991310872058' \
  -H 'authority: esports-api.lolesports.com' \
  -H 'accept: */*' \
  -H 'accept-language: zh-CN,zh;q=0.9,en;q=0.8' \
  -H 'cache-control: no-cache' \
  -H 'origin: https://lolesports.com' \
  -H 'pragma: no-cache' \
  -H 'referer: https://lolesports.com/' \
  -H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-site' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36' \
  -H 'x-api-key: 0TvQnueqKa5mxJntVWt0w4LpLfEkrV1Ta8rQBb9Z' \
  --compressed

难点:x-api-key 如果有失效时间的话如何更新

可行的方案:使用 chromedriver 辅助抓取

由于工作量明显大,而我对 lck 不感兴趣,所以 TankNee 有兴趣的话可以参考下

TankNee commented 2 years ago

似乎并不需要登录,可以用puppet搞一搞。

TankNee commented 2 years ago

https://gol.gg/esports/home/ 找到了一个不用登录的接口,有时间尝试一下。

famiji commented 2 years ago

感谢您的留心

markpimi commented 1 year ago

依然期待lck赛程