亚马逊-最热的卖家-数据

-- noinspection SqlResolveForFile
-- noinspection SqlNoDataSourceInspectionForFile

select
dom_base_uri(dom) as url,
amazon_find_asin(dom_first_href(dom, 'a[href~=/dp/]')) as asin,
dom_first_href(dom, 'a[href~=/dp/]') as asin_url,
str_substring_between(dom_base_uri(dom), 'zgbs/', '/') as categoryinurl,
array_join_to_string(dom_all_texts(dom_owner_body(dom), 'div[role=tree] div[class~=browse-up]'), ' > ') as categorylevel,
dom_first_text(dom_owner_body(dom), 'div[role=tree] div[role=treeitem] span[class~=selected]') as selectedcategory,
dom_base_uri(dom) as category_url,
dom_first_integer(dom, 'span.zg-bdg-text', 0) as rank,
dom_first_text(dom, 'div[id~=B0] div.a-row span[class~=price]') as price,
dom_first_text(dom, 'a:expr(img=0 && char>30)') as title,
dom_first_attr(dom, 'div[id~=B0] a img[src]', 'src') as pic,
str_substring_before(dom_first_attr(dom, 'div[id~=B0] a[title~=stars]', 'title'), ' out') as score,
dom_first_text(dom, 'div[id~=B0] a[title~=stars] i ~ span') as starnum,
time_first_mysql_date_time(dom_attr(dom_select_first(dom_owner_body(dom), '#PulsarMetaInformation'), 'taskTime')) as task_time
from load_and_select(@url, 'div.p13n-gridRow > div[id~=Item]');

 

posted @ 2025-03-27 17:47  liskov_design  阅读(6)  评论(0)    收藏  举报