No text to point to in the TAG command

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
mguttman
Posts: 31
Joined: Sat Jan 09, 2010 7:32 pm

No text to point to in the TAG command

Post by mguttman » Thu Mar 11, 2010 10:08 pm

I am trying to create a macro that will run daily and download a specific datafile.

To download it manually, I click it in the red-rectangle-marked cell in the following screen shot:
TASE_table.jpg
TASE_table.jpg (116.53 KiB) Viewed 2994 times
As you can see from the Macro below, the ATTR=TXT: value there is the file size at that particular date and this usually change from day to day. (The "Kb" part though does not change!)

How do I change the following download macro so that it will be work every day, regardless of its file size:

Code: Select all

VERSION BUILD=6600217 RECORDER=FX
TAB T=1
URL GOTO=https://www.tase.co.il/TASEEng/MarketData/RawData/FileDistribution.htm
URL GOTO=https://www.tase.co.il/FileDistribution/TargetFolder/08031101.tas
ONDOWNLOAD FOLDER=C:\My<SP>Documents\Temp\Assemble FILE=file_803_{{!NOW:yyyymmdd}}.tas WAIT=YES
ONDOWNLOAD FOLDER=C:\My<SP>Documents\Temp\Assemble FILE=file_803_{{!NOW:yyyymmdd}}.tas WAIT=YES
TAG POS=1 TYPE=A ATTR=TXT:163
BTW #1: Does anybody know why the recording process placed the ONDOWNLOAD clause twice?

BTW #2: The ONDOWNLOAD clause works fine here, unlike in another case, posted separately.
mguttman
Posts: 31
Joined: Sat Jan 09, 2010 7:32 pm

Re: No text to point to in the TAG command

Post by mguttman » Mon Mar 15, 2010 10:45 pm

And Daniel,

Please, this one too!

Meir
Regards,
Meir
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: No text to point to in the TAG command

Post by Daniel, Tech Support » Tue Mar 16, 2010 3:07 pm

Hi Meir,

Sorry about the delay! What is static there? Is the "List of securities" static? You could then use relative positioning. Could you post here the HTML code for that piece of the page?

Best regards,
Daniel, iOpus Support
mguttman
Posts: 31
Joined: Sat Jan 09, 2010 7:32 pm

Re: No text to point to in the TAG command

Post by mguttman » Tue Mar 16, 2010 7:12 pm

Hi Daniel,

By "static" I mean that the file is created once and linked to. Then, when you click it, it is downloaded as-is, without any further processing. This is as opposed to other data typically on this site. This other data are HTML code and contents meant for viewing. But when you click on the "Export" (TSV or otherwise) button, it is dynamically translated, on-the-spot to the requested format. In other words, between the clicking and the actual downloading, a script is invoked which is not controlled anymore by the ONDOWNLOAD clause.

I think the best way for me to give you the HTML code is to post here the URL.

The desired file(s) is (are) any in the two rightmost columns in the table.

What is, how you program "relative positioning" and why would that solve the problem?

Regards,
Meir
Regards,
Meir
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: No text to point to in the TAG command

Post by Daniel, Tech Support » Fri Mar 19, 2010 7:37 pm

Hi Meir,

I'm afraid you misunderstood me. I was asking if the text "List of Securities ( structure0803)" changes at all. If not, we can use relative positioning and get the 1st link after it.

In this case it would look like this:

Code: Select all

URL GOTO=https://www.tase.co.il/TASEEng/MarketData/RawData/?a=84806898634043696694576085
TAG POS=1 TYPE=A ATTR=TXT:List<SP>of<SP>Securities* EXTRACT=TXT
ONDOWNLOAD FOLDER=C:\ FILE=* WAIT=YES
TAG POS=R1 TYPE=A ATTR=TXT:*
Best regards,
Daniel, iOpus Support
mguttman
Posts: 31
Joined: Sat Jan 09, 2010 7:32 pm

Re: No text to point to in the TAG command

Post by mguttman » Sat Mar 20, 2010 5:48 pm

Hi Daniel,

Yes, indeed I misunderstood you! Sorry!

And to answer your question, the text to the left of the link is indeed "static" in the sense that this is always the caption to the left of the cell and link to be clicked on. And your "relative positioning" script indeed worked. Thanks!

(I'll have to go into it and experiment some more with this feature before I'll feel confident but I think I got the idea behind it. Clever!)

Thanks again!

Meir
Regards,
Meir
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: No text to point to in the TAG command

Post by Daniel, Tech Support » Mon Mar 22, 2010 6:57 pm

Hi Meir,

Not at all! I am glad it worked! :)

All the best!
Daniel, iOpus Support
Post Reply