怎么判断百度网盘分享连接已然失效?有那样简单吗?
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 我不<span style="color: black;">晓得</span><span style="color: black;">此刻</span>有多少人在用网盘搜索引擎,但就<a style="color: black;">xxxx</a>(不打链接了,进去<span style="color: black;">第1</span>个,<span style="color: black;">以避免</span>知乎反作<span style="color: black;">坏处</span>)<span style="color: black;">来讲</span><span style="color: black;">自己</span>倾注了<span style="color: black;">非常多</span>的心血,<span style="color: black;">此刻</span><span style="color: black;">运用</span>的人数<span style="color: black;">亦</span>还<span style="color: black;">能够</span>,网盘资源都有个通病,那<span style="color: black;">便是</span>资源可能失效,但<span style="color: black;">非常多</span>引擎都<span style="color: black;">无</span>做失效判断,尤其是<span style="color: black;">有些</span>google自定义的引擎,技术含量不高,站长<span style="color: black;">亦</span>就花心思<span style="color: black;">挣钱</span>,很少<span style="color: black;">思虑</span>用户体验。这篇<span style="color: black;">文案</span>是<span style="color: black;">自己</span>又一篇技术公开博客,之前<span style="color: black;">自己</span><span style="color: black;">已然</span>公开了去转盘</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">网的几乎所有的技术细节,这一篇继续<span style="color: black;">弥补</span>:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> <span style="color: black;">首要</span>做个回顾:<a style="color: black;">百度网盘爬虫</a><a style="color: black;"> java分词算法</a><a style="color: black;">数据库自动备份</a><a style="color: black;">代理服务器爬取</a><a style="color: black;">邀请好友注册</a></p>
<div style="color: black; text-align: left; margin-bottom: 10px;">ing:utf-8
"""
@author:haoning
@create time:2015.8.5
"""
from __future__ import division # 精确除法
from Queue import Queue
from __builtin__ import False
from _sqlite3 import SQLITE_ALTER_TABLE
from collections import OrderedDict
import copy
import datetime
import json
import math
import os
import random
import platform
import re
import threading, errno, datetime
import time
import urllib2
import MySQLdb as mdb
DB_HOST = 127.0.0.1
DB_USER = root
DB_PASS = root
def gethtml(url):
try:
print "url",url
req = urllib2.Request(url)
response = urllib2.urlopen(req,None,8) #在<span style="color: black;">这儿</span>应该加入代理
html = response.read()
return html
except Exception,e:
print "e",e
if __name__ == __main__:
while 1:
#url=http://pan.baidu.com/share/link?uk=1813251526&shareid=540167442
url="http://pan.baidu.com/s/1qXQD2Pm"
html=gethtml(url)
print html</div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">结果:e HTTP Error 403: Forbidden,这<span style="color: black;">便是</span>说,度娘他是反爬虫的,之后看了<span style="color: black;">非常多</span>网站,一不小心试了下面的链接:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;"><span style="color: black;">http://</span><span style="color: black;">pan.baidu.com/share/lin</span><span style="color: black;">k?uk=1813251526&shareid=540167442</span></a></p>
<div style="color: black; text-align: left; margin-bottom: 10px;">if __name__ == __main__:
while 1:
url=http://pan.baidu.com/share/link?uk=1813251526&shareid=540167442
#url="http://pan.baidu.com/s/1qXQD2Pm"
html=gethtml(url)
print html</div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">结果:<title>百度云 网盘-链接不存在</title>,你懂的,有这个的必然<span style="color: black;">已然</span>失效,看来度娘<span style="color: black;">无</span>反爬虫,好家伙。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">其实百度网盘的资源入口有两种方式:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">一种是:<a style="color: black;"><span style="color: black;">http://</span><span style="color: black;">pan.</span></a>baidu.com/s/1qXQD2P<span style="color: black;">m</span>,最后为短码。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">另一种是:<a style="color: black;"><span style="color: black;">http://</span><span style="color: black;">pan.baidu.com/share/lin</span><span style="color: black;">k?</span></a></p>
楼主继续加油啊!外链论坛加油! 楼主节操掉了,还不快捡起来! “沙发”(SF,第一个回帖的人) 太棒了、厉害、为你打call、点赞、非常精彩等。 认真阅读了楼主的帖子,非常有益。 i免费外链发布平台 http://www.fok120.com/
页:
[1]