trying to multithread scraping a bunch of urls with requests-html
but it isnt exactly working
any idea how to fix this?
def get_dynamic_content(url_obj:URLObject, req_parameters_obj:RequestParameters): reqh = HTMLSession() if url_obj.request_type == "get": r = reqh.get(url_obj.url) r.html.render() reqh.close() return r.html
when i try to run this in threaded version
tpool = ThreadPool(processes=int(config_data['max thread count']))
def start_scraping(): out = tpool.map(get_dynamic_content, toscrape) tpool.close() tpool.join() print(out)
it just throws the mentioned error
is there any fix?