bianjiang / tweetf0rm

A twitter crawler in Python
MIT License
303 stars 107 forks source link

Error on console, program does not collapse #20

Closed estathop closed 5 years ago

estathop commented 5 years ago

Greeting again, I configured all the necessary files according to my needs but in the console the line below appears but the program does not collapse and continues to fetch tweets but my search words are in catalan and for about 2 hours it fetched nothing, so I want to know if I did something wrong or the are not any tweets at all. Console Error: (2019-06-06 12:03:42,765) [22347] ERROR: exception: file() takes at most 3 arguments (4 given)

bianjiang commented 5 years ago

What’s your config and what’s the command line you used?

estathop commented 5 years ago

python twitter_tracker.py -c /home/estathop/tweetf0rm/config.json -cmd search -o /home/estathop/tweetf0rm/data/search_query -cc /home/estathop/tweetf0rm/test_data/search.json -wait 5

After searching around about this particular error it is an inconsistency between python 2& 3, so when I switched to python3 the program executed normally, without errors, it fetched many MBs of data where it should but there is not much going on in the console.

estathop commented 5 years ago

In this block

{
        "apikeys": {
                "i0mf0rmer01": {
                        "app_key": "APP_KEY",
                        "app_secret": "APP_SECRET",
                        "oauth_token": "OAUTH_TOKEN",
                        "oauth_token_secret": "OAUTH_TOKEN_SECRET"
                }
        }
}

what is i0mf0rmer01 supposed to be ? the username of the dev or the name of the app ?

bianjiang commented 5 years ago

That doesn’t matter, as long as you have the right APP KEY, etc.

Jiang

On Jun 6, 2019, at 18:24, estathop notifications@github.com<mailto:notifications@github.com> wrote:

In this block

{ "apikeys": { "i0mf0rmer01": { "app_key": "APP_KEY", "app_secret": "APP_SECRET", "oauth_token": "OAUTH_TOKEN", "oauth_token_secret": "OAUTH_TOKEN_SECRET" } } }

what is i0mf0rmer01 supposed to be ? the username of the dev or the name of the app ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_bianjiang_tweetf0rm_issues_20-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAAYBIP6CFJMKMQSHNJ27TIDPZDQWPA5CNFSM4HU7E6PKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXCNKWQ-23issuecomment-2D499438938&d=DwMCaQ&c=sJ6xIWYx-zLMB3EPkvcnVg&r=TLgJuKkOOY_w7XKg_CQ1Wvz4apgyTEBI3JBmlSBcBMc&m=Dlu7AEXV25UKWIETDAnX_7-Kx2LYmS_Jmh7JJEzvEpM&s=6kRf9OOmE1koGvqmOHSN2OqbVWg-MAShiTFPe0SQKK0&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAYBIP7OHZDGRTCT4322OJLPZDQWPANCNFSM4HU7E6PA&d=DwMCaQ&c=sJ6xIWYx-zLMB3EPkvcnVg&r=TLgJuKkOOY_w7XKg_CQ1Wvz4apgyTEBI3JBmlSBcBMc&m=Dlu7AEXV25UKWIETDAnX_7-Kx2LYmS_Jmh7JJEzvEpM&s=q8Mk8dUsNXStLXiGD2Yno1TZcOkT6sbz7UbICebI0nk&e=.

estathop commented 5 years ago

(API key) is APP_KEY (API secret key) is APP_SECRET (Access token) is OAUTH_TOKEN (Access token secret) is OAUTH_TOKEN_SECRET

Do I stand correct ?

bianjiang commented 5 years ago

Yes

Jiang

On Jun 6, 2019, at 18:32, estathop notifications@github.com<mailto:notifications@github.com> wrote:

(API key) is APP_KEY (API secret key) is APP_SECRET (Access token) is OAUTH_TOKEN (Access token secret) is OAUTH_TOKEN_SECRET

Do I stand correct ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_bianjiang_tweetf0rm_issues_20-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAAYBIP57JZMFVBMIS5FF7LTPZDRUNA5CNFSM4HU7E6PKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXCN46Y-23issuecomment-2D499441275&d=DwMCaQ&c=sJ6xIWYx-zLMB3EPkvcnVg&r=TLgJuKkOOY_w7XKg_CQ1Wvz4apgyTEBI3JBmlSBcBMc&m=vq8NHWcHq22ieLpxelNCbZ689yeRsRFD_6nRmZU_P3U&s=PS-cnIxRx5hENmyyVtADwYYf5j0rs2a5jWjDqdGxOJk&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAYBIPYZVO5NRUPBTEKHSQLPZDRUNANCNFSM4HU7E6PA&d=DwMCaQ&c=sJ6xIWYx-zLMB3EPkvcnVg&r=TLgJuKkOOY_w7XKg_CQ1Wvz4apgyTEBI3JBmlSBcBMc&m=vq8NHWcHq22ieLpxelNCbZ689yeRsRFD_6nRmZU_P3U&s=leJMQ4huLZoPC2Q_T1-I1eeKb_Lr2Tu_RW9VNpTgcWw&e=.

bianjiang commented 5 years ago

Python 3 only. So it did or it did not fetch any data? Your comment wasn’t consistent

estathop commented 5 years ago

Python 2 didn't fetch any data, it showed the error and a message with 0 tweets fetched, and did not even create a json file

python3 twitter_tracker.py -c /home/estathop/tweetf0rm/config.json -cmd search -o /home/estathop/tweetf0rm/data/search_query -cc /home/estathop/tweetf0rm/test_data/search.json -wait 5

works like a charm and is still working. Maybe it should be clarified that tweetf0rm is built upon python 3