I am trying to extract a list of hrefs from multiple urls.
The A type has always the same class "property_title" should I use pos 1, 2 etc.. or can I just put * position, Extract every href from that page?
Also I would like to put every url at the beginning.
Thanks
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
URL GOTO=https://www.tripadvisor.it/Restaurants-g3334498-c13-Acerra_Province_of_Naples_Campania.html
TAG POS=1 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=2 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=3 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=4 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=5 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=6 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=7 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=8 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=9 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=10 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=11 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=12 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=13 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=14 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=15 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=16 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=17 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=18 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=19 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=20 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
URL GOTO=https://www.tripadvisor.it/Restaurants-g3334498-c13-Acerra_Province_of_Naples_Campania.html
TAG POS=1 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=2 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=3 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=4 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=5 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=6 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=7 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=8 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=9 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=10 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=11 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=12 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=13 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=14 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=15 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=16 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=17 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=18 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=19 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
TAG POS=20 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
SAVEAS TYPE=EXTRACT FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}}
No, wildcards can't help here, you can use either explicitly specified numbers or relative positioning:
TAG POS=R1 TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
Loop is a good option too:
TAG POS={{!LOOP}} TYPE=A ATTR=CLASS:property_title&&TXT:* EXTRACT=HREF
Alternatively XPATH or CSS selectors can be used to identify the element unambiguously:
TAG command description
To add current URL to the Extract variable you can use:
ADD !EXTRACT {{!URLCURRENT}}
Related
Pleas help me to How i can take data from excel sheet (every column and row )
Let suppose
Column1 Column 2
Row1 203-9996158-5745105 15505431376413
Row2 202-1824037-7498701 15505431376685
How can i get data from excel and put to another website
TAG POS=3 TYPE=INPUT:TEXT FORM=ACTION:https://sliex.com/orders-v3/ref=xx_myo_dnav_xx?page=1 ATTR=* CONTENT=203-9996158-5745105
TAG POS=5 TYPE=INPUT:SUBMIT FORM=ACTION:https://sliex.com/orders-v3/ref=xx_myo_dnav_xx?page=1 ATTR=*
TAG POS=8 TYPE=INPUT:SUBMIT ATTR=*
TAG POS=4 TYPE=SPAN ATTR=TXT:Select<SP>an<SP>option
TAG POS=1 TYPE=A ATTR=TXT:DPD
TAG POS=4 TYPE=INPUT:TEXT ATTR=* CONTENT=15505431376413
TAG POS=5 TYPE=INPUT:TEXT ATTR=* CONTENT=15505431376413
TAG POS=9 TYPE=INPUT:SUBMIT ATTR=*
This is single manually code but i want all automation.. First take data first row when done then auto start next row
Thanks
Save excel table as into a comma-separated text (CSV) file.
Edit macros
SET !DATASOURCE filename.csv
SET !VAR1 {{!COL1}}
SET !VAR2 {{!COL2}}
TAG POS=3 TYPE=INPUT:TEXT FORM=ACTION:https://sliex.com/orders-v3/ref=xx_myo_dnav_xx?page=1 ATTR=* CONTENT={{!VAR1}}
TAG POS=5 TYPE=INPUT:SUBMIT FORM=ACTION:https://sliex.com/orders-v3/ref=xx_myo_dnav_xx?page=1 ATTR=*
TAG POS=8 TYPE=INPUT:SUBMIT ATTR=*
TAG POS=4 TYPE=SPAN ATTR=TXT:Select<SP>an<SP>option
TAG POS=1 TYPE=A ATTR=TXT:DPD
TAG POS=4 TYPE=INPUT:TEXT ATTR=* CONTENT={{!VAR2}}
TAG POS=5 TYPE=INPUT:TEXT ATTR=* CONTENT={{!VAR2}}
TAG POS=9 TYPE=INPUT:SUBMIT ATTR=*
i am new to imacros...
i have tried to record the imacros to request an answer from the writer but I think it's dynamically changing the pos and values...
so, looking for a way to do this...
here is the code that I have recorded
VERSION BUILD=1005 RECORDER=CR
TAG POS=12 TYPE=SVG ATTR=TXT:
TAG POS=2 TYPE=PATH ATTR=STROKE-LINECAP:round&&TXT:
TAG POS=3 TYPE=CIRCLE ATTR=CX:12&&CY:12&&R:9&&TXT:
TAG POS=1 TYPE=A ATTR=ID:__w2_wx4nZclL125_button
TAG POS=23 TYPE=SVG ATTR=TXT:
TAG POS=25 TYPE=SVG ATTR=TXT:
TAG POS=1 TYPE=A ATTR=ID:__w2_wx4nZclL134_button
TAG POS=29 TYPE=SVG ATTR=TXT:
TAG POS=31 TYPE=SVG ATTR=TXT:
TAG POS=1 TYPE=A ATTR=ID:__w2_wOt2sXY49_button
TAG POS=35 TYPE=SVG ATTR=TXT:
TAG POS=1 TYPE=DIV ATTR=ID:__w2_wJ28TPOd2_list_item
TAG POS=37 TYPE=SVG ATTR=TXT:
TAG POS=1 TYPE=A ATTR=ID:__w2_wDJBb2oM9_button
TAG POS=1 TYPE=A ATTR=ID:__w2_wx4nZclL2_submit
I'm creating an iMacro to update wordpress posts. I have the following:
URL GOTO=https://www.example.com
TAG POS=1 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2
The problem I have is that I need to update 400+ pages/posts.
The code:
TAG POS=NUMBER TYPE=A ATTR=TXT:Edit
tells which post to update, so I know I have to make POS=2, POS=3, POS=4, etc. all the way up to 400 but I need a better way, instead of copy pasting and manually editing each line.
Is there a way to make the code say TAG POS=N+1 or something to make it the next number until it reaches 400?
This is an example of 1-10
URL GOTO=https://www.example.com
TAG POS=1 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2
TAG POS=2 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2
TAG POS=3 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2
TAG POS=4 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2
TAG POS=5 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2
TAG POS=6 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2
TAG POS=7 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2
TAG POS=8 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2
TAG POS=9 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2
TAG POS=10 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2
There has to be a better way to doing this up to 400? :(
I will translate Shugar's answer to code:
URL GOTO=https://www.example.com
TAG POS={{!LOOP}} TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2
All we did is change the position to {{!LOOP}} at line 2 and if you run it as "Play (Loop)" with max = 400 it will solve your issue. If something broke and you want to start from pos X lets say 200 you can set the !LOOP to start from that number
I am trying to record and as I click around a site I want to capture every url address I am landing on. Is there a way to do this?
Here is an example of my macro:
VERSION BUILD=8021970
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=https://www.meritorpartsonline.com/webapp/wcs/stores/servlet/CategoryDisplay?urlRequestType=Base&catalogId=10051&categoryId=10001&pageView=detailed&urlLangId=-1&beginIndex=0&langId=-1&top_category=10001&top=Y&parent_category_rn=10001&storeId=10154
TAG POS=1 TYPE=A FORM=ID:displayForm ATTR=ID:WC_CategoriesSidebarDisplayf_links_2_1
TAG POS=1 TYPE=A FORM=ID:displayForm ATTR=ID:WC_CategoriesSidebarDisplayf_links_2_1
TAG POS=4 TYPE=IMG ATTR=SRC:https://www.meritorpartsonline.com/wcsstore/MeritorStorefrontAssetStore/images/*
TAG POS=4 TYPE=IMG ATTR=SRC:https://www.meritorpartsonline.com/wcsstore/MeritorStorefrontAssetStore/images/*
TAG POS=4 TYPE=IMG ATTR=SRC:https://www.meritorpartsonline.com/wcsstore/MeritorStorefrontAssetStore/images/*
TAG POS=4 TYPE=IMG ATTR=SRC:https://www.meritorpartsonline.com/wcsstore/MeritorStorefrontAssetStore/images/*
TAG POS=4 TYPE=IMG ATTR=SRC:https://www.meritorpartsonline.com/wcsstore/MeritorStorefrontAssetStore/images/*
TAG POS=4 TYPE=IMG ATTR=SRC:https://www.meritorpartsonline.com/wcsstore/MeritorStorefrontAssetStore/images/*
TAG POS=1 TYPE=A FORM=ID:displayForm ATTR=ID:WC_CategoriesSidebarDisplayf_links_2_1
TAG POS=1 TYPE=A ATTR=ID:WC_BreadCrumbTrailDisplay_link_4
TAG POS=1 TYPE=A FORM=ID:displayForm ATTR=ID:WC_CategoriesSidebarDisplayf_links_2_2
TAG POS=4 TYPE=IMG ATTR=SRC:https://www.meritorpartsonline.com/wcsstore/MeritorStorefrontAssetStore/images/*
TAG POS=4 TYPE=IMG ATTR=SRC:https://www.meritorpartsonline.com/wcsstore/MeritorStorefrontAssetStore/images/*
TAG POS=4 TYPE=IMG ATTR=SRC:https://www.meritorpartsonline.com/wcsstore/MeritorStorefrontAssetStore/images/*
TAG POS=4 TYPE=IMG ATTR=SRC:https://www.meritorpartsonline.com/wcsstore/MeritorStorefrontAssetStore/images/*
TAG POS=4 TYPE=IMG ATTR=SRC:https://www.meritorpartsonline.com/wcsstore/MeritorStorefrontAssetStore/images/*
TAG POS=4 TYPE=IMG ATTR=SRC:https://www.meritorpartsonline.com/wcsstore/MeritorStorefrontAssetStore/images/*
TAG POS=4 TYPE=IMG ATTR=SRC:https://www.meritorpartsonline.com/wcsstore/MeritorStorefrontAssetStore/images/*
Play the macro below and surf the web. It will write every url that you visit, in the ‘dnlUrls.txt’ file. (Stop this macro when you want to finish tracking.)
SET !LOOP -9999999
SET urlFolder EVAL("('{{urlAddress}}' != '{{!URLCURRENT}}') ? '*' : 'noSuchFolder';")
SET urlAddress EVAL("('{{urlAddress}}' != '{{!URLCURRENT}}') ? '{{!URLCURRENT}}' : '{{urlAddress}}';")
SET !EXTRACT {{urlAddress}}
SET !ERRORIGNORE YES
SAVEAS TYPE=EXTRACT FOLDER={{urlFolder}} FILE=dnlUrls.txt
SET !ERRORIGNORE NO
WAIT SECONDS=1
I am trying to extract profile URLs from linkedin search results pages but i am not getting any appropriate results, can you please help me out with below code.
'll look forward to hearing from you further, Thanks in advance!
Regards// Rebecca
VERSION BUILD=8850919 RECORDER=FX
TAB T=1
SET !REPLAYSPEED FAST
SET !EXTRACT_TEST_POPUP NO
SET !ERRORIGNORE YES
URL GOTO=https://www.linkedin.com/vsearch/f?type=all&keywords=&orig=GLHD&rsid=&pageKey=member-home&trkInfo=&search=Search
TAG POS=1 TYPE=H3 ATTR=* EXTRACT=HREF
TAG POS=2 TYPE=H3 ATTR=* EXTRACT=HREF
TAG POS=3 TYPE=H3 ATTR=* EXTRACT=HREF
TAG POS=4 TYPE=H3 ATTR=* EXTRACT=HREF
TAG POS=5 TYPE=H3 ATTR=* EXTRACT=HREF
TAG POS=6 TYPE=H3 ATTR=* EXTRACT=HREF
TAG POS=7 TYPE=H3 ATTR=* EXTRACT=HREF
TAG POS=8 TYPE=H3 ATTR=* EXTRACT=HREF
TAG POS=9 TYPE=H3 ATTR=* EXTRACT=HREF
TAG POS=10 TYPE=H3 ATTR=* EXTRACT=HREF
SAVEAS TYPE=EXTRACT FOLDER=* FILE=results.csv
Try to change your code strings of "TAG POS=... EXTRACT=HREF" with:
TAG POS=1 TYPE=A ATTR=CLASS:profile-photo EXTRACT=HREF
TAG POS=2 TYPE=A ATTR=CLASS:profile-photo EXTRACT=HREF
etc.