Skip to content

Get painting list requests get throttled by wikiart #21

@LorenzoCianciaruso

Description

@LorenzoCianciaruso

When running genre-scraper.py using the currently harcoded values for randomization

time.sleep(3.0*random.random())  # random sleep to decrease concurrence of requests

requests get throttled by Wikiart that returns

[Errno 104] Connection reset by peer

I think there are 2 improvements:

  • Throttled a bit more the request from the script side by having a fixed latency summed up to the randomised one.
  • when you run the script only failures are printed out in the console. And because of that initially I wrongly assumed the the script wasn't working at all. In reality all the successful requests are not logged, so might be good to add some more logs.

I'm happy to open a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions