Solved

Extract link for file from web page

Posted on 2016-08-05
6
41 Views
Last Modified: 2016-08-05
Dear Experts

I am new to this topic, I have web page listing files, see picture 1, when you click on file, it will start download. However when you rightclick on file and clik SaveTargetAs, you will not save final file, but HTML page.

Can you advice me what is link for given file?

Web page code is showed on picture 1.

Many thanks for advice

V

1COMPASS-Network_-Document-Library.html
0
Comment
Question by:vladobb
  • 3
  • 2
6 Comments
 
LVL 7

Expert Comment

by:Antzs
ID: 41743985
Can you hover your mouse on the file.  The link to the file should be displayed at the status bar of the browser.
Screen
0
 

Author Comment

by:vladobb
ID: 41744002
Unfortunatelly status bar shows nothing when I hover mouse over file
Any advice?
0
 
LVL 35

Expert Comment

by:Kimputer
ID: 41744143
You have to FULLY understand the WHOLE CONVERSATION TRAFFIC before you even start attempting to code something in Java.
You are running into this problem because this website is shielded from the normal user. The download HAS TO BE CHECKED that the correct user has access to it. That's why there's a page behind it which serves you the real file after checking your login information.

To fully code it in Java (or any other programs), you have to code the login sequence first, then the correct cookie storage. After that find out what the content is of the links, and finally from the reply of the server (after you request each link seperately), you can finally extract the link for the file (yes, you have to do it one by one).

If you made the Java tag by accident (meaning, you really only want this one link, and you don't intend to start programming), just download the file. In the Downloads tab of your program, the correct direct download link is displayed. However, this link may not work at all for someone else, since it's a protected environment. The direct download link only works for you for only that session. Tomorrow, it will fail (or if you log out).
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:vladobb
ID: 41744450
Dear Kimputer

many thanks, my primary aim is to automatically download that single file every day, I do not need to program anything, I mentioned JAVA probably incorrectly, I had a feeling that environment itself was programmed in JAVA? I do not know.

I need simply to automate process of download of that single XLS file you can see on picture. I use software Winadutomation or Automate, I know how to log in automatically, I can switch to correct "folder", but I cannot parse link to file, this is what confused me a lot.

Thanks

V
0
 
LVL 35

Accepted Solution

by:
Kimputer earned 500 total points
ID: 41744490
The link is only generated and revealed after you physically click the link. If your automation software can't simulate that, you sadly DO need to resort to programming.
0
 

Author Closing Comment

by:vladobb
ID: 41745159
Thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
V.simple question about Android packages and libraries 1 30
use lov values 2 64
ejb example issues 3 28
restrict decimal places for double datatype 10 22
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question