Skip to content

Instantly share code, notes, and snippets.

@deguchi deguchi/
Last active Jul 6, 2017

What would you like to do?
# -*- coding: utf-8 -*-
import re
import json
import requests
url = ''
content = requests.get(url).text
if'\bSOLD\s+OUT\b', content):
print('Nintendo Switch SOLD OUT.')
else:'SET-YOUR_SLACK-WEBHOOK-URL', data = json.dumps({
'channel': u'発売',
'text': u"Hi, @deguchi. My Nintendo Store customization html has been changed.<%s>" % url, # 投稿するテキスト
'username': u'発売チェッカー', # 投稿のユーザー名
'icon_emoji': u':ghost:', # 投稿のプロフィール画像に入れる絵文字
'link_names': 1, # メンションを有効にする
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.