It could be the server is blocking your header to prevent web
scrapping , try to change the default user-agent from the urlib header
use Request.add_header
I changed my code to :
headers = {'User-agent': 'Mozilla/5.0',}
req = urllib2.Request(url, None, headers)
url_obj = urllib2.urlopen(req)
And it works, thanks !
--
“One original thought is worth a thousand mindless quotings.”
“Le vrai n'est pas plus sûr que le probable.”
Diogene Laerce
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.