Commit 1c3ee797 authored by Francesco Poldi's avatar Francesco Poldi

Adapted the output args

parent cf057f16
...@@ -101,11 +101,11 @@ def _output(obj, output, config, **extra): ...@@ -101,11 +101,11 @@ def _output(obj, output, config, **extra):
logme.critical(__name__+':_output:UnicodeEncodeError') logme.critical(__name__+':_output:UnicodeEncodeError')
print("unicode error [x] output._output") print("unicode error [x] output._output")
async def checkData(tweet, location, config, conn): async def checkData(tweet, config, conn):
logme.debug(__name__+':checkData') logme.debug(__name__+':checkData')
copyright = tweet.find("div", "StreamItemContent--withheld") copyright = tweet.find("div", "StreamItemContent--withheld")
if copyright is None and is_tweet(tweet): if copyright is None and is_tweet(tweet):
tweet = Tweet(tweet, location, config) tweet = Tweet(tweet, config)
if not tweet.datestamp: if not tweet.datestamp:
logme.critical(__name__+':checkData:hiddenTweetFound') logme.critical(__name__+':checkData:hiddenTweetFound')
...@@ -135,24 +135,24 @@ async def checkData(tweet, location, config, conn): ...@@ -135,24 +135,24 @@ async def checkData(tweet, location, config, conn):
else: else:
logme.critical(__name__+':checkData:copyrightedTweet') logme.critical(__name__+':checkData:copyrightedTweet')
async def Tweets(tweets, location, config, conn, url=''): async def Tweets(tweets, config, conn, url=''):
logme.debug(__name__+':Tweets') logme.debug(__name__+':Tweets')
if (config.Profile_full or config.Location) and config.Get_replies: if (config.Profile_full or config.Location) and config.Get_replies:
logme.debug(__name__+':Tweets:full+loc+replies') logme.debug(__name__+':Tweets:full+loc+replies')
for tw in tweets: for tw in tweets:
await checkData(tw, location, config, conn) await checkData(tw, config, conn)
elif config.Favorites or config.Profile_full or config.Location: elif config.Favorites or config.Profile_full or config.Location:
logme.debug(__name__+':Tweets:fav+full+loc') logme.debug(__name__+':Tweets:fav+full+loc')
for tw in tweets: for tw in tweets:
if tw['data-item-id'] == url.split('?')[0].split('/')[-1]: if tw['data-item-id'] == url.split('?')[0].split('/')[-1]:
await checkData(tw, location, config, conn) await checkData(tw, config, conn)
elif config.TwitterSearch: elif config.TwitterSearch:
logme.debug(__name__+':Tweets:TwitterSearch') logme.debug(__name__+':Tweets:TwitterSearch')
await checkData(tweets, location, config, conn) await checkData(tweets, config, conn)
else: else:
logme.debug(__name__+':Tweets:else') logme.debug(__name__+':Tweets:else')
if int(tweets["data-user-id"]) == config.User_id or config.Retweets: if int(tweets["data-user-id"]) == config.User_id or config.Retweets:
await checkData(tweets, location, config, conn) await checkData(tweets, config, conn)
async def Users(u, config, conn): async def Users(u, config, conn):
logme.debug(__name__+':User') logme.debug(__name__+':User')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment