I want to get Page Source by the following code ,I wonder is it enough to detect all the network erroneous cases with the following code ?
if (reply.error()!= QNetworkReply.NoError):
print('11111111', reply.errorString())
return
content=reply.readAll().data()
if content==b'':
print('---------', 'cannot find any resource !')
return
↧