Extracting URL

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Extracting URL

by Chafouin on Sun Mar 20, 2016 11:23 am

Hello everyone, I just start to use imacros and I encounter the first problem ...

I would like to extract the URLs of Google results. I want the URLs present on the Google page are extracted , and then go to the next page , etc. Then save them to a .csv file

I found this script on a forum but it hardly works . It extracts the first URL, but for the second URL, it's says #EANF# on notice...Thanks for your help :wink: (sorry my english is very low)

Code: Select all
VERSION BUILD=6650406 RECORDER=FX
TAB T=1
SET !ERRORIGNORE YES
SET !ERRORCONTINUE YES
SET !EXTRACT_TEST_POPUP NO
SET !TIMEOUT_STEP 1
URL GOTO=http://google.fr/search?q=seo
TAG POS=1 TYPE=H2 ATTR=CLASS:HD
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv


Windows 8, FF 45.0.1, imacros 8.9.6
Chafouin
 
Posts: 1
Joined: Sun Mar 20, 2016 11:15 am

Re: Extracting URL

by IrishMacro on Sun Mar 27, 2016 1:54 pm

Save the URL
ADD !EXTRACT {{!URLCURRENT}}.

I suggest you use this solution instead viewtopic.php?f=7&t=5330
Firefox free plugin, last version
Win7
IrishMacro
 
Posts: 135
Joined: Wed Nov 03, 2010 5:27 am

Re: Extracting URL

by chivracq on Sun Mar 27, 2016 6:58 pm

Chafouin wrote:
Code: Select all
Windows 8, FF 45.0.1, imacros 8.9.6

Hello everyone, I just start to use imacros and I encounter the first problem ...

I would like to extract the URLs of Google results. I want the URLs present on the Google page are extracted , and then go to the next page , etc. Then save them to a .csv file

I found this script on a forum but it hardly works . It extracts the first URL, but for the second URL, it's says #EANF# on notice...Thanks for your help :wink: (sorry my english is very low)

Code: Select all
VERSION BUILD=6650406 RECORDER=FX
TAB T=1
SET !ERRORIGNORE YES
SET !ERRORCONTINUE YES
SET !EXTRACT_TEST_POPUP NO
SET !TIMEOUT_STEP 1
URL GOTO=http://google.fr/search?q=seo
TAG POS=1 TYPE=H2 ATTR=CLASS:HD
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRACT FOLDER=* FILE=google-scraper.csv
TAG POS=R1 TYPE=A ATTR=* EXTRACT=HREF
TAG POS=R1 TYPE=SPAN ATTR=CLASS:ALTCTS
SAVEAS TYPE=EXTRAC2IrashT FOLDER=* FILE=google-scraper.csv


Windows 8, FF 45.0.1, imacros 8.9.6

Hum, welcome to the Forum, you mentioned your FCI and the Script and URL of the Site you are trying to do things with (Compliments, otherwise I wouldn't even react to your Thread....) , but pffff, your Script with v6.6.5 for FF is about 8-10 years old, so no wonder it doesn't really work any more, not from iMacros I would think..., but more from the Web-Site, I would think, but OK, willing to help you, but you haven't tried much to solve you Pb.... So, what have you tried to solve your Pb...!??

I don't completely get @IrishMacro's Solution, to be honest, but it's a bit late for me, I'm not completely sharp anymore... I'll need to check after a good night sleep, ah-ah...! He might be right, he belongs to the Top_10 Best Forum Answerers, I just didn't get it..., but I didn't really study your Script...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6477
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: Bing [Bot] and 3 guests

-->