![]() ![]() # copies or substantial portions of the Software. # The above copyright notice and this permission notice shall be included in all # furnished to do so, subject to the following conditions: # copies of the Software, and to permit persons to whom the Software is ![]() # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # in the Software without restriction, including without limitation the rights # of this software and associated documentation files (the "Software"), to deal # Permission is hereby granted, free of charge, to any person obtaining a copy This one certainly appears to handle the rate limiting information from Companies House - if you look at the RateLimitAdapter class here: JamesGardiner/chwrapper/blob/develop/chwrapper/services/base.py # -*- coding: utf-8 -*. Response = requests.get(f"",auth=(api_key,’’))ĭir_num_error = response.status_codeĭir_num_error = str(datetime.now())ĭir_num_error = request_numberĮlse: pass json_search_result = response.textĭata = json.JSONDecoder().decode(json_search_result)Ĭo_list_a.append(item) From the last attempt, we did not find any evidence that the problem was a rate limit problem (we have a 5min sleep which hopefully addresses this. We created a status code dictionary in the code so that we could monitor any status code errors we may get. ProtocolError: (‘Connection aborted.’, ConnectionResetError(54, ‘Connection reset by peer’))ĬonnectionError: (‘Connection aborted.’, ConnectionResetError(54, ‘Connection reset by peer’)) We are trying to scrape company numbers from director IDs with the API, but keep getting these below errors after it runs for a while:ĬonnectionResetError: Connection reset by peer ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |