Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't turn INFO logs off #111

Open
harbachonak opened this issue May 18, 2023 · 2 comments
Open

Can't turn INFO logs off #111

harbachonak opened this issue May 18, 2023 · 2 comments

Comments

@harbachonak
Copy link

harbachonak commented May 18, 2023

Hey!

I'm using GoogleImageCrawler and trying to turn the INFO logs off, so I see only warning and errors in cmd. Am I doing something wrong? Cause INFO logs are still showed. Thanks!

   google_crawler = GoogleImageCrawler(
        feeder_threads=1,
        parser_threads=1,
        downloader_threads=4,
        storage={"root_dir": "pic/"},
    )
    google_crawler_motiv.set_logger(log_level=logging.WARNING) 

    google_crawler .crawl(
        keyword=request,
        max_num=num,
        min_size=(200, 200),
        max_size=None,
        file_idx_offset="auto",
    )
@VediYD
Copy link

VediYD commented Sep 11, 2023

@harbachonak Did you find a solution for this? I am trying to do the same.

@VediYD
Copy link

VediYD commented Sep 11, 2023

@harbachonak you can set the log level when creating the object. Something like this,

from icrawler.builtin import GoogleImageCrawler


google_crawler = GoogleImageCrawler(
    storage={
        'root_dir': '/images'
    },
    log_level=50,
)
google_crawler.crawl(keyword='cat', max_num=10)

This worked on

icrawler                     0.6.7

using python3.10.

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants