I'm running get requests to a URL, using lines in a text file as arguments in said get requests. The issue I'm finding is that the responseind.json() is only returning the get request related to the LAST line of the txt file. All preceding lines return []. Code below, any ideas?
with open('industries.txt') as industry_file:
for line in industry_file:
start = time.time()
responseind = requests.get("https:URL" + "".join(line) + "?token=My key")
print(responseind.json())
responseid.text. my guess is perhaps the json happens to be an empty list for those