Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "start_urls": [
- "https://www.walmart.ca/search?q=silk&c=10019",
- "https://www.walmart.ca/search?q=danone&c=10019",
- "https://www.walmart.ca/search?q=oikos&c=10019",
- "https://www.walmart.ca/search?q=activia&c=10019",
- "https://www.walmart.ca/search?q=international+delight&c=10019"
- ],
- "fields": {
- "name": "//h1[@data-automation='product-title']/text()",
- "price": "",
- "reference": "",
- "image": "//meta[@property='og:image']/@content",
- "description": "//script[contains(.,'longDescription')]/text()",
- "brand": "",
- "brand_text": "//span[@data-automation='brand']/a/text()",
- "categories": "(//ol[@data-automation='desktop-breadcrumbs']/li/a[@target='_self'])[position()>1]/text()",
- "rating_average": "",
- "rating_count": "",
- "barcode": "",
- "stock": "",
- "sku": "substring-before(substring-after(//script[@type='application/ld+json' and contains(text(), '\"@type\":\"Product\"')]/text(), 'sku\":\"'), '\",')"
- },
- "json_fields": {
- "price": "$.*.online[0].maxCurrentPrice",
- "price_old": "$.*.online[0].maxRegularPrice",
- "availability": "$.*.online[0].status",
- "seller": "$.*.online[0].sellerName"
- },
- "links": {
- "detail": "//a[@class='product-link']",
- "next_page": "//div[@id='shelf-pagination']//a[@id='loadmore']"
- },
- "regex": {
- "description": ["longDescription\\\":\\\"(.*?)\\\"", 1]
- },
- "parser_modules": [
- "walmart_single_item"
- ],
- "pipelines": {
- "AvailabilityPipeline": {
- "forced_false": "NotSold"
- }
- },
- "list": {
- "product": "//article[contains(@class, 'product')]",
- "page": "//ul[@class='page-select-list']/li[contains(@class,'selected')]/a/text()"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment