python - Trouble extracting XPath element from eBay - for Scrapy project -
edit: realised logged in ebay on pc displaying different layout server running scrapy.
i'm working on project using scrapy 0.18(python 2.6.6) scrape product listing information ebay.
i've been able extract elements fine except shipping price, i've tried many different xpath variants in scrapy shell , can't extract information , can't figure out why. used xpath chrome extension grab element's xpath sure , still can't information.
i'm trying extract postage cost displayed below buy button(displays free if it's set free shipping), i'll show example listing , xpath element below.
example listing: http://www.ebay.com.au/itm/apple-ipad-4-4th-generation-32gb-wi-fi-cellular-4g-black-ausluck-/151029092728?pt=au_tablets&hash=item232a091178&_uhb=1
xpath i'm using: //html/body/div[@id='body']/div[@id='centerpaneldf']/div[@id='centerpanel']/div[@id='centerpanelinternal']/div[@id='leftsummarypanel']/div[@class='is ']/form/div[@id='shippingsummary']/div[3]/div[@class='u-fll sh-col']/span[@id='shsummary']/span[@id='fshippingcost']/span
i'm missing obvious, i'm new python/xpath/scrapy. if can educate me on i'm doing wrong i'd appreciate it.
kind regards
i have no idea scrapy, having never used before. use selenium lot , 1 way find element : //span[@id = 'fshippingcost']. on firebug xpath checker found element alright.
Comments
Post a Comment