The error is due to you did not specify the permission to access blob storage.
Besides change the public access level to container or blob(screenshot as below) as @Martin mentioned in his post, you have the other 2 ways for the permission issue.

Method 1:You can generate a SAS URL for the blob. Nav to azure portal -> click the "..." symbol of blob you want to download -> select Generate SAS. After the SAS URL generated, you can use the SAS URL for blob downloading. The screenshot below shows how to generate SAS URL:

Then you can write code like below:
#use the SAS URL
r = requests.get('https://yy3.blob.core.windows.net/aa1/w2.JPG?xxxx')
open("d:\\temp\\mytest222.jpg","wb").write(r.content)
Method 2:Please take use of Get Blob rest api, and the sample code below is working for me.
import requests
import datetime
import hmac
import hashlib
import base64
storage_account_name = 'xxxx'
storage_account_key = 'xxxxx'
blob_name = 'your_blob_name,like w2.jpg, note it is case sensitive'
container_name='the container name'
api_version = '2018-03-28'
request_time = datetime.datetime.utcnow().strftime('%a, %d %b %Y %H:%M:%S GMT')
string_params = {
'verb': 'GET',
'Content-Encoding': '',
'Content-Language': '',
'Content-Length': '',
'Content-MD5': '',
'Content-Type': '',
'Date': '',
'If-Modified-Since': '',
'If-Match': '',
'If-None-Match': '',
'If-Unmodified-Since': '',
'Range': '',
'CanonicalizedHeaders': 'x-ms-date:' + request_time + '\nx-ms-version:' + api_version + '\n',
'CanonicalizedResource': '/' + storage_account_name + '/'+container_name + '/' + blob_name
}
string_to_sign = (string_params['verb'] + '\n'
+ string_params['Content-Encoding'] + '\n'
+ string_params['Content-Language'] + '\n'
+ string_params['Content-Length'] + '\n'
+ string_params['Content-MD5'] + '\n'
+ string_params['Content-Type'] + '\n'
+ string_params['Date'] + '\n'
+ string_params['If-Modified-Since'] + '\n'
+ string_params['If-Match'] + '\n'
+ string_params['If-None-Match'] + '\n'
+ string_params['If-Unmodified-Since'] + '\n'
+ string_params['Range'] + '\n'
+ string_params['CanonicalizedHeaders']
+ string_params['CanonicalizedResource'])
signed_string = base64.b64encode(hmac.new(base64.b64decode(storage_account_key), msg=string_to_sign.encode('utf-8'), digestmod=hashlib.sha256).digest()).decode()
headers = {
'x-ms-date' : request_time,
'x-ms-version' : api_version,
'Authorization' : ('SharedKey ' + storage_account_name + ':' + signed_string)
}
url = ('https://' + storage_account_name + '.blob.core.windows.net/'+container_name+'/'+blob_name)
r = requests.get(url, headers = headers)
#specify where to download and the new file name
open("d:\\temp\\mytest111.jpg","wb").write(r.content)
print("ok")