#!/usr/bin/env python3

# -*- coding: utf8 -*-

import tweepy

consumer_key = ""
consumer_secret = ""

access_token = ""
access_token_secret = ""

auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)

api = tweepy.API(auth)

userid = str(input("Please input id who you want fav attack\n"))
count = input("input number you want to fav!\n")

fav = api.user_timeline(id = userid, count = count)

try:
    for status in fav:
        api.create_favorite(status.id_str)
except tweepy.error.TweepError as e:
    if e.args[0][0]['code'] == 139:
        print("You have already favorited this status! \n")
    else:
        print(e.reason)
finally:
    print("Done!")

@@ -280,16 +280,35 @@
 (auth)%0A%0A
+def getdata():%0A    
 userid =
@@ -364,16 +364,20 @@
 ck%5Cn%22))%0A
+    
 count = 
@@ -417,17 +417,20 @@
 av!%5Cn%22)%0A
-%0A
+    
 fav = ap
@@ -474,16 +474,46 @@
 count)%0A%0A
+def main():%0A    getdata()%0A    
 try:%0A   
@@ -513,16 +513,20 @@
 ry:%0A    
+   
+ 
 for stat
@@ -536,16 +536,20 @@
 in fav:%0A
+    
         
@@ -583,16 +583,20 @@
 id_str)%0A
+    
 except t
@@ -624,16 +624,20 @@
 r as e:%0A
+    
     if e
@@ -664,16 +664,20 @@
 == 139:%0A
+    
         
@@ -724,24 +724,28 @@
 tatus! %5Cn%22)%0A
+    
     else:%0A  
@@ -742,16 +742,20 @@
   else:%0A
+    
         
@@ -770,16 +770,20 @@
 reason)%0A
+    
 finally:
@@ -783,16 +783,24 @@
 inally:%0A
+        
     prin
@@ -810,8 +810,47 @@
 Done!%22)%0A
+%0Aif __name__ == %22__main__%22:%0A    main()%0A

Make it more complex (((