Last active
August 25, 2017 07:34
-
-
Save fushime2/388ee3c89319d193634fbc3d914eabea to your computer and use it in GitHub Desktop.
TweetIDを指定してReTweetする
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
# | |
# ツイートは 2014/04/01 まで取得済み | |
# | |
import tweepy | |
import random | |
import time | |
def get_api(): | |
# OAuthのアレ | |
consumer_key = "" | |
consumer_secret = "" | |
access_token = "" | |
access_secret = "" | |
auth = tweepy.OAuthHandler(consumer_key, consumer_secret) | |
auth.set_access_token(access_token, access_secret) | |
return tweepy.API(auth) | |
def unretweet(api, ID): | |
status = api.get_status(ID, include_my_retweet=1) | |
if status.retweeted == True: | |
api.destroy_status(status.current_user_retweet['id']) | |
def get_id(): | |
ids = [] | |
with open("ids.txt", "r") as f: | |
ids = list(f) | |
return random.choice(ids).rstrip() | |
def main(): | |
ids = [get_id() for i in range(3)] | |
api = get_api() | |
for id in ids: | |
unretweet(api, id) | |
api.retweet(id) | |
time.sleep(3) | |
if __name__ == '__main__': | |
main() |
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
418036664490262528 | |
418033822605647872 | |
418010461850705922 | |
417584652912558080 | |
417250582567452672 | |
416844069289996288 | |
416825105096798209 | |
416529833724608512 | |
416192371932413952 | |
415862183365332993 | |
415766963973939200 | |
415449827678236672 | |
415009732168925184 | |
414694818535583744 | |
414318339012296704 | |
413947256342315008 | |
413670493917839360 | |
413198099105214464 | |
412925978327805952 | |
412559188699529216 | |
410758849205768192 | |
410340264318738432 | |
410009757353660417 | |
409597491185598464 | |
409254269057921026 | |
408530876905975808 | |
408230938221346817 | |
407831605571379200 | |
407524908227256321 | |
407465600093396993 | |
406972631766687745 | |
406699797324652544 | |
406341384149299201 | |
405643082042847232 | |
405304833256599552 | |
404485981652262912 | |
404236262787149824 | |
403901073582075906 | |
403839099557003265 | |
403833729371500544 | |
403833361535205376 | |
403735760748048384 | |
403411395498106881 | |
403110117446397952 | |
402768547438284800 | |
401984831782793216 | |
401626609993519104 | |
401301421644984320 | |
400561127748145152 | |
400224645606957056 | |
399552531807744002 | |
399359351996960769 | |
399008932112248832 | |
398734372284547072 | |
398399077106204672 | |
398061624528879617 | |
397682748418056193 | |
397175051553763328 | |
397174957479690240 | |
396598567319531521 | |
396534189459111936 | |
396200338115395584 | |
395885986472681472 | |
395488761619836929 | |
395117181454667776 | |
394780095589519360 | |
394000383049093120 | |
394406444558086144 | |
393699685912682496 | |
393350875181101057 | |
392594008515440640 | |
391455161786187776 | |
391807278040363008 | |
390807766652448768 | |
390432537656303617 | |
390055020856504320 | |
389411637423132672 | |
388864426356404225 | |
388594218383335424 | |
387881205833940992 | |
387511384402968576 | |
386320524151771136 | |
386072588633378816 | |
385005623475056640 | |
384174394928410624 | |
383769909454323712 | |
381583828998836224 | |
381266799095857153 | |
381015229414383616 | |
380326591051493377 | |
379946499171287040 | |
379417745810399233 | |
378483734191681537 | |
378032313063321600 | |
377718633914707968 | |
377393216854568960 | |
377050124410556416 | |
376589032337059840 | |
375952743027847169 | |
376554256204984320 | |
375233856044924930 | |
373990214454108160 | |
373365865678245888 | |
371969571554476032 | |
371451231413075970 | |
370867384099155968 | |
370137480957136896 | |
369500661852827648 | |
369489090921496577 | |
368021503612182528 | |
367582825353994240 | |
366888761126170625 | |
366179944931401729 | |
365433684649709569 | |
363480339533942784 | |
362815430022291456 | |
362164920944574465 | |
361816882224963585 | |
361318397146984448 | |
359647197039558656 | |
358177666668576769 | |
357461138285404161 | |
355541403612348417 | |
354036133405020160 | |
353697931506884609 | |
353107900975173632 | |
350263301692878848 | |
349464741447622656 | |
348039884390404097 | |
347321605011152896 | |
346591815153098752 | |
345713392817954816 | |
344060791546343425 | |
341076333541081089 | |
340457858523082752 | |
337166870052483073 | |
336804861091909632 | |
336026765875113984 | |
334609102728740864 | |
330698508996861952 | |
325812327519752192 | |
324114520287092737 | |
322965808898789376 | |
321211234861056000 | |
319801235211427840 | |
317781140385714178 | |
317475239212748800 | |
315396252542070785 | |
314627466297737216 | |
313881653145632768 | |
418631450691252224 | |
418987395367710720 | |
419360104547237888 | |
420505187728359424 | |
420905228062314497 | |
421252298904334336 | |
421942374466473984 | |
422300253581086720 | |
422631993692540929 | |
423411531087241216 | |
423821100485591040 | |
424138564788441088 | |
424799648880934912 | |
425218212507025408 | |
425595877827178496 | |
426307033629880320 | |
426674478836224000 | |
427016194307022848 | |
427743417880166400 | |
428098970066231296 | |
428486237528154113 | |
428844909286535168 | |
428905895238438912 | |
429220796171423744 | |
429551412440084480 | |
429946524517146625 | |
430315294335070208 | |
430659005212393472 | |
431028825095282688 | |
431368073946230784 | |
432055432371134464 | |
432423306700926978 | |
432819314651959296 | |
433555115320958976 | |
433925493218217984 | |
434244499695349760 | |
434968660474482688 | |
435372493562318848 | |
436451663939768321 | |
437156367506214912 | |
437515189273894913 | |
437923630844878849 | |
438650163712626688 | |
439356156213866496 | |
439705874764804098 | |
440055966600417280 | |
440785438991589376 | |
441186617223442432 | |
441888013337899008 | |
442241588094189569 | |
444078724023980032 | |
444305041948545024 | |
444488194453565440 | |
445089490588028929 | |
445517816196640768 | |
446240998750830592 | |
446632981810012160 | |
447349658281447425 | |
447646613163356160 | |
448409180697669632 | |
448786651767001088 | |
449493010598735872 | |
449841169254469632 | |
450591425655099392 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment