All Downloads are FREE. Search and download functionalities are using the official Maven repository.

requests.amazon-product.json Maven / Gradle / Ivy

{
  "authToken": "rhlwTRBk-1-de14124c7ace3d93e38a705bae30376c",
  "url": "https://www.amazon.com/-/zh/dp/B00IX1I3G6",
  "args": "-i 1s",
  "sqls": {
    "asin": "select\n    dom_attr(dom_select_first(dom, '#PulsarMetaInformation'), 'normalizedUrl') as `url`,\n    dom_base_uri(dom) as `baseUri`,\n    dom_first_text(dom, '#productTitle') as `title`,\n    str_substring_after(dom_first_href(dom, '#wayfinding-breadcrumbs_container ul li:last-child a'), '&node=') as `category`,\n    cast(dom_all_hrefs(dom, '#wayfinding-breadcrumbs_container ul li a') as varchar) as `categorypath`,\n    dom_first_text(dom, '#wayfinding-breadcrumbs_container ul li:last-child a') as `categoryname`,\n    array_join_to_string(dom_all_texts(dom, '#wayfinding-breadcrumbs_container ul li a'), '|') as `categorynamelevel`,\n    dom_first_slim_html(dom, 'div#centerCol a#bylineInfo') as `brand`,\n    cast(dom_all_slim_htmls(dom, '#imageBlock img') as varchar) as `gallery`,\n    dom_first_attr(dom, '#landingImage, #imgTagWrapperId img, #imageBlock img:expr(width>400)', 'data-old-hires') as `imgsrc`,\n    dom_first_attr(dom, '#landingImage, #imgTagWrapperId img, #imageBlock img:expr(width>400)', 'data-a-dynamic-image') as `dynamicimgsrcs`,\n    dom_first_slim_html(dom, '#landingImage, #imgTagWrapperId img, #imageBlock img:expr(width>400)') as `img`,\n    dom_first_text(dom, '#price tr td:contains(List Price) ~ td') as `listprice`,\n    dom_first_text(dom, '#price tr td:matches(^Price) ~ td, #price_inside_buybox') as `price`,\n    dom_first_text(dom, '#price #priceblock_dealprice, #price tr td:contains(Deal of the Day) ~ td') as `withdeal`,\n    dom_first_text(dom, '#price #dealprice_savings .priceBlockSavingsString, #price tr td:contains(You Save) ~ td') as `yousave`,\n    dom_first_text(dom, '#price_inside_buybox') as `buyboxprice`,\n    str_is_not_empty(dom_first_text(dom, '#acBadge_feature_div i:contains(Best Seller)')) as `isbs`,\n    str_is_not_empty(dom_first_text(dom, '#acBadge_feature_div span:contains(Amazon)')) as `isac`,\n    str_is_not_empty(dom_first_text(dom, '#centerCol #couponBadgeRegularVpc')) as `iscoupon`,\n    dom_first_text(dom, '#centerCol div i:contains(Prime Day Deal)') as `isprime`,\n    to_json(map(\n        'isbs', str_left(dom_first_text(dom, '#acBadge_feature_div i:contains(Best Seller)'), 8),\n        'isac', str_left(dom_first_text(dom, '#acBadge_feature_div span:contains(Amazon)'), 8),\n        'iscoupon', str_left(dom_first_text(dom, '#centerCol #couponBadgeRegularVpc'), 8),\n        'isprime', str_left(dom_first_text(dom, '#centerCol div i:contains(Prime Day Deal)'), 8),\n        'isaddcart', str_left(dom_first_text(dom, '#addToCart_feature_div span:contains(Add to Cart), #submit.add-to-cart-ubb-announce'), 8),\n        'isbuy', str_left(dom_first_text(dom, '#buyNow span:contains(Buy now)'), 8),\n        'isa', array_length(dom_all_imgs(dom, '#prodDetails img[src], #productDescription img[src]')),\n        'iscpfb', str_left(dom_first_text(dom, '#climatePledgeFriendlyBadge'), 8)\n    )) as tags,\n    cast(dom_all_texts(dom, 'a#sellerProfileTriggerId[href~=seller], #tabular-buybox tr:has(td:contains(Sold by)) td a[href~=seller], #usedbuyBox div:contains(Sold by) a[href~=seller], #merchant-info a[href~=seller], #buybox-tabular a[href~=seller]') as varchar) as `soldby`,\n    cast(dom_all_hrefs(dom, 'a#sellerProfileTriggerId[href~=seller], #tabular-buybox tr:has(td:contains(Sold by)) td a[href~=seller], #usedbuyBox div:contains(Sold by) a[href~=seller], #merchant-info a[href~=seller], #buybox-tabular a[href~=seller]') as varchar) as `sellerID`,\n    cast(dom_all_hrefs(dom, 'a#sellerProfileTriggerId[href~=seller], #tabular-buybox tr:has(td:contains(Sold by)) td a[href~=seller], #usedbuyBox div:contains(Sold by) a[href~=seller], #merchant-info a[href~=seller], #buybox-tabular a[href~=seller]') as varchar) as `marketplaceID`,\n    cast(dom_all_texts(dom, '#desktop_buybox #merchant-info, #tabular-buybox tr:has(td:contains(Ships from)) td, #buybox-tabular tr:has(td:contains(Ships from)) td') as varchar) as `shipsfrom`,\n    to_json(map(\n       'globaldeliverto', dom_first_text(dom, '#glow-ingress-block'),\n       'deliverto', dom_first_text(dom, '#contextualIngressPtLabel_deliveryShortLine, #glowContextualIngressPt_feature_div, div[data-feature-name=glowContextualIngressPt]')\n    )) as `deliverto`,\n    str_abbreviate(dom_first_text(dom, '#availability, #outOfStock'), 1024) as `instock`,\n    dom_first_text(dom, '#selectQuantity select option:last-child') as `quantity`,\n    cast(dom_all_hrefs(dom, '#availability a, #olp-upd-new-used a, #olp-upd-new a, #certified-refurbished-version a[href~=/dp/], #newer-version a[href~=/dp/]') as varchar) as `sellsameurl`,\n    array_join_to_string(dom_all_attrs(dom, '#sims-fbt #sims-fbt-content ul li[data-p13n-asin-metadata]', 'data-p13n-asin-metadata'), '^|^') as `boughttogethermetadata`,\n    array_join_to_string(dom_all_attrs(dom, '#sims-fbt #sims-fbt-content ul li[class~=sims-fbt-image] img', 'src'), '^|^') as `boughttogetherimgs`,\n    array_join_to_string(dom_all_texts(dom, '#sims-fbt #sims-fbt-content ul li[data-p13n-asin-metadata]'), '^|^') as `boughttogether`,\n    str_substring_between(dom_first_text(dom, '#olp-upd-new-used a, #olp-upd-new a'), '(', ')') as `othersellernum`,\n    str_is_not_empty(dom_first_text(dom, '#addToCart_feature_div span:contains(Add to Cart), #submit.add-to-cart-ubb-announce')) as `isaddcart`,\n    str_is_not_empty(dom_first_text(dom, '#buyNow span:contains(Buy now)')) as `isbuy`,\n    cast(dom_all_slim_htmls(dom, '#productOverview_feature_div table') as varchar) as `overviewbullets`,\n    cast(dom_all_slim_htmls(dom, '#detailBullets_feature_div, #productDetails_detailBullets_sections1 table') as varchar) as `detailbullets`,\n    cast(dom_all_slim_htmls(dom, '#feature-bullets ul li') as varchar) as `featurebullets`,\n    dom_first_text(dom, '#productDescription, h2:contains(Product Description) + div') as `desc`,\n    cast(dom_all_slim_htmls(dom, '#prodDetails h1:contains(Feedback) ~ div a') as varchar) as `feedbackurl`,\n    dom_first_text(dom, '#prodDetails table tr > th:contains(ASIN) ~ td, #detailBullets_feature_div ul li span:contains(ASIN) ~ span') as `asin`,\n    dom_first_text(dom_owner_body(dom), '#pulsarJsVariables pre.parentAsin') as `pasin`,\n    dom_first_text(dom_owner_body(dom), '#pulsarJsVariables pre.num_total_variations') as `totalvariations`,\n    dom_first_text(dom_owner_body(dom), '#pulsarJsVariables pre.jsVariables') as `jsVariables`,\n    dom_first_text(dom, '#prodDetails table tr > th:contains(Product Dimensions) ~ td, #detailBullets_feature_div ul li span:contains(Package Dimensions) ~ span') as `volume`,\n    dom_first_text(dom, '#prodDetails table tr > th:contains(Item Weight) ~ td') as `weight`,\n    dom_outer_html(dom_select_first(dom, '#prodDetails table tr > th:contains(Best Sellers Rank) ~ td, #detailBullets_feature_div ul li span:contains(Best Sellers Rank)')) as `rank`,\n    dom_first_text(dom, '#detailBullets_feature_div ul li span:contains(Best Sellers Rank)') as `rank2`,\n    dom_first_text(dom, '#prodDetails table tr > th:contains(Date First) ~ td, #detailBullets_feature_div ul li span:contains(Date First Available) ~ span') as `onsaletime`,\n    cast(dom_all_attrs(dom, '#prodDetails img[src], #productDescription img[src], #dpx-aplus-product-description_feature_div img[src], #dpx-aplus-3p-product-description_feature_div img[src]', 'src') as varchar) as `detailimgs`,\n    cast(dom_all_hrefs(dom, '#rvs-vse-related-videos ol li a[href~=/vdp/]') as varchar) as `detailvideos`,\n    array_length(dom_all_imgs(dom, '#prodDetails img[src], #productDescription img[src]')) as `isa`,\n    str_first_integer(dom_first_text(dom, '#askATFLink, .askTopQandALoadMoreQuestions a'), 0) as `qanum`,\n    str_first_integer(dom_first_text(dom, '#acrCustomerReviewText, #reviewsMedley div[data-hook=total-review-count] span, #reviewsMedley span:contains(ratings), #reviewsMedley span:contains(customer ratings)'), 0) as `reviews`,\n    cast(dom_all_texts(dom, '#reviewsMedley div[data-hook=lighthut-terms-list] a, #reviewsMedley h3:contains(Read reviews that mention) ~ div a') as varchar) as `reviewsmention`,\n    str_first_float(dom_first_text(dom, '#reviewsMedley .AverageCustomerReviews span:contains(out of)'), 0.0) as `score`,\n    str_first_integer(dom_first_text(dom, '#reviewsMedley div[data-hook=total-review-count], #acrCustomerReviewText'), 0) as `starnum`,\n    dom_first_text(dom, 'table#histogramTable:expr(width > 100) td:contains(5 star) ~ td:contains(%)') as `score5percent`,\n    dom_first_text(dom, 'table#histogramTable:expr(width > 100) td:contains(4 star) ~ td:contains(%)') as `score4percent`,\n    dom_first_text(dom, 'table#histogramTable:expr(width > 100) td:contains(3 star) ~ td:contains(%)') as `score3percent`,\n    dom_first_text(dom, 'table#histogramTable:expr(width > 100) td:contains(2 star) ~ td:contains(%)') as `score2percent`,\n    dom_first_text(dom, 'table#histogramTable:expr(width > 100) td:contains(1 star) ~ td:contains(%)') as `score1percent`,\n    dom_all_texts(dom, 'div#cr-dp-summarization-attributes div[data-hook=cr-summarization-attribute]') as `scoresbyfeature`,\n    dom_first_href(dom, '#reviews-medley-footer a') as `reviewsurl`,\n    dom_first_attr(dom_owner_document(dom), 'head meta[name=keywords]', 'content') as `meta_keywords`,\n    dom_first_attr(dom_owner_document(dom), 'head meta[name=description]', 'content') as `meta_description`,\n    dom_first_attr(dom, '#PulsarMetaInformation', 'href') as `href`,\n    dom_first_attr(dom, '#PulsarMetaInformation', 'referer') as `referer`,\n    dom_first_attr(dom, '#PulsarMetaInformation', 'label') as `label`,\n    time_first_mysql_date_time(dom_attr(dom_select_first(dom_owner_body(dom), '#PulsarMetaInformation'), 'taskTime')) as `task_time`,\n    dom_ch(dom) as `numchars`,\n    dom_a(dom) as `numlinks`,\n    dom_img(dom) as `numimgs`,\n    dom_height(dom) as `height`\nfrom load_and_select(@url, ':root body');",
    "sims-1": "select\n    dom_base_uri(dom) as url,\n    str_substring_between(dom_base_uri(dom), '/dp/', '/ref=') as asin,\n    dom_first_own_text(dom_owner_body(dom), '#sims-consolidated-1_feature_div h2.a-carousel-heading') as carousel_title,\n    dom_first_text(dom_owner_body(dom), '#sims-consolidated-1_feature_div h2.a-carousel-heading div.sp_desktop_sponsored_label') as is_sponsored,\n    dom_element_sibling_index(dom) as ad_asin_position,\n    dom_first_href(dom, 'div[data-asin] a[href~=/dp/], div[data-asin] a[href~=/slredirect/]') as ad_asin_url,\n    dom_first_text(dom, 'div[data-asin] a div:expr(img=0 && char>30)') as ad_asin_title,\n    dom_first_text(dom, 'div[data-asin] a span.a-color-price') as ad_asin_price,\n    dom_first_attr(dom, 'div[data-asin] a img[data-a-dynamic-image]', 'src') as ad_asin_img,\n    dom_first_text(dom, 'div[data-asin] > div > a i.a-icon-star') as ad_asin_score,\n    str_substring_after(dom_first_attr(dom, 'div[data-asin] > div > a i.a-icon-star', 'class'), ' a-star-') as ad_asin_score_2,\n    dom_first_text(dom, 'div[data-asin] a:contains(out of 5 stars) ~ a[href~=reviews]') as ad_asin_starnum,\n    dom_attr(dom_select_first(dom_owner_body(dom), '#PulsarMetaInformation'), 'label') as `label`,\n    time_first_mysql_date_time(dom_attr(dom_select_first(dom_owner_body(dom), '#PulsarMetaInformation'), 'taskTime')) as `task_time`,\n    'sims-1' as `ad_type`\nfrom load_and_select(@url, '#sims-consolidated-1_feature_div ol.a-carousel li');",
    "sims-2": "select\n    dom_base_uri(dom) as url,\n    str_substring_between(dom_base_uri(dom), '/dp/', '/ref=') as asin,\n    dom_first_own_text(dom_owner_body(dom), '#sims-consolidated-2_feature_div h2.a-carousel-heading') as carousel_title,\n    dom_first_text(dom_owner_body(dom), '#sims-consolidated-2_feature_div h2.a-carousel-heading div.sp_desktop_sponsored_label') as is_sponsored,\n    dom_element_sibling_index(dom) as ad_asin_position,\n    dom_first_href(dom, 'div[data-asin] a[href~=/dp/], div[data-asin] a[href~=/slredirect/]') as ad_asin_url,\n    dom_first_text(dom, 'div[data-asin] a div:expr(img=0 && char>30)') as ad_asin_title,\n    dom_first_text(dom, 'div[data-asin] a span.a-color-price') as ad_asin_price,\n    dom_first_attr(dom, 'div[data-asin] a img[data-a-dynamic-image]', 'src') as ad_asin_img,\n    dom_first_text(dom, 'div[data-asin] > div > a i.a-icon-star') as ad_asin_score,\n    str_substring_after(dom_first_attr(dom, 'div > div > a i.a-icon-star', 'class'), ' a-star-') as ad_asin_score_2,\n    dom_first_text(dom, 'div[data-asin] a:contains(out of 5 stars) ~ a[href~=reviews]') as ad_asin_starnum,\n    dom_attr(dom_select_first(dom_owner_body(dom), '#PulsarMetaInformation'), 'label') as `label`,\n    time_first_mysql_date_time(dom_attr(dom_select_first(dom_owner_body(dom), '#PulsarMetaInformation'), 'taskTime')) as `task_time`,\n    'sims-2' as `ad_type`\nfrom load_and_select(@url, '#sims-consolidated-2_feature_div ol.a-carousel li');",
    "sims-3": "select\n    dom_base_uri(dom) as url,\n    str_substring_between(dom_base_uri(dom), '/dp/', '/ref=') as asin,\n    dom_first_own_text(dom_owner_body(dom), '#sims-consolidated-3_feature_div h2.a-carousel-heading') as carousel_title,\n    dom_first_text(dom_owner_body(dom), '#sims-consolidated-3_feature_div h2.a-carousel-heading div.sp_desktop_sponsored_label') as is_sponsored,\n    dom_element_sibling_index(dom) as ad_asin_position,\n    dom_first_href(dom, 'div[data-asin] a[href~=/dp/], div[data-asin] a[href~=/slredirect/]') as ad_asin_url,\n    dom_first_text(dom, 'div[data-asin] a div:expr(img=0 && char>30)') as ad_asin_title,\n    dom_first_text(dom, 'div[data-asin] a span.a-color-price') as ad_asin_price,\n    dom_first_attr(dom, 'div[data-asin] a img[data-a-dynamic-image]', 'src') as ad_asin_img,\n    dom_first_text(dom, 'div[data-asin] > div > a i.a-icon-star') as ad_asin_score,\n    str_substring_after(dom_first_attr(dom, 'div[data-asin] > div > a i.a-icon-star', 'class'), ' a-star-') as ad_asin_score_2,\n    dom_first_text(dom, 'div[data-asin] a:contains(out of 5 stars) ~ a[href~=reviews]') as ad_asin_starnum,\n    dom_attr(dom_select_first(dom_owner_body(dom), '#PulsarMetaInformation'), 'label') as `label`,\n    time_first_mysql_date_time(dom_attr(dom_select_first(dom_owner_body(dom), '#PulsarMetaInformation'), 'taskTime')) as `task_time`,\n    'sims-3' as `ad_type`\nfrom load_and_select(@url, '#sims-consolidated-3_feature_div ol.a-carousel li');",
    "sims-consider": "select\n    dom_base_uri(dom) as url,\n    str_substring_between(dom_base_uri(dom), '/dp/', '/ref=') as asin,\n    dom_first_text(dom, 'h4') as carousel_title,\n    dom_first_href(dom, 'div#value-pick-title-row a') as ad_asin_url,\n    dom_first_text(dom, 'div#value-pick-title-row a') as ad_asin_title,\n    dom_first_text(dom, 'div.a-row span.a-color-price') as ad_asin_price,\n    dom_first_attr(dom, 'img#value-pick-image, img[src~=images]', 'src') as ad_asin_img,\n    str_substring_after(dom_first_attr(dom, 'div.a-row i.a-icon-star', 'class'), 'a-star-') as ad_asin_score,\n    str_substring_between(dom_first_text(dom, 'div.a-row i.a-icon-star ~ a[href~=reviews]'), '(', ')') as ad_asin_starnum,\n    dom_attr(dom_select_first(dom_owner_body(dom), '#PulsarMetaInformation'), 'label') as `label`,\n    time_first_mysql_date_time(dom_attr(dom_select_first(dom_owner_body(dom), '#PulsarMetaInformation'), 'taskTime')) as `task_time`,\n    'sims-consider' as `ad_type`\nfrom load_and_select(@url, '#valuePick_feature_div');",
    "similar-items": "select\n    dom_all_attrs(dom, 'tr.comparison_table_image_row center > img[alt]', 'data-src') as `ad_asin_img`,\n    dom_all_hrefs(dom, '#comparison_title, tr.comparison_table_image_row th a[href~=/dp/]') as `ad_asin`,\n    dom_all_hrefs(dom, '#comparison_title, tr.comparison_table_image_row th a[href~=/dp/]') as `ad_asin_url`,\n    dom_all_texts(dom, 'tr.comparison_table_image_row th i span:contains(Best Seller)') as `ad_asin_bsr`,\n    dom_all_texts(dom, '#comparison_title, tr.comparison_table_image_row th a[href~=/dp/]') as `ad_asin_title`,\n    dom_all_texts(dom, 'tr#comparison_price_row > td') as `ad_asin_price`,\n    dom_all_texts(dom, 'tr#comparison_custormer_rating_row > td a[href~=product-reviews]') as `ad_asin_starnum`,\n    dom_all_texts(dom, 'tr#comparison_custormer_rating_row > td i.a-icon-star') as `ad_asin_score`,\n    dom_all_texts(dom, 'tr#comparison_sold_by_row > td') as `ad_asin_soldby`,\n    dom_all_hrefs(dom, 'tr#comparison_sold_by_row > td a') as `ad_asin_soldby_url`,\n    dom_all_slim_htmls(dom, 'tr#comparison_shipping_info_row > td span') as `ad_asin_shipby`,\n    make_array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) as `ad_asin_position`,\n    make_array_n(dom_base_uri(dom), 10) as `url`,\n    make_array_n(str_substring_between(dom_base_uri(dom), '/dp/', '/ref='), 10) as `asin`,\n    make_array_n(dom_attr(dom_select_first(dom_owner_body(dom), '#PulsarMetaInformation'), 'label'), 10) as `label`,\n    make_array_n(time_first_mysql_date_time(dom_attr(dom_select_first(dom_owner_body(dom), '#PulsarMetaInformation'), 'taskTime')), 10) as `task_time`,\n    make_array_n('Compare with similar items', 10) as `carousel_title`,\n    make_array_n('similar-items', 10) as `ad_type`\nfrom load_and_select(@url, '#HLCXComparisonTable');",
    "reviews": "select\n    dom_base_uri(dom) as `url`,\n    dom_first_slim_html(dom_owner_body(dom), '.product-title h1 a, a[data-hook=product-link]') as `asin`,\n    dom_first_href(dom, 'a.review-title-content, a[data-hook=review-title]') as `reviews_url`,\n    dom_first_text(dom_owner_body(dom), '#filter-info-section div[data-hook=cr-filter-info-review-rating-count], #filter-info-section') as `ratingcount`,\n    dom_attr(dom, 'id') as `comment_id`,\n    dom_first_text(dom, '.review-date, span[data-hook=review-date]') as `comment_time`,\n    dom_first_text(dom, 'a.a-profile[href~=profile] .a-profile-name') as `comment_name`,\n    dom_first_text(dom, 'a.review-title-content, a[data-hook=review-title]') as `comment_title`,\n    dom_first_href(dom, 'a.a-profile[href~=profile]') as `comment_name_url`,\n    dom_first_href(dom, 'a[data-hook=format-strip]') as `sku_asin`,\n    dom_first_text(dom, 'a span[data-hook=avp-badge], a span:containsOwn(Verified)') as `is_verified`,\n    dom_first_text(dom, 'div.a-profile-content span.a-profile-descriptor, div.a-profile-content span:containsOwn(Top Contributor)') as `is_top_contributor`,\n    dom_first_text(dom, 'div.genome-widget-row a span:containsOwn(VINE VOICE)') as `is_vine_voice`,\n    dom_first_text(dom, '.review-text-content, span[data-hook=review-body]') as `content`,\n    str_first_float(dom_first_text(dom, 'a[title~=out of], i[data-hook=review-star-rating]'), 0.0) as `score`,\n    cast(dom_img(dom_select_first(dom, 'div.review-image-tile-section')) as integer) as `ispic`,\n    cast(dom_all_attrs(dom, 'div.review-image-tile-section img[data-hook=review-image-tile]', 'src') as varchar) as `pics`,\n    str_first_integer(dom_first_text(dom, '.review-comments .cr-vote .cr-vote-text, span[data-hook=helpful-vote-statement]'), 0) as `helpfulnum`,\n    dom_attr(dom_select_first(dom_owner_body(dom), '#PulsarMetaInformation'), 'label') as `label`,\n    time_first_mysql_date_time(dom_attr(dom_select_first(dom_owner_body(dom), '#PulsarMetaInformation'), 'taskTime')) as `task_time`,\n    dom_own_texts(dom_select_first(dom, 'a[data-hook=format-strip]')) as `sku`\nfrom load_and_select('{{url}}', '#cm_cr-review_list > div[data-hook=review]');"
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy