代码: 全选
http://www.xxx/forum-45-1.html
http://www.xxx/forum-1-1.html
http://www.xxx/forum-45-2.html
http://www.xxx/forum-45-3.html
http://www.xxx/forum-45-4.html
http://www.xxx/forum-45-5.html
http://www.xxx/forum-45-6.html
http://www.xxx/forum-45-7.html
http://www.xxx/forum-45-8.html
http://www.xxx/forum-45-9.html
http://www.xxx/forum-45-10.html
http://www.xxx/forum-45-85.html
1. 如何对这些URL进行排序?
其实抓回的这些URL就是一些分页过的url, forum-45-1.html是第一页, 最后一页呢,应该就是forum-45-85.html这个最大的这个. 所以我想排序, 这样最大的就是最后一页.
2. 怎么取到这个最大值,85, 就是从这个forum-45-85.html抠出85.
这样我就可以做一个For循环, 从forum-45-1.html 到 forum-45-85.html, 来遍历这些页面.
谢谢各位的帮忙.