I'm a newbie to iMacro and but have found iMacro very interesting. And would request you all to help me with iMacro.
1. What version of iMacros are you using?
VERSION BUILD=844 RECORDER=CR
2. What operating system are you using? (please also specify language)
Windows 8.1,English
3. Which browser(s) are you using? (include version numbers)
Chrome Version 52.0.2743.116 m
4. What website are you using the macro ?
https://www.rio2016.com/en
-> Select "Athletes<SP>&<SP>Teams" in the side panel.
-> Select a country and Hit Enter.
-> From the list of the athletes select one by one and in the next page extract the Athletes information.
-> Similarly do this for all country and all athletes listed.
Here is the code that I use and the Questions are below the Code.
Code: Select all
VERSION BUILD=844 RECORDER=CR
URL GOTO=https://www.rio2016.com/en
TAG POS=1 TYPE=SPAN ATTR=TXT:Athletes<SP>&<SP>Teams
'TAG POS=1 TYPE=SPAN ATTR=TXT:All<SP>countries
TAG POS=1 TYPE=SPAN ATTR=TXT:Albania
SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Vinodh\Documents\iMacros\Macros FILE=RUn
TAG POS=1 TYPE=DIV ATTR=class:sidebar-menu__selector-nav<SP>sidebar-menu--advanced-country
'TAG POS=1 TYPE=UL ATTR=class:sidebar-menu__selector-inside<SP>ps-container<SP>ps-theme-default* EXTRACT=TXT
TAG POS=42 TYPE=LI ATTR=CLASS:sidebar-menu__selector-inside-item EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Vinodh\Documents\iMacros\Macros FILE=RUn
TAG POS=3 TYPE=BUTTON FORM=ACTION:/en/search-athletes ATTR=TXT:Search
TAG POS=1 TYPE=BUTTON ATTR=ID:search-load-more
TAG POS=1 TYPE=A ATTR=TXT:CALJA<SP>Briken
TAG POS=1 TYPE=TD ATTR=TXT:*
'TAG POS={{!LOOP}} TYPE=TD ATTR=class:about__col<SP>about__col--data EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=class:about__col<SP>about__col--data EXTRACT=TXT
TAG POS=2 TYPE=TD ATTR=class:about__col<SP>about__col--data EXTRACT=TXT
TAG POS=3 TYPE=TD ATTR=class:about__col<SP>about__col--data EXTRACT=TXT
TAG POS=4 TYPE=TD ATTR=class:about__col<SP>about__col--data EXTRACT=TXT
' Display the value within vertical bars to emphasize the spaces
'PROMPT |{{!EXTRACT}}|
SET trimmedValue EVAL("\"{{!EXTRACT}}\".replace(/^\\s*|\\s*$/g, \"\");")
PROMPT "|{{trimmedValue}}| - not anymore!"
SET !EXTRACT {{trimmedValue}}
SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Vinodh\Documents\iMacros\Macros FILE=RUn
BACK
1. How to loop Selecting one Country at a time and hitting the search Button ?
2. Is looping possible in iMacro for Chrome extension.
3. When I extract the Hight an Weight text from the athletes page, it consists of a lot of Leading and Trailing spaces, how do i remove them ? so that saving in the excel sheel it would be easy for me.
4. Is VBA programming make it better and easier to do the task I have given here ?