Skip to content

Instantly share code, notes, and snippets.

Created January 8, 2023 08:48
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
from linebot import LineBotApi
from linebot.models import TextSendMessage
from linebot.exceptions import LineBotApiError
import search
bot_api = '******'
user_id = '******'
def sendText(text):
line_bot_api = LineBotApi(bot_api)
line_bot_api.push_message(user_id, TextSendMessage(text))
except LineBotApiError as e:
if __name__ == "__main__":
switch = search.switch_s()
text = switch.stock()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment