if g['stuff'].isdigit():
num = int(g['stuff'])
kwargs = {'count': num}
- if not c.get('DISABLE_EXTENDED_TWEETS'):
- kwargs['tweet_mode'] = 'extended'
+ kwargs = add_tweetmode_parameter(kwargs)
for tweet in reversed(t.statuses.home_timeline(**kwargs)):
draw(t=tweet)
printNicely('')
if g['stuff'].isdigit():
num = int(g['stuff'])
kwargs = {'count': num}
- if not c.get('DISABLE_EXTENDED_TWEETS'):
- kwargs['tweet_mode'] = 'extended'
+ kwargs = add_tweetmode_parameter(kwargs)
for tweet in reversed(t.statuses.mentions_timeline(**kwargs)):
draw(t=tweet)
printNicely('')
except:
num = c['HOME_TWEET_NUM']
kwargs = {'count': num, 'screen_name': user[1:]}
- if not c.get('DISABLE_EXTENDED_TWEETS'):
- kwargs['tweet_mode'] = 'extended'
+ kwargs = add_tweetmode_parameter(kwargs)
for tweet in reversed(t.statuses.user_timeline(**kwargs)):
draw(t=tweet)
printNicely('')
except:
num = c['HOME_TWEET_NUM']
kwargs = {'count': num, 'screen_name': g['original_name']}
- if not c.get('DISABLE_EXTENDED_TWEETS'):
- kwargs['tweet_mode'] = 'extended'
+ kwargs = add_tweetmode_parameter(kwargs)
for tweet in reversed(
t.statuses.user_timeline(**kwargs)):
draw(t=tweet)
'type': type,
'count': count,
}
- if not c.get('DISABLE_EXTENDED_TWEETS'):
- kwargs['tweet_mode'] = 'extended'
+ kwargs = add_tweetmode_parameter(kwargs)
# Perform search
rel = t.search.tweets(**kwargs)['statuses']
# Return results
return
tid = c['tweet_dict'][id]
kwargs = {'id': tid}
- if not c.get('DISABLE_EXTENDED_TWEETS'):
- kwargs['tweet_mode'] = 'extended'
+ kwargs = add_tweetmode_parameter(kwargs)
tweet = t.statuses.show(**kwargs)
# Get formater
formater = format_quote(tweet)
num = c['RETWEETS_SHOW_NUM']
# Get result and display
kwargs = {'id': tid, 'count': num}
- if not c.get('DISABLE_EXTENDED_TWEETS'):
- kwargs['tweet_mode'] = 'extended'
+ kwargs = add_tweetmode_parameter(kwargs)
rt_ary = t.statuses.retweets(**kwargs)
if not rt_ary:
printNicely(magenta('This tweet has no retweet.'))
return
tid = c['tweet_dict'][id]
kwargs = {'id': tid}
- if not c.get('DISABLE_EXTENDED_TWEETS'):
- kwargs['tweet_mode'] = 'extended'
+ kwargs = add_tweetmode_parameter(kwargs)
tweet = t.statuses.show(**kwargs)
limit = c['CONVERSATION_MAX']
thread_ref = []
t.favorites.create(_id=tid, include_entities=False)
printNicely(green('Favorited.'))
kwargs = {'id': tid}
- if not c.get('DISABLE_EXTENDED_TWEETS'):
- kwargs['tweet_mode'] = 'extended'
+ kwargs = add_tweetmode_parameter(kwargs)
draw(t.statuses.show(**kwargs))
printNicely('')
t.favorites.destroy(_id=tid)
printNicely(green('Okay it\'s unfavorited.'))
kwargs = {'id': tid}
- if not c.get('DISABLE_EXTENDED_TWEETS'):
- kwargs['tweet_mode'] = 'extended'
+ kwargs = add_tweetmode_parameter(kwargs)
draw(t.statuses.show(**kwargs))
printNicely('')
printNicely(red('Tweet id is not valid.'))
return
kwargs = {'id': tid}
- if not c.get('DISABLE_EXTENDED_TWEETS'):
- kwargs['tweet_mode'] = 'extended'
+ kwargs = add_tweetmode_parameter(kwargs)
tweet = t.statuses.show(**kwargs)
url = 'https://twitter.com/' + \
tweet['user']['screen_name'] + '/status/' + str(tid)