{"id":17286635,"url":"https://github.com/louis70109/pleaguebot","last_synced_at":"2025-04-14T10:43:08.007Z","repository":{"id":49284315,"uuid":"330196282","full_name":"louis70109/PLeagueBot","owner":"louis70109","description":"P+ League Chatbot(unofficial)(deprecated)","archived":false,"fork":false,"pushed_at":"2021-11-08T09:47:58.000Z","size":364,"stargazers_count":10,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T11:24:27.061Z","etag":null,"topics":["basketball","chatbot","crawler","line"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/louis70109.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-16T15:43:30.000Z","updated_at":"2023-01-06T04:53:39.000Z","dependencies_parsed_at":"2022-09-19T10:22:09.292Z","dependency_job_id":null,"html_url":"https://github.com/louis70109/PLeagueBot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louis70109%2FPLeagueBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louis70109%2FPLeagueBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louis70109%2FPLeagueBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louis70109%2FPLeagueBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/louis70109","download_url":"https://codeload.github.com/louis70109/PLeagueBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248867568,"owners_count":21174748,"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":["basketball","chatbot","crawler","line"],"created_at":"2024-10-15T09:59:48.626Z","updated_at":"2025-04-14T10:43:07.983Z","avatar_url":"https://github.com/louis70109.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# P+ League LINE Chatbot\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Python Version](https://img.shields.io/badge/Python-%3E%3D%203.5-blue.svg)](https://badge.fury.io/py/lotify)\n\n\u003ca href=\"https://line.me/R/ti/p/%40611lsquw\"\u003e\u003cimg height=\"50\" border=\"0\" alt=\"加入好友\" src=\"https://scdn.line-apps.com/n/line_add_friends/btn/zh-Hant.png\"\u003e\u003c/a\u003e\n\n# Prerequisite\n\n- flask/Python 3.8\n- LINE v10.14\n- PostgreSQL\n\n\u003e You need Github, LINE, Heroku accounts to deploy this bot.\n\n# Developer Side\n\n## Environment property\n\nFill in the following environment variables:\n\n```\nLINE_CHANNEL_ACCESS_TOKEN=\nLINE_CHANNEL_SECRET=\nDATABASE_URL=postgres://USER:PASSWORD@127.0.0.1:5432/postgres\n```\n\n\u003e You need to modify DATABASE_URL as your postgresql settings.\n\n## LINE account (LINE_CHANNEL_ACCESS_TOKEN, LINE_CHANNEL_SECRET)\n\n- Got A LINE Bot API developer account Make sure you already registered, if you need use LINE Bot.\n\n* Go to LINE Developer Console\n    - Close auto-reply setting on \"Messaging API\" Tab.\n    - Setup your basic account information. Here is some info you will need to know.\n        - Callback URL: `https://{YOUR_URL}/webhooks/line`\n        - Verify your webhook.\n* You will get following info, need fill back to `.env` file.\n    - Channel Secret\n    - Channel Access Token (You need to issue one here)\n\n## Local testing\n\n1. Run `Scripts/` profiles first, sync official website data to database as crawler.\n\n2. first terminal window\n\n```\ncp .env.example .env # Modify variables value\n\n# By docker (choose one)\ndocker-compose up # and go to DOCKER_IP:4040\n\n# By localized (choose one)\npip install -r requirements.txt --user\npython api.py\n```\n\n3. Create a provisional Https:\n\n```\nngrok http 5000\n```\n\nor maybe you have npm environment:\n\n```\nnpx ngrok http 5000\n```\n\n![](https://i.imgur.com/azVdG8j.png)\n\n4. Copy URL to LINE Developer Console\n\n## Heroku\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n\n- Enable `clock` button to schedule corn.\n\n![](https://i.imgur.com/iA0dvI9.png)\n\n- Add `Heroku Postgres` and it would create `DATABASE_URL` environment variable automatically.\n\n![](https://i.imgur.com/wCFeUlu.png)\n\nIf you are not sure where are files in, use following up commands:\n\n```\nheroku run bash\nheroku logs --tail\n```\n\n# License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouis70109%2Fpleaguebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flouis70109%2Fpleaguebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouis70109%2Fpleaguebot/lists"}