{"id":362,"date":"2018-02-10T00:11:54","date_gmt":"2018-02-10T00:11:54","guid":{"rendered":"https:\/\/www.diggernaut.com\/blog\/?p=362"},"modified":"2019-01-12T16:41:31","modified_gmt":"2019-01-12T16:41:31","slug":"scrape-data-fashion-stores-diggernaut-betsey-johnson","status":"publish","type":"post","link":"https:\/\/www.diggernaut.com\/blog\/scrape-data-fashion-stores-diggernaut-betsey-johnson\/","title":{"rendered":"Scrape data from fashion stores with Diggernaut: Betsey Johnson"},"content":{"rendered":"<p>Betsey Johnson is an American fashion designer, easily recognizable in the fashion world with her quirky designs for women. In her online store you can find clothes, shoes, accessories and jewelry. We are publishing digger configurations that will help you to scrape data from fashion stores and this scraper extracts data from the betseyjohnson.com online store.<\/p>\n<p><strong>Approx number of goods:<\/strong> 1000<br>\n<strong>Approx number of page requests<\/strong> 7000<br>\n<strong>Recommended subscription plan:<\/strong> X-Small<\/p>\n<p><strong>PLEASE NOTE!<\/strong> The number of requests can exceed the number of products, because data about variations, images, etc. can be scraped from other resources and will require additional requests. Also part of the product data can be delivered using XHR requests, which also increases the total number of required page requests.<\/p>\n<h3>How to use the web scraper to extract data about goods and prices from betseyjohnson.com<\/h3>\n<p>To use the web scraper for Betsey Johnson store&#8217;s website, you must have an account with our Diggernaut service. You can just simply follow this comprehensive guide:<\/p>\n<ol>\n<li>Go through this <a href=\"https:\/\/www.diggernaut.com\/accounts\/signup\/\">registration link<\/a> to open free account with <a href=\"https:\/\/www.diggernaut.com\">Diggernaut<\/a><\/li>\n<li>After registering and confirming the email address, you will need to <a href=\"https:\/\/www.diggernaut.com\/accounts\/login\/\">log in to your account<\/a><\/li>\n<li>Create a project with any name and description, if you do not know how to do it, please refer to our <a href=\"https:\/\/www.diggernaut.com\/dev\/website-projects-create-new-project.html\">documentation<\/a><\/li>\n<li>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 <a href=\"https:\/\/www.diggernaut.com\/dev\/website-projects-create-new-digger.html\">documentation<\/a><\/li>\n<li>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 <a href=\"https:\/\/www.diggernaut.com\/dev\/website-projects-digger-config.html\">documentation<\/a><\/li>\n<li>Switch the mode of the digger from Debug to Active, if you do not know how to do it, please refer to our <a href=\"https:\/\/www.diggernaut.com\/dev\/website-projects-edit-digger.html\">documentation<\/a><\/li>\n<li>Run your digger and wait until the completion, if you do not know how to do it, please refer to our <a href=\"https:\/\/www.diggernaut.com\/dev\/website-projects-run-digger.html\">documentation<\/a><\/li>\n<li>Download the scraped dataset in the format you need, if you do not know how to do it, please refer to our <a href=\"https:\/\/www.diggernaut.com\/dev\/website-projects-scraped-data.html\">documentation<\/a><\/li>\n<\/ol>\n<p>You can also setup a schedule for running your scraper and collect data regularly.<\/p>\n<h3>Scraping configuration for the digger<\/h3>\n<pre class=\"language-yaml line-numbers\"><code class=\"language-yaml\">---\nconfig:\n    debug: 2\n    agent: Firefox\ndo:\n- walk:\n    to: http:\/\/www.betseyjohnson.com\/\n    do:\n    - find: \n        path: .off &gt; a \n        do: \n        - parse:\n            attr: href\n        - normalize:\n            routine: replace_substring\n            args:\n                &#039;\\s*#&#039;: &#039;&#039;\n\n        - normalize:\n            routine: url\n        - link_add:\n            pool: main\n- walk:\n    to: links\n    pool: main\n    do:\n    - find: \n        path: .categoryNav a\n        do: \n        - parse:\n            attr: href\n        - walk:\n            to: value\n            do:\n            - find: \n                path: .viewAll \n                do: \n                - parse:\n                    attr: data-href\n                - normalize:\n                    routine: url\n                - walk:\n                    to: value\n                    do:\n                    - find: \n                        path: .mainImage \n                        do: \n                        - parse:\n                            attr: href\n                            filter: \n                                - (.+)\\?\n                                - (.+)\n                        - normalize:\n                            routine: url\n                        - link_add:\n                            pool: sub\n            - find: \n                path: .mainImage \n                do: \n                - parse:\n                    attr: href\n                    filter: \n                        - (.+)\\?\n                        - (.+)\n                - normalize:\n                    routine: url\n                - link_add:\n                    pool: sub\n- walk:\n    to: links\n    pool: sub\n    do:\n    - object_new: product\n    - find: \n        in: doc\n        path: head \n        do: \n        - eval:\n            routine: js\n            body: &#039;(function (){var d = new Date(); return d.toISOString()})();&#039;\n        - object_field_set:\n            object: product\n            field: date\n        - static_get: url\n        - object_field_set:\n            object: product\n            field: url\n    - find: \n        path: &#039;meta[itemprop=&quot;productID&quot;]&#039;\n        do: \n        - parse:\n            attr: content\n        - space_dedupe\n        - trim\n        - object_field_set:\n            object: product\n            field: sku\n    - find: \n        path: .breadcrumb a \n        do: \n        - parse\n        - space_dedupe\n        - trim\n        - normalize:\n            routine: lower\n        - object_field_set:\n            object: product\n            field: category\n            joinby: &quot;|&quot;\n    - find: \n        path: &#039;select.COLOR_NAME &gt; option&#039;\n        do: \n        - parse:\n            attr: value\n        - space_dedupe\n        - trim\n        - if:\n            match: (\\S)\n            do:\n            - object_field_set:\n                object: product\n                field: variations\n                joinby: &quot;|&quot;\n    - find: \n        path: .item-name \n        do: \n        - parse\n        - space_dedupe\n        - trim\n        - object_field_set:\n            object: product\n            field: name\n    - find: \n        path: .productPrice \n        do: \n        - parse:\n            filter:\n                - ^\\s*\\$\\s*(\\d+\\.?\\d*)\n        - if:\n            match: (\\d+)\n            do:\n            - object_field_set:\n                object: product\n                field: price\n                type: float\n            - register_set: USD\n            - object_field_set:\n                object: product\n                field: currency\n    - find: \n        path: script:matches(variantMatrices)\n        do: \n        - parse:\n            filter: \n                - \\\/\\\/var\\s*thumbsAndStuff\\s*=\\s*(.+);\\s* \n        - normalize:\n            routine: json2xml\n        - to_block\n        - find:\n            path: alts\n            do:\n            - parse\n            - walk:\n                to: http:\/\/www.betseyjohnson.com\/scene7_proxy.jsp?cb=&amp;req=set,json,utf-8&amp;id=\n                do:\n                - find:\n                    path: body\n                    do:\n                    - parse\n                    - normalize:\n                        routine: replace_substring\n                        args:\n                            - \\\/\\*jsonp\\*\\\/\\s*: &#039;&#039;\n                            - s7jsonResponse\\(: &#039;&#039;\n                            - \\}\\}\\}\\,\\&quot;\\&quot;\\)\\;: &#039;}}}&#039;\n                    - normalize:\n                        routine: unescape_html\n                    - normalize:\n                        routine: json2xml\n                    - to_block\n                    - find: \n                        path: item &gt; i &gt; n \n                        do: \n                        - parse\n                        - register_set: http:\/\/s7d9.scene7.com\/is\/image\/?scl=1\n                        - object_field_set:\n                            object: product\n                            field: images\n                            joinby: &quot;|&quot;\n    - find: \n        path: .detailsWrap &gt; p\n        do: \n        - parse\n        - space_dedupe\n        - trim\n        - object_field_set:\n            object: product\n            field: description\n    - find: \n        path: meta[itemprop=&quot;brand&quot;] \n        do: \n        - parse:\n            attr: content\n        - space_dedupe\n        - trim\n        - object_field_set:\n            object: product\n            field: brand\n    - object_save:\n        name: product<\/code><\/pre>\n<h3>Sample of scraped data<\/h3>\n<p>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.<\/p>\n<pre><code class=\"language-js\">[{\n    &quot;product&quot;: {\n        &quot;brand&quot;: &quot;Betsey Johnson&quot;,\n        &quot;category&quot;: &quot;accessories|all accessories|gifty goodies&quot;,\n        &quot;currency&quot;: &quot;USD&quot;,\n        &quot;date&quot;: &quot;2017-12-07T18:45:38.519Z&quot;,\n        &quot;description&quot;: &quot;This pen is an extra special gift. Its candy-hued coloring gets extra girly flair with a soft, feathery accent.&quot;,\n        &quot;images&quot;: &quot;http:\/\/s7d9.scene7.com\/is\/image\/BetseyJohnson\/HOLIDAY-GIVING-BUNNY-PEN_PINK?scl=1|http:\/\/s7d9.scene7.com\/is\/image\/BetseyJohnson\/HOLIDAY-GIVING-BUNNY-PEN_PINK_PACKAGED?scl=1&quot;,\n        &quot;name&quot;: &quot;HOLIDAY GIVING BUNNY PEN&quot;,\n        &quot;price&quot;: 35,\n        &quot;sku&quot;: &quot;247714&quot;,\n        &quot;url&quot;: &quot;https:\/\/www.betseyjohnson.com\/product\/HOLIDAY-GIVING-BUNNY-PEN\/247714.uts&quot;,\n        &quot;variations&quot;: &quot;PINK&quot;\n    }\n}\n,{\n    &quot;product&quot;: {\n        &quot;brand&quot;: &quot;Betsey Johnson&quot;,\n        &quot;category&quot;: &quot;accessories|all accessories|gifty goodies&quot;,\n        &quot;currency&quot;: &quot;USD&quot;,\n        &quot;date&quot;: &quot;2017-12-07T18:45:40.633Z&quot;,\n        &quot;description&quot;: &quot;This black cat pen will bring your favorite friend some good luck! Its colorful, oil slick surface is topped off by a feathery black cat embellishment.&quot;,\n        &quot;images&quot;: &quot;http:\/\/s7d9.scene7.com\/is\/image\/BetseyJohnson\/HOLIDAY-GIVING-BLACK-CAT-PEN_BLACK?scl=1|http:\/\/s7d9.scene7.com\/is\/image\/BetseyJohnson\/HOLIDAY-GIVING-BLACK-CAT-PEN_BLACK_PACKAGED?scl=1&quot;,\n        &quot;name&quot;: &quot;HOLIDAY GIVING BLACK CAT PEN&quot;,\n        &quot;price&quot;: 35,\n        &quot;sku&quot;: &quot;247715&quot;,\n        &quot;url&quot;: &quot;https:\/\/www.betseyjohnson.com\/product\/HOLIDAY-GIVING-BLACK-CAT-PEN\/247715.uts&quot;,\n        &quot;variations&quot;: &quot;BLACK&quot;\n    }\n}\n,{\n    &quot;product&quot;: {\n        &quot;brand&quot;: &quot;Betsey Johnson&quot;,\n        &quot;category&quot;: &quot;accessories|all accessories|gifty goodies&quot;,\n        &quot;currency&quot;: &quot;USD&quot;,\n        &quot;date&quot;: &quot;2017-12-07T18:45:41.840Z&quot;,\n        &quot;description&quot;: &quot;This colorful parrot pen is the perfect way to add some color to the holiday season! Its pastel surface is accented by a vivid feather plump on an opal parrot.&quot;,\n        &quot;images&quot;: &quot;http:\/\/s7d9.scene7.com\/is\/image\/BetseyJohnson\/HOLIDAY-GIVING-PARROT-PEN_MULTI?scl=1|http:\/\/s7d9.scene7.com\/is\/image\/BetseyJohnson\/HOLIDAY-GIVING-PARROT-PEN_MULTI_PACKAGING?scl=1&quot;,\n        &quot;name&quot;: &quot;HOLIDAY GIVING PARROT PEN&quot;,\n        &quot;price&quot;: 35,\n        &quot;sku&quot;: &quot;247716&quot;,\n        &quot;url&quot;: &quot;https:\/\/www.betseyjohnson.com\/product\/HOLIDAY-GIVING-PARROT-PEN\/247716.uts&quot;,\n        &quot;variations&quot;: &quot;MULTI&quot;\n    }\n}]\n<\/code><\/pre>","protected":false},"excerpt":{"rendered":"<p>Betsey Johnson is an American fashion designer, easily recognizable in the fashion world with her quirky designs for women. In her online store you can find clothes, shoes, accessories and jewelry. We are publishing digger configurations that will help you to scrape data from fashion stores and this scraper extracts data from the betseyjohnson.com online [&hellip;]<\/p>","protected":false},"author":4,"featured_media":364,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31,30,2],"tags":[],"class_list":["post-362","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ecommerce-scraping","category-free-scrapers","category-web-scraping"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.diggernaut.com\/blog\/wp-json\/wp\/v2\/posts\/362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.diggernaut.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.diggernaut.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.diggernaut.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.diggernaut.com\/blog\/wp-json\/wp\/v2\/comments?post=362"}],"version-history":[{"count":2,"href":"https:\/\/www.diggernaut.com\/blog\/wp-json\/wp\/v2\/posts\/362\/revisions"}],"predecessor-version":[{"id":650,"href":"https:\/\/www.diggernaut.com\/blog\/wp-json\/wp\/v2\/posts\/362\/revisions\/650"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.diggernaut.com\/blog\/wp-json\/wp\/v2\/media\/364"}],"wp:attachment":[{"href":"https:\/\/www.diggernaut.com\/blog\/wp-json\/wp\/v2\/media?parent=362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.diggernaut.com\/blog\/wp-json\/wp\/v2\/categories?post=362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.diggernaut.com\/blog\/wp-json\/wp\/v2\/tags?post=362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}