amazon crawling processes and ideas

The first step: the category page

https://www.amazon.in//gp/site-directory?ref=nav_em_ajax_fail  #抓包获得

Step Two: Get the url each category under the category page

如 :https://www.amazon.in/gp/browse.html?node=1389401031&ref_=nav_em_T1_0_4_NaN_1_sbc_mobcomp_all_mobiles
        
 由于对方网站也是迭代的出来的这里有很多信息需要自己过滤排查

The third step: turning the handle

import time

https://www.amazon.in/gp/browse.html?node=1389401031&ref_=nav_em_T1_0_4_NaN_1_sbc_mobcomp_all_mobiles&page=1&qid={int(time.time())}&ref=sr_pg_1
    
翻页主要2个参数控制
#page=页码
#qid=十位的当前时间戳
#如果页码超过最大页码不会报错就是现实最后一页内容

Step four: get details page content

#内容都在
#正则匹配格式
jQuery.parseJSON\('(.*?)'\);

Guess you like

Origin www.cnblogs.com/pythonywy/p/12024409.html