{"id":37599675,"url":"https://github.com/sinramyeon/old_ver_bot","last_synced_at":"2026-01-16T10:01:06.939Z","repository":{"id":45443062,"uuid":"99403127","full_name":"sinramyeon/old_ver_bot","owner":"sinramyeon","description":"파이썬 슬랙 크롤링 봇입니다. It's slack bot made by python+flask+bs4. version of go below","archived":false,"fork":false,"pushed_at":"2022-07-06T19:45:29.000Z","size":3359,"stargazers_count":17,"open_issues_count":3,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-03-15T05:55:29.641Z","etag":null,"topics":["bot","bs4","crawling","flask","python","rtm","slack","slackbot"],"latest_commit_sha":null,"homepage":"","language":"Python","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/sinramyeon.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}},"created_at":"2017-08-05T06:08:34.000Z","updated_at":"2024-03-15T05:55:29.642Z","dependencies_parsed_at":"2022-09-23T00:31:17.852Z","dependency_job_id":null,"html_url":"https://github.com/sinramyeon/old_ver_bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sinramyeon/old_ver_bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinramyeon%2Fold_ver_bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinramyeon%2Fold_ver_bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinramyeon%2Fold_ver_bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinramyeon%2Fold_ver_bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinramyeon","download_url":"https://codeload.github.com/sinramyeon/old_ver_bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinramyeon%2Fold_ver_bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bot","bs4","crawling","flask","python","rtm","slack","slackbot"],"created_at":"2026-01-16T10:00:43.962Z","updated_at":"2026-01-16T10:01:06.681Z","avatar_url":"https://github.com/sinramyeon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HQ_bot\n\n## urllib, requests 버전업이 필요합니다!!!!\n\npython 으로 만든 slack bot입니다. 사용 라이브러리는 아래와 같습니다.\n\n1. Flask\n2. Slacker\n3. SlackClient\n4. bs4\n5. FeedParser\n\n---\n\n위 봇은 아래와 같이 작동합니다.\n![](https://raw.githubusercontent.com/sinramyeon/old_ver_bot/master/1.gif)\n![](https://raw.githubusercontent.com/sinramyeon/old_ver_bot/master/2.gif)\n\n---\n\n## 사용법\n\n### @봇 이름\n\n봇에게 멘션할 시 버튼 선택 기능을 답변해 줍니다.\n특정 키워드 (안녕, 메롱, 꺼져) 를 멘션할 시 답변도 해줍니다.\n봇의 답변에 선택함에 따라 특정 키워드 입력 시와 동일한 함수를 실행합니다.\n\n### 특정 키워드\n\n`오키`, `클리앙` , `지디넷`, `디데일리`, `블로그`, `시사` 키워드 입력 시 해당 사이트를 크롤링하여 보여줍니다.\n\n---\n\n## 설정법\n\n1. 슬랙 앱부터 만듭니다.(https://api.slack.com/apps/)\n![](https://www.fullstackpython.com/img/160604-simple-python-slack-bot/sign-in-slack.png)\n저기서 만드시면 됩니다.\n\n만드신 후 여기(https://api.slack.com/bot-users)로 이동하셔서, 봇을 만드세요.\n![](https://www.fullstackpython.com/img/160604-simple-python-slack-bot/custom-bot-users.png)\n왜 앱에서 봇을 만드냐면, 앱만이 interaction(사용자의 버튼 클릭 등)을 할 수 있거든요!\n\n2. 슬랙 토큰들을 등록합니다.\n![](https://github.com/sinramyeon/old_ver_bot/blob/master/slack1.PNG?raw=true)\n\nSLACK_VERIFICATION_TOKEN 에 등록하세요.\n\n3. oAuth도 만들어서 등록합니다.\n![](https://raw.githubusercontent.com/sinramyeon/old_ver_bot/master/slack2.png)\n\n아래 있는 토큰을 SLACK_BOT_TOKEN 에 등록하세요.\n\n\n위 곳에서 등록할 수 있습니다.(사실 어디인지 찾기가 아주 불편합니다)\n\n5. 이 내용들을 env.py안에 등록하여 사용합니다.\n\u003e 자신의 개인정보는 소중하니 이 정보들을 깃허브 등에 올리지 않게 주의 하도록 하세요.\n\n6. 서버를 만듭니다.\n  가. 로컬 서버인 경우\n    a. ngrok를 까세요.\n    b. 그리고 ngrok가 있는 곳에 가서 cmd창에 `./ngrok http 5000`을 쳐보세요.(5000은 포트 번호예요.)\n    c. ![](https://realpython.com/images/blog_images/slack-api/ngrok.png)\n    d. 이렇게 online 이 뜨면 되어요.\n    여기서 뜬 주소에서 Forwarding 에 있는 주소가 외부에서 자신의 컴퓨터로 접속하는 주소입니다.\n\n  나. 이미 있는 경우\n    a. `자신의 주소/slack/message_actions` 와 `/slack/message_options` 로 설정하세요.\n\n\n7. ![](/src/HQ_bot/slack3.png) 여기가 보이시나요?\n여기서 이 주소를 설정 하세요.\n위는 버튼 클릭 등에 대한 리퀘스트를 받아 올 주소이고, 아래는 옵션 선택에 대한 값을 받아 올 주소입니다.\n저희 봇에서는 차례로 `/slack/message_actions`과 `/slack/message_options` 로 설정했어요.\n\n8. outgoing webhook(https://api.slack.com/outgoing-webhooks) 설정 페이지로 가서, ![](https://realpython.com/images/blog_images/slack-api/slack-outgoing-webhooks.png) 를 설정하세요.\n\n9. ![](https://realpython.com/images/blog_images/slack-api/slack-outgoing-webhooks-settings.png) 포스팅할 채널 이름을 입력하고, URL에 저런식으로 `자기 주소/slack`으로 설정하세요.\n\n여기 토큰을 SLACK_WEBHOOK_SECRET 에 등록하세요.\n\n10. 자기가 쓸 채널에 만든 봇을 추가하세요. `/invite @봇이름`\n\n11. `pip install requirements.txt`로 필요 라이브러리도 설치 한 후,\n\n12. 봇을 `python slack.py` 로 실행 해 보세요\n\n---\n\n### 소스 설명\n\n```\n# 주석을 보시면 되시지만 몇몇 내용에 대해 설명해 드립니다.\n\n# clien, ddaily, okky_tech, rssParse, ycombinator, zdnet은 각 사이트에서 크롤링을 해오는 내용입니다.\n# 자기 취향에 따라 여러 곳에서 문서를 얻어와 보세요.\n\n# rssParse는 rss 구독이 가능한 기술 블로그들 중 랜덤으로 5곳에서 HTML을 파징해와 가장 최신 글과 URL을 리턴합니다.\n\n# slack.py가 메시지를 받아오고 보내는 주 소스입니다.\n\n## MsgSlack()함수는 크롤링해 받아온 딕셔너리를 넣어서, 슬랙에 보낼 내용을 리턴합니다.\n### title, title link, color 등은 슬랙 attachment의 양식입니다.(*json 형식)\n\n## inbound는 슬랙과 통신하는 함수입니다.\n### 채널별, 메시지별로 반응을 다르게 하고 있습니다.\n\n## message_options 과 message_actions 은 슬랙에서 사용자가 봇에게 반응한 내용을 받아온 후 작동하는 함수입니다.\n### 선택을 버튼으로 했는지, 아니면 셀렉트 박스로 했는지에 따라 다르게 반응 하도록 구현 해 두었습니다.\n\n# envsetting.py 는 자기 개인 토큰 정보를 저장하라고 만들어 두었어요.\n# env.py로 바꿔 쓰시거나 slack.py에서 import envsetting을 하세요.\n\n```\n\n---\n\n##### 질문이나 안되는 기능은 이슈에 적어 주세요.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinramyeon%2Fold_ver_bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinramyeon%2Fold_ver_bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinramyeon%2Fold_ver_bot/lists"}