NikolaiT / GoogleScraper

A Python module to scrape several search engines (like Google, Yandex, Bing, Duckduckgo, ...). Including asynchronous networking support.
https://scrapeulous.com/
Apache License 2.0
2.6k stars 734 forks source link

Problem installing? #214

Closed wyatt121 closed 5 years ago

wyatt121 commented 5 years ago

Hi,

I get this error when I run:

GoogleScraper -m http --keyword "apple" -v2

Traceback (most recent call last): File "/home/wyatt/env/bin/GoogleScraper", line 11, in load_entry_point('GoogleScraper==0.2.1', 'console_scripts', 'GoogleScraper')() File "/home/wyatt/env/lib/python3.5/site-packages/GoogleScraper/core.py", line 173, in main setup_logger(level=config.get('log_level').upper()) File "/home/wyatt/env/lib/python3.5/site-packages/GoogleScraper/log.py", line 23, in setup_logger logger.setLevel(level) File "/usr/lib/python3.5/logging/init.py", line 1255, in setLevel self.level = _checkLevel(level) File "/usr/lib/python3.5/logging/init.py", line 187, in _checkLevel raise ValueError("Unknown level: %r" % level) ValueError: Unknown level: '2'

What do I have wrong?

Any help is much appreciated.

Wyatt

NikolaiT commented 5 years ago

Thanks for your issue.

nikolai@nikolai:~/projects/private/GoogleScraper$ ./run.py -m http --keyword "apple" -v2
usage: GoogleScraper [-h] [-m {http,selenium,http-async}]
                     [--sel-browser {firefox,chrome,phantomjs}]
                     [-q KEYWORD | --keyword-file KEYWORD_FILE]
                     [-o- OUTPUT_FILENAME] [--shell] [-n NUM_RESULTS_PER_PAGE]
                     [-p NUM_PAGES_FOR_KEYWORD] [-z NUM_WORKERS]
                     [-t SEARCH_TYPE] [--proxy-file PROXY_FILE]
                     [--config-file CONFIG_FILE] [--simulate]
                     [-v {DEBUG,INFO,WARNING,WARN,ERROR,CRITICAL,FATAL}]
                     [--print-results {all,summarize}] [--view-config] [-V]
                     [--clean] [--mysql-proxy-db MYSQL_PROXY_DB]
                     [-s SEARCH_ENGINES]
GoogleScraper: error: argument -v/--verbosity/--loglevel/--log-level: invalid choice: '2' (choose from 'DEBUG', 'INFO', 'WARNING', 'WARN', 'ERROR', 'CRITICAL', 'FATAL')

Fixed the problem. -v2 is an invalid loglevel. You must chose a Log-Level from 'DEBUG', 'INFO', 'WARNING', 'WARN', 'ERROR', 'CRITICAL', 'FATAL'. The program shows the appropriate message now if you input -v2