chenjr0719 / Facebook-Page-Crawler

A Python crawler uses Facebook Graph API to crawling fan page's public posts, comments, and reactions.
MIT License
153 stars 62 forks source link

unrecognized arguments #3

Open zuyyina17 opened 6 years ago

zuyyina17 commented 6 years ago

i got this issue while running the program

C:\WINDOWS\system32>facebook_page_crawler '827852074085717' 'second-app' 'appledaily.tw' '2018-03-08 14:05:00' '2018-03-08 15:00:00'-r yes usage: facebook_page_crawler [-h] [-att] [-r] [-api API_VERSION] [-l LIMIT] [-d] [-p PROCESS_NUM] [-w] app_id app_secret targets since until facebook_page_crawler: error: unrecognized arguments: '2018-03-08 15:00:00'-r yes

chenjr0719 commented 6 years ago

Sorry for the really late reply...

Add a space between '2018-03-08 15:00:00' and -r

Hazelnuta commented 6 years ago

also got the problem... only I didn't add optional arguments. C:\Users\lenovo>facebook_page_crawler '447515165673811' 'aa6143ed2177935f4036268 d6e607a88' 'appledaily.tw' '2016-09-01 00:00:00' '2016-09-01 23:59:59' usage: facebook_page_crawler [-h] [-att] [-r] [-api API_VERSION] [-l LIMIT] [-d] [-p PROCESS_NUM] [-w] app_id app_secret targets since until facebook_page_crawler: error: unrecognized arguments: '2016-09-01 23:59:59'

chenjr0719 commented 6 years ago

it's really weird. I can run my program on different machines with Linux OS. And all the bugs are related to Windows. Maybe I have to take a look about what's the difference when Python runs on Linux and Windows.

BTW, could you provide steps to reproduce this bug?

Hazelnuta commented 6 years ago

Basically I follow the instructions to install the module python setup.py develop then I user the command line as the format facebook_page_crawler $app_id $app_secret $targets $since $until as C:\Users\lenovo>facebook_page_crawler '447515165673811' 'aa6143ed2177935f4036268d6e607a88' 'appledaily.tw' '2016-09-01 00:00:00' '2016-09-01 23:59:59' without any optional arguments And it keeps reporting the error about the last argument $until I've checked that the libs required have been installed and the py version is correct Don't know why

chenjr0719 commented 6 years ago

I just try to run on Windows 10 with following steps:

  1. Install Python 3.6.5(I didn't install any version of Python on my Windows machine)
  2. Download the zip of this repository and unzip it
  3. Open PowerShell and cd to the unzipped folder
  4. Use venv module to create a clean environment and active the venv
  5. Install dependencies by running pip install -r requirements.txt(maybe not necessary because of next step)
  6. Run python setup.py develop to install dependencies and this crawler
  7. Run command facebook_page_crawler $APP_ID $APP_SECRET 'appledaily.tw' '2016-09-01 00:00:00' '2016-09-01 23:59:59'

The result(check the second execution): default

Which version of Windows and Python are you using?

SmartManoj commented 4 years ago

Use double quotes in cmd