tahirsatti
New Member
- Joined
- Jan 15, 2012
- Messages
- 6
At present i use below mentioned vba for amazon offer data extraction.
Above code is extracting complete page data but My requirement is to extract specific value not complete data.I want to extract only prices and in page prices are in this format.
<code>
<font color="#000080">
Please help to resolve this issue so that i will be able extract only
prices.I want to extract two values i.e $171.99 and Amazon Prime
TM.Please note that there are may multiple price and seller values in
one page and i want to extract all.
Thanks.[/I]</code>
Code:
<code>Sub Macro1()
'
' Macro1 Macro
'
'
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.amazon.com/gp/offer-listing/B00N41UTWG/ref=olp_f_new?ie=UTF8&f_new=true" _
, Destination:=Range("$A$1"))
.Name = "oldOfferPrice" _
' "its_details_value_node.html?nsc=true&listId=www_s201_b9233&tsId=BBK01.ED0439"
.FieldNames = True
.RowNumbers = True
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = True
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False End With End sub
</code>
Above code is extracting complete page data but My requirement is to extract specific value not complete data.I want to extract only prices and in page prices are in this format.
<code>
Code:
[/COLOR]</code><code><font color="#000080">"a-row a-spacing-mini olpOffer">
Code:
<font color="#000080"></code><code><font color="#000080">"a-column a-span2">
<font color="#000080">"a-size-large a-color-price olpOfferPrice a-text-bold"> $171.99 <font color="#000080">
<font color="#000080">"a-color-price">
<font color="#000080">"supersaver"><font color="#000080">[I]"a-icon a-icon-prime"[/I][I] aria-label="Amazon Prime TM"><font color="#000080">"a-icon-alt">Amazon Prime TM<font color="#000080"><font color="#000080"><font color="#000080">
<font color="#000080">
Please help to resolve this issue so that i will be able extract only
prices.I want to extract two values i.e $171.99 and Amazon Prime
TM.Please note that there are may multiple price and seller values in
one page and i want to extract all.
Thanks.[/I]</code>