replace subprocess/curl with urllib2 call