hawaii162 发表于 2011-1-13 10:37:15

楼主 能帮看看 西祠论坛的分页采集吗?

地址是 http://www.xici.net/b609797/board.asp

期待啊

caishu 发表于 2011-1-13 15:24:51

楼主,能帮忙看下这个的采集吗?
http://www.tbt-sps.gov.cn/tbtsps/Notification/Pages/TBT_notification.aspx

万分感谢。

iart 发表于 2011-1-21 14:37:37

求这个站的规则,谢谢楼主

http://www.51jishu.com/techmarket/gb/infomation/MarketInfo/TechProblem/TPList.jsp?cid=4&cname=%BC%C6%CB%E3%BB%FA%BC%B0%CD%F8%C2%E7
主要是列表翻页不会采

pojay 发表于 2011-1-21 15:16:04

http://bbs.locoy.com/viewthread.php?tid=58393&page=1&extra=#pid379893

楼主帮一下忙吧 多谢

myj 发表于 2011-1-21 15:48:38

http://www.youjk.com/merchandiseViewClass1_0_177.html
楼主, 帮忙看下这个的post采集,谢了

kenli123 发表于 2011-1-24 15:59:50

http://j1000040127.jobuy.com/
的联系方式怎么写采集规则

zhouchanglin 发表于 2011-2-3 14:27:47

回复 33# iart

向下翻页http://www.51jishu.com/techmarket/gb/infomation/MarketInfo/TechProblem/TPList.jsp?cid=4&cname=%BC%C6%CB%E3%BB%FA%BC%B0%CD%F8%C2%E7&DBInfoList_startIndex=41&DBInfoList_next=ture&sort=null
这个是第3页

向上翻页http://www.51jishu.com/techmarket/gb/infomation/MarketInfo/TechProblem/TPList.jsp?cid=4&cname=%BC%C6%CB%E3%BB%FA%BC%B0%CD%F8%C2%E7&DBInfoList_startIndex=41&DBInfoList_prev=ture&sort=null这个是第3页

第几页是通过DBInfoList_startIndex参数判断的,1代表第1页开始的数据位置,21是第2页,41第3页,因为每页数据20条,尾页是981

向上翻页时参数DBInfoList_prev=ture判断

向下翻页DBInfoList_next=ture

而sort是代表排序,    <a href="/techmarket/gb/infomation/MarketInfo/TechProblem/TPList.jsp?sort=true&cid=4&cname=计算机及网络">按点击数排序</a>当按点击数排序就为true,默认是null

这样就知道列表分页的请求了吧,判断翻页的参数不能略去,否则出错

这个页面共4个表单,4个图片按钮,就是 首页 上一页 下一页 尾页 这4个,当点击他们时会提交各自的表单,下面是这些表单

以第3页的源码为例:

首页
   <formmethod="POST"action="/techmarket/gb/infomation/MarketInfo/TechProblem/TPList.jsp">
      <td colspan="2" align="right">
      <input type="hidden" name="DBInfoList_startIndex" value="1">------------数据的位置
<input type="hidden" name="DBInfoList_first" value="true">---------首页按钮是否显示

            <input type="hidden" name="sort"value="null">------排序
            <input type="hidden" name="cid"value="4">--------------分类id            
<input type="hidden" name="cname"value="计算机及网络">------------分类名称
            <input type="image" border="0" src="/gb/images/button_first.gif" width="47" height="19">----------首页图片
            
      </form>上一页<formmethod="POST"action="/techmarket/gb/infomation/MarketInfo/TechProblem/TPList.jsp">
<td colspan="2" align="left">
<input type="hidden" name="DBInfoList_startIndex" value="21">------------------上一页数据的开始位置,第3页当前41,减20,即21
<input type="hidden" name="DBInfoList_prev" value="true">-------------------DBInfoList_prev上一页的代表参数

          <input type="hidden" name="sort"value="null">
          <input type="hidden" name="cid"value="4">
          <input type="hidden" name="cname"value="计算机及网络">
          <input type="image" border="0" src="/gb/images/button_prev.gif" width="47" height="19">---------------上一页图片
         
      </form>下一页<formmethod="POST"action="/techmarket/gb/infomation/MarketInfo/TechProblem/TPList.jsp">
<td colspan="2" align="right">
<input type="hidden" name="DBInfoList_startIndex" value="61">---------------下一页数据开始位置,当前41,加20,即61
<input type="hidden" name="DBInfoList_next" value="true">

            <input type="hidden" name="sort"value="null">
            <input type="hidden" name="cid"value="4">
            <input type="hidden" name="cname"value="计算机及网络">
            <input border="0" type="image" name ="next"src="/gb/images/button_next.gif"width="47" height="19" >-----下一页图片
            
      </form>尾页 <formmethod="POST"action="/techmarket/gb/infomation/MarketInfo/TechProblem/TPList.jsp">
<td colspan="2" align="right">
<input type="hidden" name="DBInfoList_startIndex" value="981">---------------980/20+1,正好是代表第50页的数据开始位置
<input type="hidden" name="DBInfoList_next" value="true">

             <input type="hidden" name="sort"value="null">
             <input type="hidden" name="cid"value="4">
             <input type="hidden" name="cname"value="计算机及网络">
             <input type="image" border="0" src="/gb/images/button_last.gif" width="47" height="19">--尾页图片
            
      </form>可以选择下一页翻页,来获得分页


zhouchanglin 发表于 2011-2-3 14:34:08

本帖最后由 zhouchanglin 于 2011-2-3 14:35 编辑

回复 36# kenli123

,这个只要把火车头设置登陆的cooike即可看到了,要注册会员,获取下会员的cooike即可,登陆网站的采集方法,可以论坛搜索

flfgep2000 发表于 2011-2-5 11:09:07

新年好!恭喜发财!
楼主可以帮做个http://www.hbnyw.com/News-List.aspx?TypeId=21的规则吗?
做了很久都做不来,里面的分页是JS的。谢楼主了。

wu423 发表于 2011-2-11 09:33:25

感谢高手指点,留记号下次请教,谢谢
页: 1 2 3 [4] 5 6 7 8 9 10 11 12 13
查看完整版本: js post网站专区