Nuwan Srimal
Nuwan Srimal

Reputation: 23

Extract the contents from ul tag in to an excel file

I have this web site and I want to extract the following:

http://www.ipmart.com.my/main/product/BlackBerry_Porsche_Design_P_9982_Silver_BlackBerry_Warranty_454805.php?prod=454805

image from the website, the heading, the decription and the specification and the package content.

I tired the following lines but it extracts the wrong info

TAG POS=1 TYPE=A ATTR=div:productDetailUl EXTRACT=TXT TAG POS=1 TYPE=H1 ATTR=TXT:* EXTRACT=TXT

Can anyone help me out with this? Thank you. Nuwan.

Upvotes: 1

Views: 952

Answers (1)

gjchandler
gjchandler

Reputation: 38

I would try using XPATH to extract the correct information.

It's easiest to grab the xpath with Chrome:

  1. Right click on what you want to extract
  2. Click "inspect element"
  3. Right click on the highlighted line of code within the inspection tool (you may have to adjust this, but you basically want to grab the element closest to what information you're trying to extract. It's usually pretty good, but may take a little work.)
  4. Click "Copy Xpath"

Within your iMacros script, use: TAG XPATH="paste your xpath between these quotes" EXTRACT=TXT

I would use iMacros for Firefox for this, as it seems to bug out a little less.

Upvotes: 0

Related Questions