Created
January 8, 2023 08:48
-
-
Save ugeugeHigh/1619909d935f12de1655461cbef827cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
try: | |
line_bot_api.push_message(user_id, TextSendMessage(text)) | |
except LineBotApiError as e: | |
print(e.message) | |
if __name__ == "__main__": | |
switch = search.switch_s() | |
text = switch.stock() | |
sendText(text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment