anonymous No title
No License Python
2020年10月25日
Copy
import clipboard
import keyboard
import datetime
import sched
import tweepy
import json
import time
import sys
import re

# ルーム番号 
roomid ="0000"
# 時間
passtime = "00"

username = clipboard.get()
password  = ""
consumerkey = "t457WQlyOxlvXBXoPMtkChd1m"
consumersecret = "S7kgeeUOV4jTYdd5rKxEvXP1Zr91LqvDsMJgCTV9LURkxGnt95"
accesstoken = "1313387303268540417-DoHZRnCZjo6V9HcD2ya4b1QvNiGBgG"
accesstokensecret = "4FnHodppBnnc9jBdQJybR2CgRI0yhDpWXcvAPWx5vL8Rc"

Auth = tweepy.OAuthHandler(consumerkey,consumersecret)
Auth.set_access_token(accesstoken,accesstokensecret)
Api = tweepy.API(Auth)

now   = datetime.datetime.now()
minute = now.minute

if("/" in str(username)):
	username = username.split("/")
	username = username[3].split("?")
	username = username[0]
else:
	print("リンクをコピーしてください")
	sys.exit()
for a in range(20):  
  for i in range(20) :
    for i, status in enumerate(tweepy.Cursor(Api.user_timeline,id=username,tweet_mode="extended").items(1)):
    	tweettime = re.findall(r"\d+",str(status.created_at))
    	if( '@' in status.full_text ):
    	  moto = status.full_text
    	  co = moto.index('@')
    	  kore = list(moto)
    	  del kore[co:]
    	  status.full_ta = ''.join(kore)
    	  tweet = re.findall(r"\d+",status.full_ta)
    	else:
  	    tweet = re.findall(r"\d+",status.full_text)

    tweet0 = ''.join(tweet)
    tweet1 = re.findall(r"\d",tweet0) 
  
    if(passtime in tweettime):
    	print("パスワード!")
    else:
    	print("更新中")
    	time.sleep(0.000000001)
    	break
  	
    if( roomid in tweet0 ):
      keyboard.insert_text(tweet[1])
      keyboard.insert_text("\n")
      print("password:"+tweet[1])
      sys.exit()
    else:
       keyboard.insert_text(tweet[0])
       keyboard.insert_text("\n")
       print("password:"+tweet[0])
       sys.exit()
import clipboard
import keyboard
import datetime
import sched
import tweepy
import json
import time
import sys
import re

# ルーム番号 
roomid ="0000"
# 時間
passtime = "00"

username = clipboard.get()
password  = ""
consumerkey = "t457WQlyOxlvXBXoPMtkChd1m"
consumersecret = "S7kgeeUOV4jTYdd5rKxEvXP1Zr91LqvDsMJgCTV9LURkxGnt95"
accesstoken = "1313387303268540417-DoHZRnCZjo6V9HcD2ya4b1QvNiGBgG"
accesstokensecret = "4FnHodppBnnc9jBdQJybR2CgRI0yhDpWXcvAPWx5vL8Rc"

Auth = tweepy.OAuthHandler(consumerkey,consumersecret)
Auth.set_access_token(accesstoken,accesstokensecret)
Api = tweepy.API(Auth)

now   = datetime.datetime.now()
minute = now.minute

if("/" in str(username)):
	username = username.split("/")
	username = username[3].split("?")
	username = username[0]
else:
	print("リンクをコピーしてください")
	sys.exit()
for a in range(20):  
  for i in range(20) :
    for i, status in enumerate(tweepy.Cursor(Api.user_timeline,id=username,tweet_mode="extended").items(1)):
    	tweettime = re.findall(r"\d+",str(status.created_at))
    	if( '@' in status.full_text ):
    	  moto = status.full_text
    	  co = moto.index('@')
    	  kore = list(moto)
    	  del kore[co:]
    	  status.full_ta = ''.join(kore)
    	  tweet = re.findall(r"\d+",status.full_ta)
    	else:
  	    tweet = re.findall(r"\d+",status.full_text)

    tweet0 = ''.join(tweet)
    tweet1 = re.findall(r"\d",tweet0) 
  
    if(passtime in tweettime):
    	print("パスワード!")
    else:
    	print("更新中")
    	time.sleep(0.000000001)
    	break
  	
    if( roomid in tweet0 ):
      keyboard.insert_text(tweet[1])
      keyboard.insert_text("\n")
      print("password:"+tweet[1])
      sys.exit()
    else:
       keyboard.insert_text(tweet[0])
       keyboard.insert_text("\n")
       print("password:"+tweet[0])
       sys.exit()

Output

Run
年末年始は機械学習・深層学習を勉強しませんか?
No one still commented. Please first comment.
年末年始は機械学習・深層学習を勉強しませんか?
広告
未経験から最短でエンジニアへの転職を目指すなら