AW: Unrecognised Arguments

Lutz Horn lutz.horn at outlook.de
Mon Dec 3 01:35:46 EST 2018


Hi,

you use the `--lang` option wrongly. Fails:

$ twitterscraper -bd 2015-01-01 -ed 2016-01-01 –lang en
usage: twitterscraper [-h] [-o OUTPUT] [-l LIMIT] [-a] [-c] [-u] [--lang LANG]
                      [-d] [-bd] [-ed] [-p]
                      query
twitterscraper: error: unrecognized arguments: en

Works:

$ twitterscraper -bd 2015-01-01 -ed 2016-01-01 –-lang=en

INFO: queries: ['–-lang=en since:2015-01-01 until:2015-01-19', '–-lang=en since:2015-01-19 until:2015-02-06', '–-lang=en since:2015-02-06 until:2015-02-24', '–-lang=en since:2015-02-24 until:2015-03-15', '–-lang=en since:2015-03-15 until:2015-04-02', '–-lang=en since:2015-04-02 until:2015-04-20', '–-lang=en since:2015-04-20 until:2015-05-08', '–-lang=en since:2015-05-08 until:2015-05-27', '–-lang=en since:2015-05-27 until:2015-06-14', '–-lang=en since:2015-06-14 until:2015-07-02', '–-lang=en since:2015-07-02 until:2015-07-20', '–-lang=en since:2015-07-20 until:2015-08-08', '–-lang=en since:2015-08-08 until:2015-08-26', '–-lang=en since:2015-08-26 until:2015-09-13', '–-lang=en since:2015-09-13 until:2015-10-01', '–-lang=en since:2015-10-01 until:2015-10-20', '–-lang=en since:2015-10-20 until:2015-11-07', '–-lang=en since:2015-11-07 until:2015-11-25', '–-lang=en since:2015-11-25 until:2015-12-13', '–-lang=en since:2015-12-13 until:2016-01-01']
INFO: Querying –-lang=en since:2015-01-01 until:2015-01-19
INFO: Querying –-lang=en since:2015-01-19 until:2015-02-06
...

Take a look at https://github.com/taspinar/twitterscraper#22-the-cli for details.

Lutz

________________________________________
Von: Python-list <python-list-bounces+lutz.horn=outlook.de at python.org> im Auftrag von fergalbell Bell <fergalbell at gmail.com>
Gesendet: Sonntag, 2. Dezember 2018 08:00
An: python-list at python.org
Betreff: Re: Unrecognised Arguments

Dear Sir/Madam,

I have been running twitterscraper yesterday with no real problems encountered. I came home and tried to run a twitterscraper command in cmd – without success.

It said the following for these arguments: -bd 2015-01-01 -ed 2016-01-01 –lang en unrecognised.

Regards,

Fergal Bell


Sent from Mail for Windows 10

--
https://mail.python.org/mailman/listinfo/python-list



More information about the Python-list mailing list