It doesn't need to be forced this is the way the code is developed.
This is what's called data driven software, whatever is in the apis.text file will be downloaded, period, this is the only way it is set up to work!!!
Read the commented code. I explain in detail! the file name is extracted from the header stored in the response from request!
It is extracted and used. If it can't find the proper header information, it will use the name from the apis.text file, but the origin of
the download is still the apis.txt file.
Try the following:
This is what's called data driven software, whatever is in the apis.text file will be downloaded, period, this is the only way it is set up to work!!!
Read the commented code. I explain in detail! the file name is extracted from the header stored in the response from request!
It is extracted and used. If it can't find the proper header information, it will use the name from the apis.text file, but the origin of
the download is still the apis.txt file.
Try the following:
- find the apis number (or whatever it's called) for only one that you haven't downloaded yet.
- Backup the old apis.txt file by renaming it to apis_bak1.txt (or some such name)
- Open a text editor like notebook or vi
- type in the apis number and enter
- save in the text directory as apis.txt
- Run the program
- You should now find all the files associated with this apis number in their respective directories.