{"id":21391928,"url":"https://github.com/mozhiingithub/lol-live-reminder","last_synced_at":"2025-03-16T13:26:10.007Z","repository":{"id":220256999,"uuid":"253454769","full_name":"mozhiingithub/lol-live-reminder","owner":"mozhiingithub","description":"一个简易的LOL赛事直播提醒程序","archived":false,"fork":false,"pushed_at":"2020-04-06T10:18:04.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T01:13:48.986Z","etag":null,"topics":["go","golang","live","lol","regexp"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mozhiingithub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-04-06T09:43:00.000Z","updated_at":"2020-04-06T10:18:07.000Z","dependencies_parsed_at":"2024-02-01T04:51:48.709Z","dependency_job_id":"a9805ed0-6e3d-491b-9da7-905e7647b77c","html_url":"https://github.com/mozhiingithub/lol-live-reminder","commit_stats":null,"previous_names":["mozhiingithub/lol-live-reminder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozhiingithub%2Flol-live-reminder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozhiingithub%2Flol-live-reminder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozhiingithub%2Flol-live-reminder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozhiingithub%2Flol-live-reminder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mozhiingithub","download_url":"https://codeload.github.com/mozhiingithub/lol-live-reminder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243873954,"owners_count":20361732,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","live","lol","regexp"],"created_at":"2024-11-22T13:38:23.933Z","updated_at":"2025-03-16T13:26:09.943Z","avatar_url":"https://github.com/mozhiingithub.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lol-live-reminder\nlol-live-reminder是一个简易的LOL赛事直播提醒程序，适用于采用“顺延开赛”安排的联赛（如2020年LPL春季赛线上赛）。\n## 缘由\n2020年LPL春季赛采用“顺延开赛”的赛程安排，导致每天的非首场赛事，其开赛时间会因前面比赛时长而存在变数。\n\n最典型的例子：4月3日，原定于5点进行的IG vs V5,因前一场EDG vs DMO过早结束，进而导致第二场比赛于3点47分开打。5点左右，第二场比赛结束。解说米勒在[微博](https://weibo.com/3202111700/IBCVd9dk2?from=page_1005053202111700_profile\u0026wvr=6\u0026mod=weibotime\u0026type=comment)上调侃：“五点比赛，定了个闹钟，咋就直接采访shy哥了”。\n\n为了避免这种错过直播的尴尬，我写了一个简易的提醒程序。当然，包括LPL赛事官网在内的一众机构、媒体或直播平台，都有自己的直播提醒功能，我只不过是基于自己的理解，实现一个而已。\n## 原理\n“顺延开赛”模式下，提醒指定比赛开赛，等价于判断上一场比赛是否已经结束。一般的电竞媒体都会在其官网，提供赛程进展和赛后数据，自然包括了某场比赛的状态。这里我选用了[玩加电竞](https://m.wanplus.com/lol/schedule)。某场比赛结束后，其对应的赛后数据界面，会显示“已结束”字样。因此，提醒某一场比赛开赛，等价于查看其上一场比赛的赛后数据界面是否出现了“已结束”字样。\n\nlol-live-reminder本质上是一个用golang实现的定时爬虫。默认情况下，程序会以15分钟一次的频率，爬取指定比赛的上一场的赛后数据网页源码，并判断源码中是否出现了“已结束”字样。判断上一场比赛结束后，程序会执行系统命令，弹出一个载有提醒字样的文本，以提醒用户收看赛事直播。\n## 使用\n前往[玩加电竞](https://m.wanplus.com/lol/schedule)的赛程页，点击想提醒的比赛数据界面，复制网页链接。转至本程序所在目录，执行命令：\n```\ngo run reminder.go -l https://m.wanplus.com/schedule/XXXXX.html\n```\n程序接受两个参数：```l```为指定比赛网址，必填;```i```为时间间隔，单位为分，选填，未指定的情况下，爬虫的时间间隔为15分钟。\n\n程序支持linux和windows两个平台，运行时会自动判断所在系统，选择相应的方式打开提醒文本。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozhiingithub%2Flol-live-reminder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmozhiingithub%2Flol-live-reminder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozhiingithub%2Flol-live-reminder/lists"}