999 Error Code on Head Request to Linkedin

HTTPError 999: 'No Hacking'

they probably detect your user-agent and filter you.
try to change it:

req = urllib.request.Request(
url,
data=None,
headers={'User-Agent': ("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/35.0.1916.47 Safari/537.36")})
fp = urllib.request.urlopen(req)

Sending a HTTP request in Swift and getting 1001, 999 errors

The error code -1001 mean that your connection timed out. Looks like your setup fails to connect to the server. For testing purpose you could make your NSAppTransportSecurity settings simpler and just set NSAllowsArbitraryLoads to true; if the connection works this way you know it's related to the configuration.

Here's a list of some network-related error codes.



Related Topics



Leave a reply



Submit