jeudi 25 décembre 2014

IMACROS search for specific user

I have tried to make a macro to search for a specific user from links in the format of:



http://ift.tt/1vt6uEU



So my code is :



VERSION BUILD=8881205 RECORDER=FX
'No popup upon extractino
SET !EXTRACT_TEST_POPUP NO
'Ignoring the error coming up because the username I'm searching for won't exist on all pages
SET !ERRORIGNORE YES
'Set the user-id variable initiated at 0 and incremented by 1
set !VAR1 0
add !VAR1 {{!loop}}
'Increments the userID on the webpage
URL GOTO=http://ift.tt/1wKR9nr}}
'Check if the Username on the page is the same as the one i'm looking for :
SEARCH SOURCE=TXT:"Desired-username"
'Make a txt where there is supposed to be "desired-username"+userid
TAG POS=1 TYPE=DIV ATTR=TXT:* EXTRACT=TXT
ADD !EXTRACT {{!EXTRACT}}
ADD !EXTRACT {{!VAR1}}
SAVEAS TYPE=EXTRACT FOLDER=* FILE=test.csv


So with this code, the expected result would be a csv where the columns are all empty+UserID, (Keyword not found error) until he reaches the actual page where the desired username actually exists, and then inputs the Desired username near the UserID in the csv.


But it's not working, I tested it and I don't know what am I missing. And if anyone has a better way of doing this (Which I'm pretty sure you do because my code is absolutely horrible), kindly share. Thanks for the help.


Aucun commentaire:

Enregistrer un commentaire