Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Downloading files from Livelink URL

pratikr

Programmer
Sep 14, 2024
2
0
1
I have an excel spreadsheet with one of the columns containing Livelink URLs in the following format - http://livelink.organisation-name.net/livelink.exe/open/{file_id} where file_id is the placeholder for actual file identifiers. I have to automate the task of downloading the files and placing them in appropriate folder based on certain tag (not relevant). I am trying to write a Python script to automate and using requests.get method but having trouble with authentication. I have two questions -
  1. What authentication patterns can be used to achieve this objective?
  2. Can I pass the above URL in requests.get method to retrieve the underlying PDF file?
 
Last edited:
  1. Using OTDS or OTCS authentication endpoint get a token.A valid tokeen is needed for any operation.
  2. REST API has a method to fetch the content.You will have to create a file object to receive the content.
  3. Since your operation involves multiple downloads you should create a chained mechanism for example when you download your first file in the headers livelink will return you a token use this for next and next so that they do not time out.
 
  1. Using OTDS or OTCS authentication endpoint get a token.A valid tokeen is needed for any operation.
  2. REST API has a method to fetch the content.You will have to create a file object to receive the content.
  3. Since your operation involves multiple downloads you should create a chained mechanism for example when you download your first file in the headers livelink will return you a token use this for next and next so that they do not time out.
Correct me if I am wrong - In order to fetch the file from the appropriate API method will I have to extract the node id from the URL mentioned above?
Also, is there any way I can use urllib.request.urlretrieve to directly use the given URL?
 

Part and Inventory Search

Sponsor

Back
Top