Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_log.debug("dhts: %r (of %r) urls to check", len(to_check), to_check_baselen)
res = []
for turl in to_check:
try:
stuff = do_horrible_thing_func(turl, base_url=url)
except GetError:
continue ## ... will be logged anyway.
if stuff:
data, resp = stuff[:2]
res.append((turl, data, dict(resp=resp)))
_log.debug("dhts: %r images found", len(res))
return to_check, res
if __name__ == '__main__':
pyaux.runlib.init_logging(level=1)
logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(21)
pyaux.use_exc_ipdb()
cres = do_horrible_things(sys.argv[1])
import IPython
IPython.embed(banner1="`cres`.")
def main():
try:
import pyaux.runlib
pyaux.runlib.init_logging(level=1)
pyaux.use_exc_ipdb()
except Exception:
pass
logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(21)
res = do_scrap_wrongies()
return