Skip to main content
2 of 3
deleted 12 characters in body
Quill
  • 11.9k
  • 5
  • 40
  • 93

##Intrusive Code:

When including code from somewhere else, the script parser will automatically execute it. I really don't want multithreaded code to run for \$n\$ seconds, when I import something.

You should include a if __name__ == '__main__'-block to fix that behaviour. In addition to that, I'd personally extract the last four lines into a separate method.

##Impossible Async:

Let's say I want to run this, and do something else on the main-thread; not possible! You instantly join to the pool after starting to scrape the results.

Instead of that, I'd personally keep the pool open and async, unless explicitly calling a .join method:

def join():
    pool.join()

Aside from that, janos makes awesome points, I'd just want to see a little documentation on what scrape_results_page does.

Vogel612
  • 25.3k
  • 7
  • 58
  • 141