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
import requests | |
def bitflyer(): | |
URL = 'https://lightning.bitflyer.jp/v1/getticker' | |
ticker = requests.get(URL).json() | |
price = int(ticker['best_ask']),int(ticker['best_bid']) | |
return price | |
def coincheck(): | |
URL = 'https://coincheck.com/api/ticker' |
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
* { | |
line-height: 150%; | |
} | |
@font-face { | |
font-family: "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "メイリオ", Meiryo, sans-serif; | |
} | |
body{ | |
font-family:"MS P明朝", "MS PMincho", "ヒラギノ明朝 Pro W3", "Hiragino Mincho Pro", serif; |
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 mastodon import Mastodon | |
while True: | |
toot = input('> ',) | |
mastodon = Mastodon( | |
client_id="app_key.txt", | |
access_token="user_key.txt", | |
url = "https://mstdn.jp") | |
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 mastodon import Mastodon | |
url = "https://mstdn.jp" #URLの部分はインスタンスURLです。今回はmstdn.jpになっていますが、任意で変更して下さい。 | |
name = input('クライアント名\n> ') #クライアント名を入力して下さい。(自由記述) | |
#Mastodonのアプリ登録を行ないます。 | |
Mastodon.create_app(name, | |
api_base_url = url, | |
to_file = "app_key.txt" | |
) |
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
import tweepy | |
def api(): #関数apiを生成します。https://apps.twitter.com にて consumerkey等を取得して各自で代入して下さい | |
consumer_key = 'consumer_key' | |
consumer_secret = 'consumer_secret' | |
access_key = 'access_key' | |
access_secret = 'access_secret' | |
auth = tweepy.OAuthHandler(consumer_key, consumer_secret) | |
auth.set_access_token(access_key, access_secret) | |
api = tweepy.API(auth) |
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
import re | |
import tweepy | |
import datetime | |
import pybitflyer | |
todaydetail = datetime.datetime.today() #ツイート内に置く時計を定義しておきます。 | |
today = todaydetail.strftime("%m/%d %H:%M") | |
def Tweet(text): #https://apps.twitter.com にて consumerkey等を取得して各自で代入して下さい | |
consumer_key = 'consumer_key' |
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
import tweepy | |
def api(): | |
consumer_key = 'consumer_key' | |
consumer_secret = 'consumer_secret' | |
access_key = 'access_key' | |
access_secret = 'access_secret' | |
auth = tweepy.OAuthHandler(consumer_key, consumer_secret) | |
auth.set_access_token(access_key, access_secret) | |
api = tweepy.API(auth) |
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
import tweepy | |
def api(): | |
consumer_key = 'consumer_key' | |
consumer_secret = 'consumer_secret' | |
access_key = 'access_key' | |
access_secret = 'access_secret' | |
auth = tweepy.OAuthHandler(consumer_key, consumer_secret) | |
auth.set_access_token(access_key, access_secret) | |
api = tweepy.API(auth) |
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
import re | |
import urllib | |
import tweepy | |
import datetime | |
from bs4 import BeautifulSoup as b4 | |
todaydetail = datetime.datetime.today() | |
today = todaydetail.strftime("%m/%d %H:%M") | |
#https://apps.twitter.com にて consumerkey等を取得して各自で代入して下さい |
NewerOlder