线上游戏的老婆不可能番云盘资源!wwww

最近百度云盘不提供搜索,闲来无事,玩玩python爬虫,爬一下百度云盘的资源 - 推酷
最近百度云盘不提供搜索,闲来无事,玩玩python爬虫,爬一下百度云盘的资源
最近百度云盘不知道为啥不提供资源检索,正好最近看了一下python,正好来练练手,写歌爬虫爬一下百度云盘的资源。
分析了一下百度云盘的网友源码和js文件,里面有大量ajax的东西,利用json传输数据,前端显示。话说,这样数据爬去就方便多了,也不要用scrapy啥的,直接解析json数据就好。
分析js文件提炼了下面三个链接:
URL_SHARE = '/pcloud/feed/getsharelist?auth_type=1&start={start}&limit=20&query_uk={uk}&urlid={id}'
URL_FOLLOW = '/pcloud/friend/getfollowlist?query_uk={uk}&limit=20&start={start}&urlid={id}'
#/pcloud/friend/getfanslist?query_uk=&limit=25&start=0
URL_FANS = '/pcloud/friend/getfanslist?query_uk={uk}&limit=20&start={start}&urlid={id}'
整个数据爬取流程起到很重要的作用。
爬虫分三步,一个是urlids 保存要爬取的网址,一个是user存放用户uk,另一个是share存放user分享的数据,包含任何你想要的数据。
下面提供三个核心函数代码:
#演示站http://wwww.yunsou.me
def response_worker():
global news,totals
dbconn = mdb.connect(DB_HOST, DB_USER, DB_PASS, 'baiduyun', charset='utf8')
dbcurr = dbconn.cursor()
dbcurr.execute('SET NAMES utf8')
dbcurr.execute('set global wait_timeout=60000')
while True:
print &function response_worker&,hc_r.qsize()
# if hc_r.qsize()==0:
print &continue&
metadata, effective_url = hc_r.get()
print &response_worker:&, effective_url
tnow = datetime.datetime.utcnow()
date = (tnow + datetime.timedelta(hours=8))
date = datetime.datetime(date.year, date.month, date.day)
if news&=100:
dbcurr.execute('INSERT INTO spider_statusreport(date,new_hashes,total_requests)
VALUES(%s,%s,%s) ON DUPLICATE KEY UPDATE ' +'total_requests=total_requests+%s,new_hashes=new_hashes+%s',
(date, news,totals,totals,news))
except Exception as ex:
print &E10&, str(ex)
id = re_urlid.findall(effective_url)[0]
start = re_start.findall(effective_url)[0]
if 'getfollowlist' in effective_url: #type = 1
follows = json.loads(metadata)
print &-------------------------------------follows-------------------------------\n&
uid = re_uid.findall(effective_url)[0]
if &total_count& in follows.keys() and follows[&total_count&]&0 and str(start) == &0&:
for i in range((follows[&total_count&]-1)/ONEPAGE):
dbcurr.execute('INSERT INTO urlids(uk, start, limited, type, status) VALUES(%s, %s, %s, 1, 0)' % (uid, str(ONEPAGE*(i+1)), str(ONEPAGE)))
except Exception as ex:
print &E1&, str(ex)
if &follow_list& in follows.keys():
for item in follows[&follow_list&]:
if item['pubshare_count']==0:
print &---------------------count ==0-------------------------------------------\n&
y = dbcurr.execute('SELECT id FROM user WHERE userid=%s', (item['follow_uk'],))
y = dbcurr.fetchone()
print &user uk&,item['follow_uk']
dbcurr.execute('INSERT INTO user(userid, username, files, status, downloaded, lastaccess,avatar_url,fans_count,follow_count,album_count) VALUES(%s, &%s&, %s, 0, 0, &%s&,&%s&,%s,%s,%s)' % (item['follow_uk'], item['follow_uname'],item['pubshare_count'],tnow,item['avatar_url'],item['fans_count'],item['follow_count'],item['album_count']))
except Exception as ex:
print &E13&, str(ex)
print &-----------------userid exists---------------------------------\n&
print &delete 1&, uid, start
dbcurr.execute('delete from urlids where uk=%s and type=1 and start&%s' % (uid, start))
elif 'getfanslist' in effective_url: #type = 2
fans = json.loads(metadata)
print &----------------------------------------fans----------------------------------\n&
uid = re_uid.findall(effective_url)[0]
if &total_count& in fans.keys() and fans[&total_count&]&0 and str(start) == &0&:
for i in range((fans[&total_count&]-1)/ONEPAGE):
dbcurr.execute('INSERT INTO urlids(uk, start, limited, type, status) VALUES(%s, %s, %s, 2, 0)' % (uid, str(ONEPAGE*(i+1)), str(ONEPAGE)))
except Exception as ex:
print &E2&, str(ex)
if &fans_list& in fans.keys():
for item in fans[&fans_list&]:
if item['pubshare_count']==0:
print &---------------------count ==0-------------------------------------------\n&
y = dbcurr.execute('SELECT id FROM user WHERE userid=%s', (item['fans_uk'],))
y = dbcurr.fetchone()
print &user uk&,item['fans_uk']
dbcurr.execute('INSERT INTO user(userid, username, files, status, downloaded, lastaccess,avatar_url,fans_count,follow_count,album_count) VALUES(%s, &%s&, %s, 0, 0, &%s&,&%s&,%s,%s,%s)' % (item['fans_uk'], item['fans_uname'],item['pubshare_count'],tnow,item['avatar_url'],item['fans_count'],item['follow_count'],item['album_count']))
except Exception as ex:
print &E23&, str(ex)
print &-----------------userid exists---------------------------------\n&
print &delete 2&, uid, start
dbcurr.execute('delete from urlids where uk=%s and type=2 and start&%s' % (uid, start))
shares = json.loads(metadata)
print &shares&
uid = re_uid.findall(effective_url)[0]
if &total_count& in shares.keys() and shares[&total_count&]&0 and str(start) == &0&:
for i in range((shares[&total_count&]-1)/ONESHAREPAGE):
dbcurr.execute('INSERT INTO urlids(uk, start, limited, type, status) VALUES(%s, %s, %s, 0, 0)' % (uid, str(ONESHAREPAGE*(i+1)), str(ONESHAREPAGE)))
except Exception as ex:
print &E3&, str(ex)
if &records& in shares.keys():
for item in shares[&records&]:
print &-------------------------------------filename------------------ &,item['title']
print &---------------------------------------------------------------\n&
stamp_t=int(item[&feed_time&])/1000
t= time.localtime(int(stamp_t))
share_time=time.strftime(&%Y-%m-%d %H:%M:%S&,t)
if &shorturl& in item.keys():
urls=item['shorturl']
if &filelist& in item.keys():
length=str(item['filelist'][0]['size'])
dbcurr.execute('INSERT INTO share(fid,userid, filename, shareid, status,filetype,share_time,create_time,urls,down,length) VALUES(&%s&,%s, &%s&, %s, 0,&%s&,&%s&,&%s&,&%s&,0,&%s&)' % (sid(int(item['shareid'])),uid, item['title'], item['shareid'],get_category(get_ext(item['title'])),share_time,tnow,urls,length))
# time.sleep(10)
except Exception as ex:
print &\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&E33\n&, str(ex)
print &item ---------------------------------------------\n&
# time.sleep(10)
print &delete 0&, uid, start
dbcurr.execute('delete from urlids where uk=%s and type=0 and start&%s' % (uid, str(start)))
dbcurr.execute('delete from urlids where id=%s' % (id, ))
except Exception as ex:
print &E5&, str(ex), id
pid = re_pptt.findall(effective_url)
print &pid&&&&, pid
ppid = int(pid[0])
PROXY_LIST[ppid][6] -= 1
dbcurr.close()
dbconn.close()
#演示站http://wwww.yunsou.me
def worker(k):
global success, failed
dbconn = mdb.connect(DB_HOST, DB_USER, DB_PASS, 'baiduyun', charset='utf8')
dbcurr = dbconn.cursor()
dbcurr.execute('SET NAMES utf8')
dbcurr.execute('set global wait_timeout=60000')
while True:
#dbcurr.execute('select * from urlids where status=0 order by type limit 1')
dbcurr.execute('select * from urlids where status=0 limit %s,1'%(str(k),))
d = dbcurr.fetchall()
id = d[0][0]
uk = d[0][1]
start = d[0][2]
limit = d[0][3]
type = d[0][4]
dbcurr.execute('update urlids set status=1 where id=%s' % (str(id),))
if type == 0:
url = URL_SHARE.format(uk=uk, start=start, id=id).encode('utf-8')
type == 1:
url = URL_FOLLOW.format(uk=uk, start=start, id=id).encode('utf-8')
elif type == 2:
url = URL_FANS.format(uk=uk, start=start, id=id).encode('utf-8')
hc_q.put((type, url))
if len(d)==0:
print &\ndata user uk\n &
dbcurr.execute('select * from user where status=0 limit %s,100'%(str(k*100),))
print &user &
d = dbcurr.fetchall()
#print &uk&,d
for item in d:
print &update user&,item[1]
dbcurr.execute('insert into urlids(uk, start, limited, type, status) values(&%s&, 0, %s, 0, 0)' % (item[1], str(ONESHAREPAGE)))
dbcurr.execute('insert into urlids(uk, start, limited, type, status) values(&%s&, 0, %s, 1, 0)' % (item[1], str(ONEPAGE)))
dbcurr.execute('insert into urlids(uk, start, limited, type, status) values(&%s&, 0, %s, 2, 0)' % (item[1], str(ONEPAGE)))
dbcurr.execute('update user set status=1 where userid=%s and id=%s' % (item[1],item[6]))
except Exception as ex:
print &E6&, str(ex)
time.sleep(1)
dbcurr.close()
dbconn.close()
#演示站http://wwww.yunsou.me
def req_worker(inx):
s = requests.Session()
while True:
time.sleep(1)
req_item = hc_q.get()
req_type = req_item[0]
url = req_item[1]
r = s.get(url)
hc_r.put((r.text, url))
for item in range(3):
t = threading.Thread(target = req_worker, args = (item,))
t.setDaemon(True)
for item in range(2):
s = threading.Thread(target = worker, args = (item,))
s.setDaemon(True)
for item in range(2):
t = threading.Thread(target = response_worker, args = ())
t.setDaemon(True)
ok,完工,想看的可以来看下
已发表评论数()
请填写推刊名
描述不能大于100个字符!
权限设置: 公开
仅自己可见
正文不准确
标题不准确
排版有问题
主题不准确
没有分页内容
图片无法显示
视频无法显示
与原文不一致资源交流区 - 百度云论坛|百度网盘论坛|百度论坛 - Powered by Discuz!
后使用快捷导航没有帐号?
只需一步,快速开始
只需两步,快速登录
&& 资源交流区
你们百度云真心恶心人呢,能不能改了?
[首发合集] [XIUREN秀人网] No.527- No. 536[共十部521P/1.78G]
无需积分/无需登录下载【豆丁、百度文库】【冰点文库下载器】
[日本][2016][我叫坂本我最叼][全12话][内嵌字幕][1080P/mkv][4.5G][日语]
[日本][1997][風魔小次郎][3部全13话][内嵌字幕][480P/rmvb][1.75G][日语]
[首发合集] [XIUREN秀人网] No.517- No. 526[共十部546P/1.74G]
试遍了论坛的结果,只有这个,真正完美百度云加速破J版(低调使用)
求[15786][飞飞讲英语]新概念英语二册第36课第四段
百度云论坛签到帖()
[日本][2014][Fate Stay Night UBW][2季全25话][不定时更新][内嵌字幕][1080P/mkv][24 ...
精品】粉嫩美乳萝莉VIP付费套图 绑着两点~会玩 呵呵
[黑丝][无圣光][70P\61M]看惯了波涛汹涌浓妆艳抹的,来看点小清新。这次是黑丝,尺度 ...
2016传智42期PHP
[首发合集] [XIUREN秀人网] No.527- No. 536[共十部521P/1.78G]
少女映画[608P/880M]
[美国][科幻/恐怖][人类清除计划3.The Purge Election Year 2016 CAMRip 1 05Gb By Te ...
里山生活基本術[PDF格式]
[英国][BBC:中国故事.P HDTV/WEB-DL 六版][6集全][MKV/8.76G+7.85G+6.15G+4. ...
[日本][2013][言叶之庭4K][p m2ts][中英内挂/日英音轨][43G]
[最性感最狂野的SHIMA摄影作品大合集][M]
【7.11/VR眼镜9.9元/今日辣品】够辣! 够味!够刺激!!!
[日剧][火花2016全10集][中字字幕][mp4/720P/每集约510M]
[韩国][剧情/悬疑/惊悚][哭声(修正版).Goksung.aka.The.Wailing.2016.HD720P.X264.AAC ...
★★★漫风漫语 第五十七期★★★
[美国][蝙蝠侠大战超人:正义黎明.加长版.2016.BDp][MKV/12.02G+6.56G+MP4/9 ...
[韩国][悬疑/惊悚][哭声/.The.Wailing.2016.HD720p-rarbt+TsKs+Mp4Ba][MKV/4.1G+1.76G ...
(学渣的考前救命稻草)2016管卫东 文综-------4小时高考选择题满分技术 MP4+PPT .600 ...
[香港][犯罪/惊悚][树大招风.Trivisa.2016.BDP.rarbt+Mp4Ba][MP4/5.05G+2.91 ...
子版块: &&&&&&&&&&版主: ,
2万 / <span title="2万
子版块: &&&&版主: ,
7482 / <span title="5万
子版块: &&版主: , ,
2553 / <span title="万
子版块: &&&&版主: ,
4042 / <span title="万
子版块: &&&&&&&&&&&&&&&&版主: ,
8833 / <span title="万
子版块: &&&&&&
4472 / <span title="万
子版块: &&&&&&&&&&&&&&&&&&版主: , , ,
1万 / <span title="5万
子版块: &&&&版主:
4379 / <span title="万
子版块: &&版主: , ,
1万 / <span title="万
子版块: &&&&&&&&版主: ,
6390 / <span title="万
子版块: &&&&&&
692 / <span title="万
版主: , , , , , , , , , , , , , , , , , , , , , , , ,
3万 / <span title="1万
昨天&20:51
站长推荐 /1
Powered by311资源网站_311资源电影下载_311资源电影
人人影视网()-提供最全最大影视资源!
311资源网站推荐
311资源网站网址推荐
311资源网站提供的最新战争片
311资源网站提供的最新综艺节目
311资源网站提供的最新动漫
311资源网站提供的最新台湾电视剧
311资源网站推送
311资源网站-友情连接分享百度云帐号_萝莉资源
【公车号属性】分享一个百
&&&来源:& &
  百度云(Baidu Cloud)是百度推出的一项云存储服务,首次注册即有机会获得2T的空间,已覆盖主流PC和手机操作系统,包含Web版、Windows版、Mac版、Android版、iPhone版和Windows Phone版,用户将可以轻松将本身的文件上传到网盘上,并可跨终端随时随地查看和分享。
  2014年11月,百度云总用户数突破2亿,移动端的发展全面超越PC端。[1]
  中文名百度云 外文名Baidu Cloud 推出时间日 运营商北京百度网讯科技有限公司 原&&& 名百度云盘 运营平台Web,PC,Mac,Android,IOS,WP 最新版本7.10.1[2]& 软件大小18.70MB 更新日期 官&&& 目录1 发展
  2 产品
  ? 网盘
  ? 个人主页
  ? 群组功能
  ? 相册
  ? 人脸识别
  ? 通讯录备份
  ? 手机找回
  ? 手机忘带
  ? 记事本
  3 百度云会员
  ? 提速特权
  ? 身份标识
  ? 历史版本
  ? 云冲印
  ? 云解压
  ? 5T超大空间
  ? 大文件上传
  ? 转存上限提升
  ? 图片人脸搜索
  ? 大导演特权
  ? 全文检索
  4 特色功能
  ? 超大空间
  ? 文件预览
  ? 视频播放
  ? 离线下载
  ? 在线解压缩
  ? 快速上传
  ? 丰富资源
  ? 闪电互传
  编辑&& 2012年9月份的百度世界大会上,百度发布了面向开发者的&七种武器&,包括个人云存储PCS、多屏幕Screen X技术、云应用生成服务Site App、LBS&云、移动云测试MTC、百度应用引擎BAE和浏览内核Engine。[3]
  2012年10月,百度宣布推出仅两个月的百度云个人用户量已突破1000万。[4]
  2013年9月,百度宣布百度云用户破亿,并推出主题活动,宣布提供2T永久免费容量和无限制离线下载服务。只要登录百度云移动端,就能立即领取2048G永久免费容量。
  2014年11月,百度云总用户数突破2亿,移动端的发展全面超越PC端。[1]
  日,百度宣告云加速3.0上线。百度云加速还邀请中国电信、CloudFlare以及乐视云一起,现场进行了迄今为止史上最大流量的DDoS攻防演练,成功抵御了峰值超过1Tbps的超高流量攻击,刷新了世界记录,成为当日发布会现场的最大亮点之一。[5]
责任编辑:里里热门 | 百度网盘资源
标签数目统计值
(window.slotbydup=window.slotbydup || []).push({
id: '2444031',
container: s,
size: '300,250',
display: 'inlay-fix'

我要回帖

更多关于 百度云盘资源番号 的文章

 

随机推荐