Slackbot에서 wikipedia의 무작위 기사 표시
라는 것으로 여기 로 만든 Bot에 짜넣어 사용해 보았습니다.
wikipedia.py
# coding: utf-8
from slackbot.bot import respond_to
import wikipedia
@respond_to('wikipedia')
def get_random_wikipedia_page(message):
# set_langにjaを指定することで日本語の記事のみ取得します
wikipedia.set_lang("ja")
message.reply("https://ja.wikipedia.org/wiki/" + wikipedia.random())
이하, 취득한 페이지의 일례. 절대 스스로 조사하지 않는 페이지가 나오고, 조금 즐겁다.





Reference
이 문제에 관하여(Slackbot에서 wikipedia의 무작위 기사 표시), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/h_matsuno1028/items/3c00e2e5b72df406bbfb텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)