try: web = req.post(url, data=data, headers=headers) if web.text != expected_response: print(web.text, f'port : {i}') except req.RequestException as e: print(f"Request failed for port {i}: {e}")
defmain(): with concurrent.futures.ThreadPoolExecutor(max_workers=50) as executor: list(tqdm(executor.map(make_request, range(1, 65536)), total=65535))
{ "messages":[ { "promotions":{ "description":"Retrieve a list of all the promotions in our library.", "endpoint":"/api/latest/metadata/messages/promos", "methods":"GET" } }, { "coupons":{ "description":"Retrieve the list of coupons to use in our library.", "endpoint":"/api/latest/metadata/messages/coupons", "methods":"GET" } }, { "new_authors":{ "description":"Retrieve the welcome message sended to our new authors.", "endpoint":"/api/latest/metadata/messages/authors", "methods":"GET" } }, { "platform_use":{ "description":"Retrieve examples of how to use the platform.", "endpoint":"/api/latest/metadata/messages/how_to_use_platform", "methods":"GET" } } ], "version":[ { "changelog":{ "description":"Retrieve a list of all the versions and updates of the api.", "endpoint":"/api/latest/metadata/changelog", "methods":"GET" } }, { "latest":{ "description":"Retrieve the last version of api.", "endpoint":"/api/latest/metadata", "methods":"GET" } } ] }