7
Estoy usando mi propio resolver y me gustaría usar urllib2 para simplemente conectarme a la IP (sin resolver en urllib2) y me gustaría configurar el encabezado de host HTTP. Pero urllib2 es simplemente ignorando mi host-header:Establecer host-header al usar Python y urllib2
txheaders = { 'User-Agent': UA, "Host: ": nohttp_url }
robots = urllib2.Request("http://" + ip + "/robots.txt", txdata, txheaders)
Jaja, gracias por notar el error tipográfico. ¿Debo/puedo eliminar mi pregunta? – jonasl
@jonasl No, debe hacer clic en la marca de verificación y continuar;) – aaronasterling