V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
jerryge
V2EX  ›  Node.js

抓取淘宝店铺商品

  •  
  •   jerryge · 2014-04-12 15:09:19 +08:00 · 7404 次点击
    这是一个创建于 3665 天前的主题,其中的信息可能已经有所发展或是发生改变。
    写了个简单的爬虫,想抓下一家淘宝店正在出售的宝贝(/search.htm?spm=a1z10.1.0.0.N8xbI3&search=y&orderType=hotsell_desc)。请求频率7秒抓一次,但发现抓了几次之后就要求登陆,跳转到登陆页面。请问有类似经验的同学吗
    11 条回复    1970-01-01 08:00:00 +08:00
    manhere
        1
    manhere  
       2014-04-12 15:53:44 +08:00 via Android
    淘宝api
    leofml
        2
    leofml  
       2014-04-12 15:54:30 +08:00
    检查 Referer, UA 和 Cookies
    jsonline
        3
    jsonline  
       2014-04-12 16:33:14 +08:00 via Android
    用phantom吧
    alay9999
        4
    alay9999  
       2014-04-12 20:18:36 +08:00
    @manhere API 好像只能提供你账号对应店铺的商品数据吧
    andrewrong
        5
    andrewrong  
       2014-04-12 20:40:58 +08:00
    公司之前是使用淘宝API的,但是后来淘宝封了,现在的话是自己写爬虫爬,但是为了防止淘宝识别就通过代理(VPN)进行爬,这样就可以防止淘宝探测到...你的现象比较像被淘宝检测出然后进行限制了..当然是我的猜测...不是很懂
    alexapollo
        6
    alexapollo  
       2014-04-12 20:42:30 +08:00   ❤️ 1
    bladecamper
        7
    bladecamper  
       2014-04-12 21:36:51 +08:00
    API现在基本等于封闭状态。
    用火车头采集器吧。
    ryan10107
        8
    ryan10107  
       2014-04-12 22:37:06 +08:00
    可以AD拨号吧,搞多点cookie和header的模拟,现在淘宝封店铺商品列表封得很厉害,做爬虫还是看IP的
    jerryge
        9
    jerryge  
    OP
       2014-04-13 22:17:28 +08:00
    @andrewrong 是指通过VPN轮训IP吗
    jerryge
        10
    jerryge  
    OP
       2014-04-13 22:18:06 +08:00
    @manhere 现在的API基本废了
    jerryge
        11
    jerryge  
    OP
       2014-04-13 22:19:16 +08:00
    @ryan10107 倒霉孩子不是ADSL上网的。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5251 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 83ms · UTC 08:47 · PVG 16:47 · LAX 01:47 · JFK 04:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.