Mikhail Sisin Co-founder of cloud-based web scraping and data extraction platform Diggernaut. Over 10 years of experience in data extraction, ETL, AI, and ML.

Scraping products, prices and images from chanel.com

7 min read

Scraping products, prices and images from chanel.com

Our cloud web scraping platform Diggernaut can help you with scraping products, prices, and images from the chanel.com online store. You can use scraper listed in this article. The company Chanel was founded in the early twentieth century by fashion designer Coco Chanel. The first boutique was opened in 1910 in Paris. In 1924 the company launched the production of perfumes. At the moment, Chanel specializes in the production and sale of clothing, luxury goods, perfumes, and cosmetics.

Approx number of goods: 1000
Approx number of page requests: 1000
Recommended subscription plan: Free

PLEASE NOTE! The number of requests can exceed the number of products because data about variations, images, etc. can be scraped from other resources and spend additional requests. Also, part of the product data can be delivered using XHR requests, which also increases the total number of required page requests.

How to use the web scraper to extract data about goods and prices from chanel.com

To use the web scraper for Chanel store website, you must have an account with our Diggernaut service. You can follow this comprehensive guide:

  1. Go through this registration link to open free account with Diggernaut
  2. After registering and confirming the email address, you will need to log in to your account
  3. Create a project with any name and description, if you do not know how to do it, please refer to our documentation
  4. Switch to the created project and create a digger with any name, if you do not know how to do it, please refer to our documentation
  5. Copy the following digger configuration to the clipboard and paste it into the digger you created, if you do not know how to do it, refer to our documentation
  6. Switch the mode of the digger from Debug to Active, if you do not know how to do it, please refer to our documentation
  7. Run your digger and wait until the completion, if you do not know how to do it, please refer to our documentation
  8. Download the scraped dataset in the format you need, if you do not know how to do it, please refer to our documentation

You can also setup a schedule for running your scraper and collect data regularly.

Scraping configuration for the digger

---
config:
    debug: 2
    agent: Firefox
do:
- link_add:
    pool: beauty
    url:
    - https://www.chanel.com/en_US/fragrance-beauty/fragrance-beauty-skincare-140910
- walk:
    to: links
    pool: beauty
    do:
    - find:
        path: a.product-link
        do:
        - parse:
            attr: href
        - if:
            match: \w+
            do:
            - normalize:
                routine: url
            - link_add:
                pool: beauty
    - find:
        path: a:haschild(div.top_header[role="button"])
        do:
        - parse:
            attr: href
        - if:
            match: \w+
            do:
            - normalize:
                routine: url
            - link_add:
                pool: beauty
    - find:
        path: form.product_container ul.unstyled>li.img>a
        do:
        - parse:
            attr: href
        - if:
            match: \w+
            do:
            - normalize:
                routine: url
            - link_add:
                pool: beautypages
- walk:
    to: links
    pool: beautypages
    do:
    - sleep: 2
    - find:
        path: 'div#contentContainer'
        do:
        - object_new: product
        - eval:
            routine: js
            body: '(function (){var d = new Date(); return d.toISOString()})();'
        - object_field_set:
            object: product
            field: date
        - static_get: url
        - object_field_set:
            object: product
            field: url
        - find:
            path: h1[itemprop="name"]
            do:
            - parse
            - space_dedupe
            - trim
            - if:
                match: \w+
                do:
                - object_field_set:
                    object: product
                    field: name
        - find:
            path: div.cc-sku-selector-dropdown select>option
            slice: 0
            do:
            - parse:
                attr: value
            - space_dedupe
            - trim
            - if:
                match: \w+
                do:
                - object_field_set:
                    object: product
                    field: sku
        - register_set: Chanel
        - object_field_set:
            object: product
            field: brand
        - find:
            path: div.cc-product-options-price
            do:
            - find:
                path: span[itemprop="priceCurrency"]
                do:
                - parse:
                    attr: content
                - space_dedupe
                - trim
                - object_field_set:
                    object: product
                    field: currency
            - find:
                path: span[itemprop="price"]
                do:
                - parse:
                    filter: (\d+\.\d+)
                - space_dedupe
                - trim
                - object_field_set:
                    object: product
                    type: float
                    field: price
        - find:
            path: div.cc-sku-selector-dropdown select>option
            do:
            - parse
            - space_dedupe
            - trim
            - if:
                match: \w{2,}
                do:
                - object_field_set:
                    object: product
                    joinby: "|"
                    field: variations
        - find:
            in: doc
            path: script:contains('window.__CC_STATE__')
            do:
            - parse:
                filter: window\.__CC_STATE__\s*\=\s*(.+)\;
            - normalize:
                routine: json2xml
            - to_block
            - find:
                path: images src
                do:
                - parse
                - if:
                    match: \w+
                    do:
                    - normalize:
                        routine: url
                    - object_field_set:
                        object: product
                        joinby: "|"
                        field: images
            - find:
                path: product>description
                slice: 0
                do:
                - parse
                - to_block
                - find:
                    path: p
                    slice: 1
                    do:
                    - parse
                    - space_dedupe
                    - trim
                    - if:
                        match: \w+
                        do:
                        - object_field_set:
                            object: product
                            field: description
        - find:
            path: span.breadcrumb>a
            do:
            - parse
            - space_dedupe
            - trim
            - if:
                match: \w{2,}
                do:
                - object_field_set:
                    object: product
                    joinby: "|"
                    field: categories
        - object_save:
            name: product
- link_add:
    pool: sun
    url:
    - https://www.chanel.com/en_US/fashion/sunglasses/products/
- walk:
    to: links
    pool: sun
    do:
    - find:
        path: a.ui-pagination-next
        do:
        - parse:
            attr: href
        - if:
            match: \w+
            do:
            - normalize:
                routine: url
            - link_add:
                pool: sun
    - find:
        path: ul.product-list>li
        do:
        - find:
            path: li.item
            slice: 0
            do:
            - find:
                path: a
                do:
                - parse:
                    attr: href
                - if:
                    match: \w+
                    do:
                    - normalize:
                        routine: url
                    - link_add:
                        pool: sunpages
- walk:
    to: links
    pool: sunpages
    do:
    - sleep: 2
    - find:
        path: main[role="main"]
        do:
        - variable_clear: pid
        - object_new: product
        - eval:
            routine: js
            body: '(function (){var d = new Date(); return d.toISOString()})();'
        - object_field_set:
            object: product
            field: date
        - static_get: url
        - object_field_set:
            object: product
            field: url
        - find:
            path: h1.tt-1
            do:
            - parse
            - space_dedupe
            - trim
            - if:
                match: \w+
                do:
                - object_field_set:
                    object: product
                    field: name
        - find:
            path: input[name="pdt-sku"]
            do:
            - parse:
                attr: value
            - space_dedupe
            - trim
            - if:
                match: \w+
                do:
                - variable_set: pid
                - object_field_set:
                    object: product
                    field: sku
        - register_set: Chanel
        - object_field_set:
            object: product
            field: brand
        - find:
            path: span[property="price"]
            do:
            - parse:
                filter: (\d+)
            - object_field_set:
                object: product
                type: float
                field: price
            - parse
            - normalize:
                routine: replace_matched
                args:
                    \$: USD
            - object_field_set:
                object: product
                field: currency
        - find:
            path: select[data-select="pdt-color"]>option
            do:
            - parse
            - space_dedupe
            - trim
            - if:
                match: \w{2,}
                do:
                - object_field_set:
                    object: product
                    joinby: "|"
                    field: variations
        - find:
            in: doc
            path: meta[name="description"]
            do:
            - parse:
                attr: content
            - space_dedupe
            - trim
            - if:
                match: \w+
                do:
                - object_field_set:
                    object: product
                    field: description
        - find:
            path: div.breadcrumb>a
            slice: 1:-2
            do:
            - parse
            - space_dedupe
            - trim
            - if:
                match: \w{2,}
                do:
                - object_field_set:
                    object: product
                    joinby: "|"
                    field: categories
        - walk:
            to: https://www.chanel.com/en_US/fashion/sunglasses/pdpjson/<%pid%>/product
            do:
            - find:
                path: script
                do:
                - parse
                - normalize:
                    routine: replace_substring
                    args:
                        ^window\.: ''
                - to_block
                - parse
                - eval:
                    routine: js
                    body: (function () {var <%register%>; return JSON.stringify(product);})();
                - normalize:
                    routine: json2xml
                - to_block
                - find:
                    path: zoom
                    do:
                    - parse:
                        filter: ^(\S+)
                    - if:
                        match: \w+
                        do:
                        - normalize:
                            routine: url
                        - object_field_set:
                            object: product
                            joinby: "|"
                            field: images
        - object_save:
            name: product
- link_add:
    url:
    - https://www.chanel.com/en_US/watches-jewelry/fine-jewelry/collections
    - https://www.chanel.com/en_US/watches-jewelry/watches/collections
- walk:
    to: links
    do:
    - find:
        path: div.product-item-wrapper>a
        do:
        - parse:
            attr: href
        - register_set: <%register%>?show=All
        - walk:
            to: value
            do:
            - find:
                path: div.product-item-wrapper>a
                do:
                - parse:
                    attr: href
                - if:
                    match: \w+
                    do:
                    - normalize:
                        routine: url
                    - link_add:
                        pool: pages
- walk:
    to: links
    pool: pages
    do:
    - sleep: 2
    - find:
        path: 'main#page-content'
        do:
        - variable_clear: pid
        - object_new: product
        - eval:
            routine: js
            body: '(function (){var d = new Date(); return d.toISOString()})();'
        - object_field_set:
            object: product
            field: date
        - static_get: url
        - object_field_set:
            object: product
            field: url
        - find:
            path: dl>dt:contains("Name:")+dd
            do:
            - parse
            - space_dedupe
            - trim
            - if:
                match: \w+
                do:
                - object_field_set:
                    object: product
                    field: name
        - find:
            path: dl>dt:contains("Reference:")+dd
            do:
            - parse
            - space_dedupe
            - trim
            - if:
                match: \w+
                do:
                - variable_set: pid
                - object_field_set:
                    object: product
                    field: sku
        - register_set: Chanel
        - object_field_set:
            object: product
            field: brand
        - find:
            path: product_price
            do:
            - parse
            - object_field_set:
                object: product
                type: float
                field: price
            - register_set: USD
            - object_field_set:
                object: product
                field: currency
        - find:
            in: doc
            path: meta[name="description"]
            do:
            - parse:
                attr: content
            - space_dedupe
            - trim
            - if:
                match: \w+
                do:
                - object_field_set:
                    object: product
                    field: description
        - find:
            path: 'nav#breadcrumb>ul>li:not(.visually-hidden)>a'
            slice: 1:-1
            do:
            - parse
            - space_dedupe
            - trim
            - if:
                match: \w{2,}
                do:
                - object_field_set:
                    object: product
                    joinby: "|"
                    field: categories
        - find:
            path: div.product-images figure>a
            do:
            - parse:
                attr: href
            - space_dedupe
            - trim
            - if:
                match: \w{2,}
                do:
                - normalize:
                    routine: url
                - object_field_set:
                    object: product
                    joinby: "|"
                    field: images
        - object_save:
            name: product

Sample of scraped data

Below is a sample of a dataset with several products in JSON format (so you can easily review it and see data structure). The dataset can be downloaded as CSV, XLSX, XML, or any other text format using the templates.

[{
    "product": {
        "brand": "Chanel",
        "categories": "Fragrance|Women|Allure Sensuelle",
        "currency": "USD",
        "date": "2017-12-27T12:44:54.948Z",
        "description": "Like the charismatic, passionate presence of Gabrielle Chanel, ALLURE SENSUELLE is the modern, magnetic fragrance of a true, radiant and intense woman. The floral-soft-Oriental fragrance is revealed in a unique way on every woman — because each woman has her own special allure.",
        "images": "https://www.chanel.com/en_US/fragrance-beauty/cms2export/Site1Files/P129710/S129710_XLARGE.jpg|https://www.chanel.com/en_US/fragrance-beauty/cms2export/Site1Files/P129710/S129720_XLARGE.jpg|https://www.chanel.com/en_US/fragrance-beauty/cms2export/Site1Files/P129710/S129730_XLARGE.jpg",
        "name": "ALLURE SENSUELLE EAU DE PARFUM SPRAY",
        "price": 130,
        "sku": "88316",
        "url": "https://www.chanel.com/en_US/fragrance-beauty/fragrance-allure-sensuelle-allure-sensuelle-88314",
        "variations": "3.4 FL. OZ.|1.7 FL. OZ.|1.2 FL. OZ."
    }
}
,{
    "product": {
        "brand": "Chanel",
        "categories": "Makeup|Lips|Lipstick",
        "currency": "USD",
        "date": "2017-12-27T12:45:00.308Z",
        "description": "The intensity of a lipstick, the shine of a lipgloss and the comfort of a lip balm — all in one creamy yet lightweight formula.",
        "images": "https://www.chanel.com/en_US/fragrance-beauty/cms2export/Site1Files/P170202/S170202_XLARGE.jpg|https://www.chanel.com/en_US/fragrance-beauty/cms2export/Site1Files/P170202/S170206_XLARGE.jpg|https://www.chanel.com/en_US/fragrance-beauty/cms2export/Site1Files/P170202/S170208_XLARGE.jpg|https://www.chanel.com/en_US/fragrance-beauty/cms2export/Site1Files/P170202/S170212_XLARGE.jpg|https://www.chanel.com/en_US/fragrance-beauty/cms2export/Site1Files/P170202/S170214_XLARGE.jpg|https://www.chanel.com/en_US/fragrance-beauty/cms2export/Site1Files/P170202/S170216_XLARGE.jpg|https://www.chanel.com/en_US/fragrance-beauty/cms2export/Site1Files/P170202/S170218_XLARGE.jpg|https://www.chanel.com/en_US/fragrance-beauty/cms2export/Site1Files/P170202/S170217_XLARGE.jpg|https://www.chanel.com/en_US/fragrance-beauty/cms2export/Site1Files/P170202/S170222_XLARGE.jpg|https://www.chanel.com/en_US/fragrance-beauty/cms2export/Site1Files/P170202/S170224_XLARGE.jpg|https://www.chanel.com/en_US/fragrance-beauty/cms2export/Site1Files/P170202/S170227_XLARGE.jpg",
        "name": "ROUGE COCO STYLO COMPLETE CARE LIPSHINE",
        "price": 37,
        "sku": "141754",
        "url": "https://www.chanel.com/en_US/fragrance-beauty/makeup-lipstick-rouge-coco-stylo-140392",
        "variations": "217 PANORAMA - Limited Edition|218 SCRIPT|216 LETTRE|202 CONTE|227 ESQUISSE - Limited Edition|222 FICTION|206 HISTOIRE|208 ROMAN|214 MESSAGE|224 MÉMOIRE|212 RECIT"
    }
}
,{
    "product": {
        "brand": "Chanel",
        "categories": "Skincare|BY CATEGORY|Sun Protection",
        "currency": "USD",
        "date": "2017-12-27T12:45:04.800Z",
        "description": "A breakthrough daily sunscreen that features an adaptive skincare technology for tailor-made defense from UVA and UVB rays, free radicals and pollution.",
        "images": "https://www.chanel.com/en_US/fragrance-beauty/cms2export/Site1Files/P141836/S141836_XLARGE.jpg",
        "name": "UV ESSENTIEL Multi-Protection Daily Defense Sunscreen Anti-Pollution Broad Spectrum SPF 30",
        "price": 55,
        "sku": "140249",
        "url": "https://www.chanel.com/en_US/fragrance-beauty/skincare-sun-protection-uv-essentiel-140248",
        "variations": "1 FL. OZ."
    }
}
,{
    "product": {
        "brand": "Chanel",
        "categories": "Makeup|Eyes|Mascara",
        "currency": "USD",
        "date": "2017-12-27T12:45:09.444Z",
        "description": "A high-precision waterproof mascara that achieves instant volume and intense colour in a single stroke.",
        "images": "https://www.chanel.com/en_US/fragrance-beauty/cms2export/Site1Files/P194210/S194210_XLARGE.jpg|https://www.chanel.com/en_US/fragrance-beauty/cms2export/Site1Files/P194210/S194220_XLARGE.jpg",
        "name": "LE VOLUME DE CHANEL WATERPROOF MASCARA",
        "price": 32,
        "sku": "139065",
        "url": "https://www.chanel.com/en_US/fragrance-beauty/makeup-mascara-le-volume-de-chanel-waterproof-139064",
        "variations": "10 NOIR|20 BRUN"
    }
}]
Mikhail Sisin Co-founder of cloud-based web scraping and data extraction platform Diggernaut. Over 10 years of experience in data extraction, ETL, AI, and ML.

Leave a Reply

Your email address will not be published. Required fields are marked *