If login() returns True try to resend the request, else QUIT
If the status_code is still 403 after resending the request after successful login, QUIT
The easiest way would be repeating the same piece of code for each method,
but sounds trivial, however making a method for this procedure requires
additional attention.
As pointed out here https://github.com/WEEE-Open/python-tarallo/issues/6#issuecomment-436801357, the login() method already checks its own request status by returning a boolean.
We should at the end of each request:
status_code
for403
403
, attemptlogin()
login()
returnsTrue
try to resend the request, else QUITstatus_code
is still403
after resending the request after successful login, QUITThe easiest way would be repeating the same piece of code for each method, but sounds trivial, however making a method for this procedure requires additional attention.