Бесплатный парсер магазина Ann Taylor

Ann Taylor — американская сеть магазинов женской одежды. Ричард Либескинд открыл первый магазин Ann Taylor в 1954 году в Нью Хэвен, штат Коннектикут. Название магазина произошло от названия платья, которое было самым полулярным в магазине его отца. Этот парсер поможет вам собрать информацию о всех товарах, представленных на сайте anntaylor.com.

Примерное количество товаров: 2000
Примерное количество запросов: 4000
Рекомендуемый план подписки: Free

ВНИМАНИЕ! Количество запросов может превышать количество товаров, потому что данные о вариациях, изображениях и др. могут парсится используя запросы к дополнительным ресурсам. Также часть данных о товаре может доставляться с помощью XHR запросов, что также увеличивает общее количество необходимых запросов.

Для использования этого парсера вы должны иметь учетную запись в нашем сервисе Diggernaut.

  1. Пройдите по этой ссылке для регистрации в сервисе Diggernaut
  2. После регистрации и подтверждения email адреса войдите в свою учетную запись
  3. Создайте проект с любый именем и описанием, если вы не знаете как, обратитесь к нашей документации
  4. Войдите во вновь созданный проект и создайте в нем диггер с любым именем, если вы не знаете как, обратитесь к нашей документации
  5. Скопируйте в буфер обмена приведенный ниже сценарий диггера и вставьте его в созданный вами диггер, если вы не знаете как, обратитесь к нашей документации
  6. Переключите режим работы диггера с Debug на Active, если вы не знаете как, обратитесь к нашей документации
  7. Запустите ваш диггер и дождитесь окончания его работы, если вы не знаете как, обратитесь к нашей документации
  8. Скачайте собранный набор данных в нужном вам формате, если вы не знаете как, обратитесь к нашей документации

В дальнейшем вы можете установить расписание для запуска вашего парсера и забирать информацию регулярно.

Сценарий парсера:

---
config:
    debug: 2
do:
- pool_clear: pages
- walk:
    to: https://www.anntaylor.com
    do:
    - find:
        path: nav.sub-nav a
        do:
        - variable_clear: did
        - variable_set:
            field: viewsnum
            value: 0
        - parse:
            attr: data-id
        - variable_set: did
        - walk:
            to: https://www.anntaylor.com/ecws/endecaService.jsp?SortByFacetSelectedValue=remove&DocSortOrder=remove&format=json&catid=&question=&fRequest=true&goToPage=1&N=0&categoryType=regular&priceSort=DESC&country=US&currency=USD&Submit=Submit
            do:
            - find:
                path: resultslist>pagination>attributes>pagesavailable
                do:
                - parse
                - variable_set: viewsnum
                - eval:
                    routine: js
                    body: (function(){var num = ;var str = "";for(var i = num; i > 0; i--){if (i != num){str += ","}str += i} return "<div>"+str+"</div>";})();
                - to_block
                - split:
                    context: text
                    delimiter: ","
                - find:
                    path: div
                    do:
                    - variable_clear: pagenum
                    - parse
                    - variable_set: pagenum
                    - link_add:
                        url: https://www.anntaylor.com/ecws/endecaService.jsp?SortByFacetSelectedValue=remove&DocSortOrder=remove&format=json&catid=&question=&fRequest=true&goToPage=&N=0&categoryType=regular&priceSort=DESC&country=US&currency=USD&Submit=Submit
                        pool: catalog
- walk:
    to: links
    pool: catalog
    do:
    - find:
        path: resultslist>records>records>attributes>quicklookurl
        do:
        - parse:
            filter: ^([^\?]+)
        - normalize:
            routine: url
        - link_add:
            pool: pages
- walk:
    to: links
    pool: pages
    do:
    - sleep: 3
    - find:
        path: 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[itemprop="name"]
            do:
            - parse
            - space_dedupe
            - trim
            - object_field_set:
                object: product
                field: name
        - register_set: Ann Taylor
        - object_field_set:
            object: product
            field: brand
        - find:
            in: doc
            path: script:contains("window.productSettings = ")
            do:
            - parse:
                filter: window\.productSettings\s+=\s+(.+)\s*
            - normalize:
                routine: json2xml
            - to_block
            - find:
                path: body_safe>currency
                do:
                - parse
                - normalize:
                    routine: replace_matched
                    args:
                        \$: USD
                - object_field_set:
                    object: product
                    field: currency
            - find:
                path: body_safe>products>listprice
                do:
                - parse
                - object_field_set:
                    object: product
                    type: float
                    field: price
            - find:
                path: body_safe>prodid
                do:
                - parse
                - space_dedupe
                - trim
                - variable_set: pid
                - object_field_set:
                    object: product
                    field: sku
            - find:
                path: body_safe>products>skucolors>colors
                do:
                - find:
                    path: colorname
                    do:
                    - parse
                    - space_dedupe
                    - trim
                    - if:
                        match: \w+
                        do:
                        - object_field_set:
                            object: product
                            joinby: "|"
                            field: variations
            - walk:
                to: https://richmedia.channeladvisor.com/ViewerDelivery/productXmlService?profileid=52000652&itemid=&viewerid=196
                do:
                - find:
                    path: img
                    do:
                    - parse:
                        attr: path
                    - normalize:
                        routine: replace_substring
                        args:
                            \&recipeId\=\d+: ''
                    - object_field_set:
                        object: product
                        joinby: "|"
                        field: images
            - find:
                path: body_safe>products>weblongdescription
                do:
                - parse
                - space_dedupe
                - trim
                - object_field_set:
                    object: product
                    field: description
            - find:
                path: body_safe>products>parentcategoryname
                do:
                - parse
                - space_dedupe
                - trim
                - if:
                    match: \w+
                    do:
                    - object_field_set:
                        object: product
                        joinby: "|"
                        field: category
        - object_save:
            name: product

Ниже приведен пример датасета с несколькими товарами в формате JSON (для наглядности). Датасет может быть скачан и как CSV, XLSX, XML, и любой другой текстовый формат используя темплейтный подход.

[{
    "product": {
        "brand": "Ann Taylor",
        "category": "Online Exclusives",
        "currency": "USD",
        "date": "2017-12-05T18:49:19.687Z",
        "description": "Our longest shorts always step things up in style. Refined in crisp cotton, this essential pair has a touch of stretch for an endlessly flattering fit. Contoured waistband. Front zip with double hook-and-bar closure. Belt loops. Front off-seam pockets. Back welt pockets. Side slits. 11” inseam.",
        "images": "https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1143755|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1143755|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1158580|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1158580|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1137187|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1137187|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1137183|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1137183|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1137185|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1137185",
        "name": "Walking Shorts",
        "price": 49,
        "sku": "455672",
        "url": "https://www.anntaylor.com/walking-shorts/455672",
        "variations": "Atlantic Navy|Coastal Beige"
    }
}
,{
    "product": {
        "brand": "Ann Taylor",
        "category": "Jewelry",
        "currency": "USD",
        "date": "2017-12-05T18:49:25.022Z",
        "description": "A gleaming round pendant and adjustable cord necklace make this modern accessory shine. 34" length adjustable cord necklace; 2" pendant.",
        "images": "https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1149247|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1149247|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1148837|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1148837",
        "name": "Circle Pendant Cord Necklace",
        "price": 39.5,
        "sku": "464472",
        "url": "https://www.anntaylor.com/circle-pendant-cord-necklace/464472",
        "variations": "Gold"
    }
}
,{
    "product": {
        "brand": "Ann Taylor",
        "category": "Jewelry",
        "currency": "USD",
        "date": "2017-12-05T18:49:29.062Z",
        "description": "This stellar pair stars a linear drop of polished stones that takes your look to the next level. French wire. 2" drop.",
        "images": "https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1143771|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1143771|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1158888|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1158888",
        "name": "Stellar Linear Drop Earrings",
        "price": 39.5,
        "sku": "459484",
        "url": "https://www.anntaylor.com/stellar-linear-drop-earrings/459484",
        "variations": "Frosted Pink"
    }
}
,{
    "product": {
        "brand": "Ann Taylor",
        "category": "Jewelry",
        "currency": "USD",
        "date": "2017-12-05T18:49:33.292Z",
        "description": "Make the rounds with this glossy bead necklace, polished off with sparkling pave accents. Lobster claw closure. 30" length with 2" extender.",
        "images": "https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1143739|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1143739|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1158885|https://richmedia.channeladvisor.com/ImageDelivery/imageService?profileId=52000652&id=1158885",
        "name": "Beaded Necklace",
        "price": 39.5,
        "sku": "448996",
        "url": "https://www.anntaylor.com/beaded-necklace/448996",
        "variations": "Black"
    }
}]
Михаил Сисин: Со-основатель облачного сервиса по сбору информации и парсингу сайтов Diggernaut. Работает в области сбора и анализа данных, а также разработки систем искусственного интеллекта и машинного обучения  более десяти лет.
Related Post

This website uses cookies.