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
Can't Return a Result Set in the Given Context
Running Composer Returns: "Could Not Open Input File: Composer.Phar"
How to Specify Composer Install Path
Autoload Classes from Different Folders
Unit Testing and Static Methods
How to Write a Stored Procedure in PHPmyadmin
Creating a Mechanism to Validate Emails
How to Check That an Object Is Empty in PHP
Algorithms for String Similarities (Better Than Levenshtein, and Similar_Text)? PHP, Js
999 Error Code on Head Request to Linkedin
Get Updated Value in MySQL Instead of Affected Rows
PHP Serial Port Data Return from Arduino
Aws Cloudfront + Load Balancer, Url Changes from Main Domain to Load Balancer Subdomain