爬取微博游戏名人信息
昨天写了关于静态网站爬取爬取的文章,以为自己无所不能了,想去微博上爬点数据,差点被微博吊起来打,遇到了太多的坑了,做下记录
常规步骤
我们爬取的网址是爬取网址
我们需要爬取游戏名人的姓名,关注量,粉丝量,微博量,地址和简介
设置headers,get请求访问网站,BeautifulSoup解析
这个网站有下一页选项,我们可以通过下一页选项,查看网址的变化情况
第一页网址如下:
第二页网址为:
观察得到:第一页和第二页的网址只有一个地方发生了变化,就是page属性,第一页为1,第二页为2以此类推,我们有111页,做111次循环即可获取所有url信息
for i in range(1,112):
url = 'https://d.weibo.com/1087030002_2975_2019_0?page={0}#Pl_Core_F4RightUserList__4'.format(i)
headers = {
'cookie': 'SUB=_2AkMqsmVqf8NxqwJRmP4QxW_lZItxyQvEieKc7pSxJRMxHRl-yT9kqlUMtRB6ATJLhQPCOWG7wxuc5v0FC-d9AWBglQ_Y; SUBP=0033WrSXqPxfM72-Ws9jqgMF55529P9D9W5bZc-nbvDZeZk_rAigVCoy; login_sid_t=85df6a57ea9f6a5fa01a9ea6483f42be; cross_origin_proto=SSL; _s_tentry=passport.weibo.com; Apache=7143900905628.509.1575938659425; SINAGLOBAL=7143900905628.509.1575938659425; ULV=1575938659431:1:1:1:7143900905628.509.1575938659425:; TC-Page-G0=153ff31dae1cf71cc65e7e399bfce283|1575940042|1575939977',
'user-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36'
}
r = requests.get(url,headers=headers)
r_b = BeautifulSoup(r.text,'lxml')
f12找到名字的html标签信息
找到了,通过find_all()方法
print(r_b.find_all('strong'))
可是打印结果却是这样
各种检查,strong标签确实在html中啊,之后google
各种查资料,终于解决了
开始填坑
我们现在的网址不是我们所要爬取数据的真正网址,我们打开f12,找到Network,点击All,f5刷新下,看到如下的内容
然后我们点击下一页
下面会刷出来一些数据,在这些数据中就有我们所需要的网址
点击这条链接
看到这个信息,看到有一个url链接和我们现在的很像,他会不会就是我们真正的链接呢,放上去试一试
for i in range(1,112):
url = 'https://d.weibo.com/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page={0}&ajaxpagelet=1&__ref=/1087030002_2975_2019_0&_t=FM_157596805800930'.format(i)
headers = {
'cookie': 'SUB=_2AkMqsmVqf8NxqwJRmP4QxW_lZItxyQvEieKc7pSxJRMxHRl-yT9kqlUMtRB6ATJLhQPCOWG7wxuc5v0FC-d9AWBglQ_Y; SUBP=0033WrSXqPxfM72-Ws9jqgMF55529P9D9W5bZc-nbvDZeZk_rAigVCoy; login_sid_t=85df6a57ea9f6a5fa01a9ea6483f42be; cross_origin_proto=SSL; _s_tentry=passport.weibo.com; Apache=7143900905628.509.1575938659425; SINAGLOBAL=7143900905628.509.1575938659425; ULV=1575938659431:1:1:1:7143900905628.509.1575938659425:; TC-Page-G0=153ff31dae1cf71cc65e7e399bfce283|1575940042|1575939977',
'user-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36'
}
r = requests.get(url,headers=headers)
r_b = BeautifulSoup(r.text,'lxml')
print(r_b.find_all('strong'))
可是打印结果还是一样
还是得不到我们的数据,怎么办呢
我们点击Response
里面只有一个script标签,我们需要的html就在这个标签中,通过find()方法获取这个标签
print(r_b.find('script'))
<script>parent.FM.view({"ns":"pl.content.signInPeople.index","domid":"Pl_Core_F4RightUserList__4","css":["style/css/module/pagecard/PCD_followlist.css?version=9976a69e88ea8db2"],"js":"page/js/pl/content/signInPeople/index.js?version=3ba7895f52a15f9a","html":"<div class=\"WB_cardwrap S_bg2\">\r\n \t\t\t\t\t\t<!--粉丝列表模块-->\r\n <div class=\"PCD_followlist\">\r\n <div class=\"WB_innerwrap\">\r\n <div class=\"follow_box\">\r\n <div class=\"follow_inner\">\r\n <ul class=\"follow_list\">\r\n <li class=\"follow_item S_line2\">\r\n <dl class=\"clearfix\">\r\n <dt class=\"mod_pic\">\r\n <a href=\"\/\/weibo.com\/959wjw?refer_flag=1087030701_2975_2019_0\" title=\"Chiyuuuuu\" target=\"_blank\">\r\n <img alt=\"Chiyuuuuu\" src=\"https:\/\/tvax4.sinaimg.cn\/crop.0.0.1080.1080.50\/86ce34d4ly8g3sfmooq1nj20u00u0tcd.jpg?KID=imgbed,tva&Expires=1575979860&ssig=jCJf8D%2BLUW\" usercard=\"id=2261660884&refer_flag=1087030701_2975_2019_0\" width=\"50\" height=\"50\" alt=\"\">\r\n <\/a>\r\n <\/dt>\r\n <dd class=\"mod_info S_line1\">\r\n <div class=\"info_name W_fb W_f14\">\r\n <a class=\"S_txt1\" target=\"_blank\" usercard=\"id=2261660884&refer_flag=1087030701_2975_2019_0\" target=\"_blank\" href=\"\/\/weibo.com\/959wjw?refer_flag=1087030701_2975_2019_0\" title=\"Chiyuuuuu\">\r\n \t<strong usercard=\"id=2261660884&refer_flag=1087030701_2975_2019_0\" >Chiyuuuuu<\/strong>\r\n <\/a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a target=\"_blank\" href=\"\/\/verified.weibo.com\/verify\"><i title= \"微博个人认证 \" class=\"W_icon icon_approve\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a title=\"微博会员\" target=\"_blank\" href=\"https:\/\/vip.weibo.com\/personal?from=main\" action-type=\"ignore_list\"suda-uatrack=\"key=profile_head&value=member_guest\"><i class=\"W_icon icon_member\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class=\"W_icon icon_female\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n <\/div>\r\n <div class=\"info_connect\">\r\n <span class=\"conn_type\">关注<em class=\"count\">648<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">粉丝<em class=\"count\">25419<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">微博<em class=\"count\">7917<\/em><\/span>\r\n <\/div>\r\n <div class=\"info_add\"><em class=\"tit S_txt2\">地址<\/em><span>其他<\/span><\/div>\r\n <div class=\"info_intro\"><em class=\"tit S_txt2\">简介<\/em><span>知名游戏博主<\/span><\/div>\r\n <\/dd>\r\n <dd class=\"opt_box\" node-type=\"opt_box\" layout-shell=\"false\">\r\n \t\t\t\t\t\t\t\t<span node-type=\"widget_followBtnBox\" action-data=\"f=1&uid=2261660884&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href=\"javascript:;\" action-type=\"follow\" action-data=\"template=2&uid=2261660884&fnick=Chiyuuuuu&nogroup=1&unlogin=1\" class=\"W_btn_b btn_22px\"><em class=\"W_ficon ficon_add S_ficon\">+<\/em>关注<\/a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\r\n <\/dd>\r\n <\/dl>\r\n <\/li>\r\n <li class=\"follow_item S_line2\">\r\n <dl class=\"clearfix\">\r\n <dt class=\"mod_pic\">\r\n <a href=\"\/\/weibo.com\/u\/2085026753?refer_flag=1087030701_2975_2019_0\" title=\"游戏建筑师\" target=\"_blank\">\r\n <img alt=\"游戏建筑师\" src=\"https:\/\/tvax4.sinaimg.cn\/crop.77.15.217.217.50\/7c46fbc1ly8g0aduw572jj20av06oaal.jpg?KID=imgbed,tva&Expires=1575979860&ssig=ZrdiSsmpIN\" usercard=\"id=2085026753&refer_flag=1087030701_2975_2019_0\" width=\"50\" height=\"50\" alt=\"\">\r\n <\/a>\r\n <\/dt>\r\n <dd class=\"mod_info S_line1\">\r\n <div class=\"info_name W_fb W_f14\">\r\n <a class=\"S_txt1\" target=\"_blank\" usercard=\"id=2085026753&refer_flag=1087030701_2975_2019_0\" target=\"_blank\" href=\"\/\/weibo.com\/u\/2085026753?refer_flag=1087030701_2975_2019_0\" title=\"游戏建筑师\">\r\n \t<strong usercard=\"id=2085026753&refer_flag=1087030701_2975_2019_0\" >游戏建筑师<\/strong>\r\n <\/a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class=\"W_icon icon_male\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n <\/div>\r\n <div class=\"info_connect\">\r\n <span class=\"conn_type\">关注<em class=\"count\">515<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">粉丝<em class=\"count\">34万<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">微博<em class=\"count\">8454<\/em><\/span>\r\n <\/div>\r\n <div class=\"info_add\"><em class=\"tit S_txt2\">地址<\/em><span>上海 崇明县<\/span><\/div>\r\n <div class=\"info_intro\"><em class=\"tit S_txt2\">简介<\/em><span><\/span><\/div>\r\n <\/dd>\r\n <dd class=\"opt_box\" node-type=\"opt_box\" layout-shell=\"false\">\r\n \t\t\t\t\t\t\t\t<span node-type=\"widget_followBtnBox\" action-data=\"f=1&uid=2085026753&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href=\"javascript:;\" action-type=\"follow\" action-data=\"template=2&uid=2085026753&fnick=游戏建筑师&nogroup=1&unlogin=1\" class=\"W_btn_b btn_22px\"><em class=\"W_ficon ficon_add S_ficon\">+<\/em>关注<\/a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\r\n <\/dd>\r\n <\/dl>\r\n <\/li>\r\n <li class=\"follow_item S_line2\">\r\n <dl class=\"clearfix\">\r\n <dt class=\"mod_pic\">\r\n <a href=\"\/\/weibo.com\/u\/5772823670?refer_flag=1087030701_2975_2019_0\" title=\"炉石春哥\" target=\"_blank\">\r\n <img alt=\"炉石春哥\" src=\"https:\/\/tvax1.sinaimg.cn\/crop.21.0.1082.1082.50\/006iGb9cly8fme67d4br2j30v90u2jtx.jpg?KID=imgbed,tva&Expires=1575979860&ssig=ibnYO43mjL\" usercard=\"id=5772823670&refer_flag=1087030701_2975_2019_0\" width=\"50\" height=\"50\" alt=\"\">\r\n <\/a>\r\n <\/dt>\r\n <dd class=\"mod_info S_line1\">\r\n <div class=\"info_name W_fb W_f14\">\r\n <a class=\"S_txt1\" target=\"_blank\" usercard=\"id=5772823670&refer_flag=1087030701_2975_2019_0\" target=\"_blank\" href=\"\/\/weibo.com\/u\/5772823670?refer_flag=1087030701_2975_2019_0\" title=\"炉石春哥\">\r\n \t<strong usercard=\"id=5772823670&refer_flag=1087030701_2975_2019_0\" >炉石春哥<\/strong>\r\n <\/a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a target=\"_blank\" href=\"\/\/verified.weibo.com\/verify\"><i title= \"微博个人认证 \" class=\"W_icon icon_approve\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class=\"W_icon icon_male\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n <\/div>\r\n <div class=\"info_connect\">\r\n <span class=\"conn_type\">关注<em class=\"count\">97<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">粉丝<em class=\"count\">15万<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">微博<em class=\"count\">576<\/em><\/span>\r\n <\/div>\r\n <div class=\"info_add\"><em class=\"tit S_txt2\">地址<\/em><span>江苏 南通<\/span><\/div>\r\n <div class=\"info_intro\"><em class=\"tit S_txt2\">简介<\/em><span>虎牙直播签约主播<\/span><\/div>\r\n <div class=\"info_relation\">标签:电子竞技<\/div>\r\n <\/dd>\r\n <dd class=\"opt_box\" node-type=\"opt_box\" layout-shell=\"false\">\r\n \t\t\t\t\t\t\t\t<span node-type=\"widget_followBtnBox\" action-data=\"f=1&uid=5772823670&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href=\"javascript:;\" action-type=\"follow\" action-data=\"template=2&uid=5772823670&fnick=炉石春哥&nogroup=1&unlogin=1\" class=\"W_btn_b btn_22px\"><em class=\"W_ficon ficon_add S_ficon\">+<\/em>关注<\/a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\r\n <\/dd>\r\n <\/dl>\r\n <\/li>\r\n <li class=\"follow_item S_line2\">\r\n <dl class=\"clearfix\">\r\n <dt class=\"mod_pic\">\r\n <a href=\"\/\/weibo.com\/u\/5759020845?refer_flag=1087030701_2975_2019_0\" title=\"狮子汪宝宝\" target=\"_blank\">\r\n <img alt=\"狮子汪宝宝\" src=\"https:\/\/tvax4.sinaimg.cn\/crop.0.0.1080.1080.50\/006hKgoZly8g6fzcy1jhmj30u00u0gn0.jpg?KID=imgbed,tva&Expires=1575979624&ssig=3lZvqcLAK8\" usercard=\"id=5759020845&refer_flag=1087030701_2975_2019_0\" width=\"50\" height=\"50\" alt=\"\">\r\n <\/a>\r\n <\/dt>\r\n <dd class=\"mod_info S_line1\">\r\n <div class=\"info_name W_fb W_f14\">\r\n <a class=\"S_txt1\" target=\"_blank\" usercard=\"id=5759020845&refer_flag=1087030701_2975_2019_0\" target=\"_blank\" href=\"\/\/weibo.com\/u\/5759020845?refer_flag=1087030701_2975_2019_0\" title=\"狮子汪宝宝\">\r\n \t<strong usercard=\"id=5759020845&refer_flag=1087030701_2975_2019_0\" >狮子汪宝宝<\/strong>\r\n <\/a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a target=\"_blank\" href=\"\/\/verified.weibo.com\/verify\"><i title= \"微博个人认证 \" class=\"W_icon icon_approve\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a title=\"微博会员\" target=\"_blank\" href=\"https:\/\/vip.weibo.com\/personal?from=main\" action-type=\"ignore_list\"suda-uatrack=\"key=profile_head&value=member_guest\"><i class=\"W_icon icon_member\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class=\"W_icon icon_male\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n <\/div>\r\n <div class=\"info_connect\">\r\n <span class=\"conn_type\">关注<em class=\"count\">23<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">粉丝<em class=\"count\">99860<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">微博<em class=\"count\">393<\/em><\/span>\r\n <\/div>\r\n <div class=\"info_add\"><em class=\"tit S_txt2\">地址<\/em><span>湖南 长沙<\/span><\/div>\r\n <div class=\"info_intro\"><em class=\"tit S_txt2\">简介<\/em><span>虎牙直播签约主播<\/span><\/div>\r\n <div class=\"info_relation\">标签:Dota<\/div>\r\n <\/dd>\r\n <dd class=\"opt_box\" node-type=\"opt_box\" layout-shell=\"false\">\r\n \t\t\t\t\t\t\t\t<span node-type=\"widget_followBtnBox\" action-data=\"f=1&uid=5759020845&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href=\"javascript:;\" action-type=\"follow\" action-data=\"template=2&uid=5759020845&fnick=狮子汪宝宝&nogroup=1&unlogin=1\" class=\"W_btn_b btn_22px\"><em class=\"W_ficon ficon_add S_ficon\">+<\/em>关注<\/a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\r\n <\/dd>\r\n <\/dl>\r\n <\/li>\r\n <li class=\"follow_item S_line2\">\r\n <dl class=\"clearfix\">\r\n <dt class=\"mod_pic\">\r\n <a href=\"\/\/weibo.com\/fanqiebaobei?refer_flag=1087030701_2975_2019_0\" title=\"江某某吧\" target=\"_blank\">\r\n <img alt=\"江某某吧\" src=\"https:\/\/tvax4.sinaimg.cn\/crop.0.0.751.751.50\/00600dl0ly8g17vsgxnu5j30kv0kvwf7.jpg?KID=imgbed,tva&Expires=1575979624&ssig=FqNmS4xkIJ\" usercard=\"id=5496848266&refer_flag=1087030701_2975_2019_0\" width=\"50\" height=\"50\" alt=\"\">\r\n <\/a>\r\n <\/dt>\r\n <dd class=\"mod_info S_line1\">\r\n <div class=\"info_name W_fb W_f14\">\r\n <a class=\"S_txt1\" target=\"_blank\" usercard=\"id=5496848266&refer_flag=1087030701_2975_2019_0\" target=\"_blank\" href=\"\/\/weibo.com\/fanqiebaobei?refer_flag=1087030701_2975_2019_0\" title=\"江某某吧\">\r\n \t<strong usercard=\"id=5496848266&refer_flag=1087030701_2975_2019_0\" >江某某吧<\/strong>\r\n <\/a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class=\"W_icon icon_female\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n <\/div>\r\n <div class=\"info_connect\">\r\n <span class=\"conn_type\">关注<em class=\"count\">255<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">粉丝<em class=\"count\">23780<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">微博<em class=\"count\">249<\/em><\/span>\r\n <\/div>\r\n <div class=\"info_add\"><em class=\"tit S_txt2\">地址<\/em><span>上海 浦东新区<\/span><\/div>\r\n <div class=\"info_intro\"><em class=\"tit S_txt2\">简介<\/em><span>wb唯一账号:江某某吧 dy唯一账号:15152344 (本人无公会公司无商业行为.所拍摄影像也属个人爱好.如有直播也是佛系)<\/span><\/div>\r\n <div class=\"info_relation\">标签:网络游戏<\/div>\r\n <\/dd>\r\n <dd class=\"opt_box\" node-type=\"opt_box\" layout-shell=\"false\">\r\n \t\t\t\t\t\t\t\t<span node-type=\"widget_followBtnBox\" action-data=\"f=1&uid=5496848266&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href=\"javascript:;\" action-type=\"follow\" action-data=\"template=2&uid=5496848266&fnick=江某某吧&nogroup=1&unlogin=1\" class=\"W_btn_b btn_22px\"><em class=\"W_ficon ficon_add S_ficon\">+<\/em>关注<\/a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\r\n <\/dd>\r\n <\/dl>\r\n <\/li>\r\n <li class=\"follow_item S_line2\">\r\n <dl class=\"clearfix\">\r\n <dt class=\"mod_pic\">\r\n <a href=\"\/\/weibo.com\/u\/5845947987?refer_flag=1087030701_2975_2019_0\" title=\"游戏情报迷\" target=\"_blank\">\r\n <img alt=\"游戏情报迷\" src=\"https:\/\/tvax2.sinaimg.cn\/crop.0.0.888.888.50\/006nD07Fly8fwq126hu45j30oo0oo40s.jpg?KID=imgbed,tva&Expires=1575979860&ssig=%2FLAazZbX7I\" usercard=\"id=5845947987&refer_flag=1087030701_2975_2019_0\" width=\"50\" height=\"50\" alt=\"\">\r\n <\/a>\r\n <\/dt>\r\n <dd class=\"mod_info S_line1\">\r\n <div class=\"info_name W_fb W_f14\">\r\n <a class=\"S_txt1\" target=\"_blank\" usercard=\"id=5845947987&refer_flag=1087030701_2975_2019_0\" target=\"_blank\" href=\"\/\/weibo.com\/u\/5845947987?refer_flag=1087030701_2975_2019_0\" title=\"游戏情报迷\">\r\n \t<strong usercard=\"id=5845947987&refer_flag=1087030701_2975_2019_0\" >游戏情报迷<\/strong>\r\n <\/a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a target=\"_blank\" href=\"\/\/verified.weibo.com\/verify\"><i title= \"微博个人认证 \" class=\"W_icon icon_approve_gold\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a title=\"微博会员\" target=\"_blank\" href=\"https:\/\/vip.weibo.com\/personal?from=main\" action-type=\"ignore_list\"suda-uatrack=\"key=profile_head&value=member_guest\"><i class=\"W_icon icon_member\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class=\"W_icon icon_female\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n <\/div>\r\n <div class=\"info_connect\">\r\n <span class=\"conn_type\">关注<em class=\"count\">130<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">粉丝<em class=\"count\">122万<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">微博<em class=\"count\">733<\/em><\/span>\r\n <\/div>\r\n <div class=\"info_add\"><em class=\"tit S_txt2\">地址<\/em><span>北京<\/span><\/div>\r\n <div class=\"info_intro\"><em class=\"tit S_txt2\">简介<\/em><span>知名游戏博主<\/span><\/div>\r\n <div class=\"info_relation\">标签:网络游戏<\/div>\r\n <\/dd>\r\n <dd class=\"opt_box\" node-type=\"opt_box\" layout-shell=\"false\">\r\n \t\t\t\t\t\t\t\t<span node-type=\"widget_followBtnBox\" action-data=\"f=1&uid=5845947987&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href=\"javascript:;\" action-type=\"follow\" action-data=\"template=2&uid=5845947987&fnick=游戏情报迷&nogroup=1&unlogin=1\" class=\"W_btn_b btn_22px\"><em class=\"W_ficon ficon_add S_ficon\">+<\/em>关注<\/a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\r\n <\/dd>\r\n <\/dl>\r\n <\/li>\r\n <li class=\"follow_item S_line2\">\r\n <dl class=\"clearfix\">\r\n <dt class=\"mod_pic\">\r\n <a href=\"\/\/weibo.com\/lgdyao?refer_flag=1087030701_2975_2019_0\" title=\"Yao姚峥峥\" target=\"_blank\">\r\n <img alt=\"Yao姚峥峥\" src=\"https:\/\/tvax3.sinaimg.cn\/crop.0.0.512.512.50\/7fc19629ly8g6yk0ae7n4j20e80e8aab.jpg?KID=imgbed,tva&Expires=1575979860&ssig=JwsHrUTGl%2B\" usercard=\"id=2143393321&refer_flag=1087030701_2975_2019_0\" width=\"50\" height=\"50\" alt=\"\">\r\n <\/a>\r\n <\/dt>\r\n <dd class=\"mod_info S_line1\">\r\n <div class=\"info_name W_fb W_f14\">\r\n <a class=\"S_txt1\" target=\"_blank\" usercard=\"id=2143393321&refer_flag=1087030701_2975_2019_0\" target=\"_blank\" href=\"\/\/weibo.com\/lgdyao?refer_flag=1087030701_2975_2019_0\" title=\"Yao姚峥峥\">\r\n \t<strong usercard=\"id=2143393321&refer_flag=1087030701_2975_2019_0\" >Yao姚峥峥<\/strong>\r\n <\/a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a target=\"_blank\" href=\"\/\/verified.weibo.com\/verify\"><i title= \"微博个人认证 \" class=\"W_icon icon_approve\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a title=\"微博会员\" target=\"_blank\" href=\"https:\/\/vip.weibo.com\/personal?from=main\" action-type=\"ignore_list\"suda-uatrack=\"key=profile_head&value=member_guest\"><i class=\"W_icon icon_member\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class=\"W_icon icon_male\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n <\/div>\r\n <div class=\"info_connect\">\r\n <span class=\"conn_type\">关注<em class=\"count\">513<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">粉丝<em class=\"count\">22万<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">微博<em class=\"count\">1094<\/em><\/span>\r\n <\/div>\r\n <div class=\"info_add\"><em class=\"tit S_txt2\">地址<\/em><span>湖南 长沙<\/span><\/div>\r\n <div class=\"info_intro\"><em class=\"tit S_txt2\">简介<\/em><span>LGD.Forever Young战队队员<\/span><\/div>\r\n <div class=\"info_relation\">标签:电子竞技<\/div>\r\n <\/dd>\r\n <dd class=\"opt_box\" node-type=\"opt_box\" layout-shell=\"false\">\r\n \t\t\t\t\t\t\t\t<span node-type=\"widget_followBtnBox\" action-data=\"f=1&uid=2143393321&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href=\"javascript:;\" action-type=\"follow\" action-data=\"template=2&uid=2143393321&fnick=Yao姚峥峥&nogroup=1&unlogin=1\" class=\"W_btn_b btn_22px\"><em class=\"W_ficon ficon_add S_ficon\">+<\/em>关注<\/a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\r\n <\/dd>\r\n <\/dl>\r\n <\/li>\r\n <li class=\"follow_item S_line2\">\r\n <dl class=\"clearfix\">\r\n <dt class=\"mod_pic\">\r\n <a href=\"\/\/weibo.com\/IamJal?refer_flag=1087030701_2975_2019_0\" title=\"JaL听后摇滚来滚去\" target=\"_blank\">\r\n <img alt=\"JaL听后摇滚来滚去\" src=\"https:\/\/tvax4.sinaimg.cn\/crop.16.0.1093.1093.50\/5ccd7a44ly8fk8xpj7iqnj20v90udmzi.jpg?KID=imgbed,tva&Expires=1575979624&ssig=LkVLu4lzLv\" usercard=\"id=1556970052&refer_flag=1087030701_2975_2019_0\" width=\"50\" height=\"50\" alt=\"\">\r\n <\/a>\r\n <\/dt>\r\n <dd class=\"mod_info S_line1\">\r\n <div class=\"info_name W_fb W_f14\">\r\n <a class=\"S_txt1\" target=\"_blank\" usercard=\"id=1556970052&refer_flag=1087030701_2975_2019_0\" target=\"_blank\" href=\"\/\/weibo.com\/IamJal?refer_flag=1087030701_2975_2019_0\" title=\"JaL听后摇滚来滚去\">\r\n \t<strong usercard=\"id=1556970052&refer_flag=1087030701_2975_2019_0\" >JaL听后摇滚来滚去<\/strong>\r\n <\/a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a target=\"_blank\" href=\"\/\/verified.weibo.com\/verify\"><i title= \"微博个人认证 \" class=\"W_icon icon_approve\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class=\"W_icon icon_male\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n <\/div>\r\n <div class=\"info_connect\">\r\n <span class=\"conn_type\">关注<em class=\"count\">646<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">粉丝<em class=\"count\">28081<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">微博<em class=\"count\">787<\/em><\/span>\r\n <\/div>\r\n <div class=\"info_add\"><em class=\"tit S_txt2\">地址<\/em><span>上海 普陀区<\/span><\/div>\r\n <div class=\"info_intro\"><em class=\"tit S_txt2\">简介<\/em><span>VG电子竞技俱乐部Dota2分部经理<\/span><\/div>\r\n <div class=\"info_relation\">标签:电子竞技<\/div>\r\n <\/dd>\r\n <dd class=\"opt_box\" node-type=\"opt_box\" layout-shell=\"false\">\r\n \t\t\t\t\t\t\t\t<span node-type=\"widget_followBtnBox\" action-data=\"f=1&uid=1556970052&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href=\"javascript:;\" action-type=\"follow\" action-data=\"template=2&uid=1556970052&fnick=JaL听后摇滚来滚去&nogroup=1&unlogin=1\" class=\"W_btn_b btn_22px\"><em class=\"W_ficon ficon_add S_ficon\">+<\/em>关注<\/a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\r\n <\/dd>\r\n <\/dl>\r\n <\/li>\r\n <li class=\"follow_item S_line2\">\r\n <dl class=\"clearfix\">\r\n <dt class=\"mod_pic\">\r\n <a href=\"\/\/weibo.com\/u\/6068787464?refer_flag=1087030701_2975_2019_0\" title=\"腾讯WeGame\" target=\"_blank\">\r\n <img alt=\"腾讯WeGame\" src=\"https:\/\/tvax2.sinaimg.cn\/crop.0.0.1108.1108.50\/006CI0QMly8finzfk7qr5j30us0us0v7.jpg?KID=imgbed,tva&Expires=1575979860&ssig=rUfvNUcMyG\" usercard=\"id=6068787464&refer_flag=1087030701_2975_2019_0\" width=\"50\" height=\"50\" alt=\"\">\r\n <\/a>\r\n <\/dt>\r\n <dd class=\"mod_info S_line1\">\r\n <div class=\"info_name W_fb W_f14\">\r\n <a class=\"S_txt1\" target=\"_blank\" usercard=\"id=6068787464&refer_flag=1087030701_2975_2019_0\" target=\"_blank\" href=\"\/\/weibo.com\/u\/6068787464?refer_flag=1087030701_2975_2019_0\" title=\"腾讯WeGame\">\r\n \t<strong usercard=\"id=6068787464&refer_flag=1087030701_2975_2019_0\" >腾讯WeGame<\/strong>\r\n <\/a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a target=\"_blank\" href=\"\/\/fuwu.biz.weibo.com\"><i title= \"微博官方认证\" class=\"W_icon_co1 icon_approve_co\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a title=\"微博会员\" target=\"_blank\" href=\"https:\/\/vip.weibo.com\/personal?from=main\" action-type=\"ignore_list\"suda-uatrack=\"key=profile_head&value=member_guest\"><i class=\"W_icon icon_member\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class=\"W_icon icon_male\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n <\/div>\r\n <div class=\"info_connect\">\r\n <span class=\"conn_type\">关注<em class=\"count\">107<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">粉丝<em class=\"count\">36万<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">微博<em class=\"count\">740<\/em><\/span>\r\n <\/div>\r\n <div class=\"info_add\"><em class=\"tit S_txt2\">地址<\/em><span>广东<\/span><\/div>\r\n <div class=\"info_intro\"><em class=\"tit S_txt2\">简介<\/em><span>腾讯WeGame官方微博<\/span><\/div>\r\n <div class=\"info_relation\">标签:Dota<\/div>\r\n <\/dd>\r\n <dd class=\"opt_box\" node-type=\"opt_box\" layout-shell=\"false\">\r\n \t\t\t\t\t\t\t\t<span node-type=\"widget_followBtnBox\" action-data=\"f=1&uid=6068787464&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href=\"javascript:;\" action-type=\"follow\" action-data=\"template=2&uid=6068787464&fnick=腾讯WeGame&nogroup=1&unlogin=1\" class=\"W_btn_b btn_22px\"><em class=\"W_ficon ficon_add S_ficon\">+<\/em>关注<\/a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\r\n <\/dd>\r\n <\/dl>\r\n <\/li>\r\n <li class=\"follow_item S_line2\">\r\n <dl class=\"clearfix\">\r\n <dt class=\"mod_pic\">\r\n <a href=\"\/\/weibo.com\/u\/3518039161?refer_flag=1087030701_2975_2019_0\" title=\"奶弟NaiDi\" target=\"_blank\">\r\n <img alt=\"奶弟NaiDi\" src=\"https:\/\/tvax3.sinaimg.cn\/crop.0.0.888.888.50\/d1b10479ly8fqsmhod976j20oo0oowgj.jpg?KID=imgbed,tva&Expires=1575979860&ssig=gjnIMJse2C\" usercard=\"id=3518039161&refer_flag=1087030701_2975_2019_0\" width=\"50\" height=\"50\" alt=\"\">\r\n <\/a>\r\n <\/dt>\r\n <dd class=\"mod_info S_line1\">\r\n <div class=\"info_name W_fb W_f14\">\r\n <a class=\"S_txt1\" target=\"_blank\" usercard=\"id=3518039161&refer_flag=1087030701_2975_2019_0\" target=\"_blank\" href=\"\/\/weibo.com\/u\/3518039161?refer_flag=1087030701_2975_2019_0\" title=\"奶弟NaiDi\">\r\n \t<strong usercard=\"id=3518039161&refer_flag=1087030701_2975_2019_0\" >奶弟NaiDi<\/strong>\r\n <\/a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a target=\"_blank\" href=\"\/\/verified.weibo.com\/verify\"><i title= \"微博个人认证 \" class=\"W_icon icon_approve\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class=\"W_icon icon_male\"><\/i><\/a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n <\/div>\r\n <div class=\"info_connect\">\r\n <span class=\"conn_type\">关注<em class=\"count\">317<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">粉丝<em class=\"count\">20万<\/em><\/span>\r\n <span class=\"conn_type W_vline S_line1\">微博<em class=\"count\">312<\/em><\/span>\r\n <\/div>\r\n <div class=\"info_add\"><em class=\"tit S_txt2\">地址<\/em><span>上海 长宁区<\/span><\/div>\r\n <div class=\"info_intro\"><em class=\"tit S_txt2\">简介<\/em><span>量子体育VSPN解说<\/span><\/div>\r\n <div class=\"info_relation\">标签:电子竞技<\/div>\r\n <\/dd>\r\n <dd class=\"opt_box\" node-type=\"opt_box\" layout-shell=\"false\">\r\n \t\t\t\t\t\t\t\t<span node-type=\"widget_followBtnBox\" action-data=\"f=1&uid=3518039161&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href=\"javascript:;\" action-type=\"follow\" action-data=\"template=2&uid=3518039161&fnick=奶弟NaiDi&nogroup=1&unlogin=1\" class=\"W_btn_b btn_22px\"><em class=\"W_ficon ficon_add S_ficon\">+<\/em>关注<\/a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\r\n <\/dd>\r\n <\/dl>\r\n <\/li>\r\n \r\n <\/ul>\r\n <\/div>\r\n \r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"WB_cardpage S_line1\" >\r\n <div class=\"W_pages\">\r\n\t\t<a class=\"page prev S_txt1 S_line1 page_dis\" ><span>上一页<\/span><\/a>\r\n\t\t\r\n\t\t\t\t\t\t\t\t\t<a bpfilter=\"page\" class=\"page S_txt1 S_bg1\">1<\/a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a bpfilter=\"page\" class=\"page S_txt1\" href=\"\/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=2#Pl_Core_F4RightUserList__4\">2<\/a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a bpfilter=\"page\" class=\"page S_txt1\" href=\"\/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=3#Pl_Core_F4RightUserList__4\">3<\/a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a bpfilter=\"page\" class=\"page S_txt1\" href=\"\/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=4#Pl_Core_F4RightUserList__4\">4<\/a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a bpfilter=\"page\" class=\"page S_txt1\" href=\"\/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=5#Pl_Core_F4RightUserList__4\">5<\/a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a bpfilter=\"page\" class=\"page S_txt1\" href=\"\/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=6#Pl_Core_F4RightUserList__4\">6<\/a>\r\n\t\t\t\t\t\t\t\t\t\t\t<a class=\"page S_txt2 page_dis\">...<\/a>\r\n\t\t\t\t\t\t\t\t\t\t\t<a bpfilter=\"page\" class=\"page S_txt1\" href=\"\/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=111#Pl_Core_F4RightUserList__4\">111<\/a>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t<a bpfilter=\"page\" class=\"page next S_txt1 S_line1\" href=\"\/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=2#Pl_Core_F4RightUserList__4\"><span>下一页<\/span><\/a>\r\n\t\t\t\t<\/div>\r\n<\/div>\r\n\t\t\t\t\t\t\t\t\t\t <\/div>\r\n \r\n <\/div>\r\n <\/div>\r\n \t\t <!--\/粉丝列表模块-->\r\n <\/div>\r\n"})</script>
输出结果如上,是一个script标签,我们的数据会不会就在这里面呢,
我们把可以测试一下,将这个script标签转成字符串,在判断某一个人名是否在这个字符串中,大概就可以确定我们的数据在不在这个script标签中了
script_list = r_b.find('script')
s = str(script_list)
print('电竞游戏菌' in s)
结果如下
True
我们要找的数据就在这个script标签中,但是怎么把这个标签转化为json呢,我没有想到什么其他好的方法,先获取script标签的内容,然后将这个标签内容变成字符串,然后进行切片,截取出其中的字典字符串,在将字符串转为字典
script_list = r_b.find('script')#找到script标签
str_script = str(script_list.string)#将script标签内容转为字符串
str_script = str_script[15:-1]#截取字符串中的字典字符串
script_dict = json.loads(str_script)#将字符串转为字典
print(script_dict)
得到字典内容如下
{'ns': 'pl.content.signInPeople.index', 'domid': 'Pl_Core_F4RightUserList__4', 'css': ['style/css/module/pagecard/PCD_followlist.css?version=9976a69e88ea8db2'], 'js': 'page/js/pl/content/signInPeople/index.js?version=3ba7895f52a15f9a', 'html': '<div class="WB_cardwrap S_bg2">\r\n \t\t\t\t\t\t<!--粉丝列表模块-->\r\n <div class="PCD_followlist">\r\n <div class="WB_innerwrap">\r\n <div class="follow_box">\r\n <div class="follow_inner">\r\n <ul class="follow_list">\r\n <li class="follow_item S_line2">\r\n <dl class="clearfix">\r\n <dt class="mod_pic">\r\n <a href="//weibo.com/u/6342288605?refer_flag=1087030701_2975_2019_0" title="电竞游戏菌" target="_blank">\r\n <img alt="电竞游戏菌" src="https://tvax1.sinaimg.cn/crop.0.0.751.751.50/006VdAZvly8fuyl5qodnhj30kv0kv75p.jpg?KID=imgbed,tva&Expires=1575980448&ssig=sybSN%2F8Bc0" usercard="id=6342288605&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">\r\n </a>\r\n </dt>\r\n <dd class="mod_info S_line1">\r\n <div class="info_name W_fb W_f14">\r\n <a class="S_txt1" target="_blank" usercard="id=6342288605&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/u/6342288605?refer_flag=1087030701_2975_2019_0" title="电竞游戏菌">\r\n \t<strong usercard="id=6342288605&refer_flag=1087030701_2975_2019_0" >电竞游戏菌</strong>\r\n </a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve_gold"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class="W_icon icon_female"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n </div>\r\n <div class="info_connect">\r\n <span class="conn_type">关注<em class="count">132</em></span>\r\n <span class="conn_type W_vline S_line1">粉丝<em class="count">695万</em></span>\r\n <span class="conn_type W_vline S_line1">微博<em class="count">3130</em></span>\r\n </div>\r\n <div class="info_add"><em class="tit S_txt2">地址</em><span>北京</span></div>\r\n <div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主 游戏视频自媒体</span></div>\r\n </dd>\r\n <dd class="opt_box" node-type="opt_box" layout-shell="false">\r\n \t\t\t\t\t\t\t\t<span node-type="widget_followBtnBox" action-data="f=1&uid=6342288605&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href="javascript:;" action-type="follow" action-data="template=2&uid=6342288605&fnick=电竞游戏菌&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\r\n </dd>\r\n </dl>\r\n </li>\r\n <li class="follow_item S_line2">\r\n <dl class="clearfix">\r\n <dt class="mod_pic">\r\n <a href="//weibo.com/u/6568022419?refer_flag=1087030701_2975_2019_0" title="王者荣耀玩家菌" target="_blank">\r\n <img alt="王者荣耀玩家菌" src="https://tvax1.sinaimg.cn/crop.0.0.512.512.50/007auKFtly8g2p4mz3nxgj30e80e8aat.jpg?KID=imgbed,tva&Expires=1575980555&ssig=AXbhTaJAut" usercard="id=6568022419&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">\r\n </a>\r\n </dt>\r\n <dd class="mod_info S_line1">\r\n <div class="info_name W_fb W_f14">\r\n <a class="S_txt1" target="_blank" usercard="id=6568022419&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/u/6568022419?refer_flag=1087030701_2975_2019_0" title="王者荣耀玩家菌">\r\n \t<strong usercard="id=6568022419&refer_flag=1087030701_2975_2019_0" >王者荣耀玩家菌</strong>\r\n </a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve_gold"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class="W_icon icon_female"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n </div>\r\n <div class="info_connect">\r\n <span class="conn_type">关注<em class="count">92</em></span>\r\n <span class="conn_type W_vline S_line1">粉丝<em class="count">442万</em></span>\r\n <span class="conn_type W_vline S_line1">微博<em class="count">1331</em></span>\r\n </div>\r\n <div class="info_add"><em class="tit S_txt2">地址</em><span>上海</span></div>\r\n <div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主</span></div>\r\n </dd>\r\n <dd class="opt_box" node-type="opt_box" layout-shell="false">\r\n \t\t\t\t\t\t\t\t<span node-type="widget_followBtnBox" action-data="f=1&uid=6568022419&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href="javascript:;" action-type="follow" action-data="template=2&uid=6568022419&fnick=王者荣耀玩家菌&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\r\n </dd>\r\n </dl>\r\n </li>\r\n <li class="follow_item S_line2">\r\n <dl class="clearfix">\r\n <dt class="mod_pic">\r\n <a href="//weibo.com/u/5587463354?refer_flag=1087030701_2975_2019_0" title="西卡_李浩宇" target="_blank">\r\n <img alt="西卡_李浩宇" src="https://tvax4.sinaimg.cn/crop.0.0.1080.1080.50/00668qsGly8g6tq2fe2egj30u00u0mz7.jpg?KID=imgbed,tva&Expires=1575980555&ssig=izq3KSt9Ip" usercard="id=5587463354&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">\r\n </a>\r\n </dt>\r\n <dd class="mod_info S_line1">\r\n <div class="info_name W_fb W_f14">\r\n <a class="S_txt1" target="_blank" usercard="id=5587463354&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/u/5587463354?refer_flag=1087030701_2975_2019_0" title="西卡_李浩宇">\r\n \t<strong usercard="id=5587463354&refer_flag=1087030701_2975_2019_0" >西卡_李浩宇</strong>\r\n </a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve_gold"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class="W_icon icon_male"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n </div>\r\n <div class="info_connect">\r\n <span class="conn_type">关注<em class="count">117</em></span>\r\n <span class="conn_type W_vline S_line1">粉丝<em class="count">580万</em></span>\r\n <span class="conn_type W_vline S_line1">微博<em class="count">589</em></span>\r\n </div>\r\n <div class="info_add"><em class="tit S_txt2">地址</em><span>上海 静安区</span></div>\r\n <div class="info_intro"><em class="tit S_txt2">简介</em><span>\xa0\xa0上海七煌信息科技有限公司游戏解说李浩宇</span></div>\r\n </dd>\r\n <dd class="opt_box" node-type="opt_box" layout-shell="false">\r\n \t\t\t\t\t\t\t\t<span node-type="widget_followBtnBox" action-data="f=1&uid=5587463354&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href="javascript:;" action-type="follow" action-data="template=2&uid=5587463354&fnick=西卡_李浩宇&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\r\n </dd>\r\n </dl>\r\n </li>\r\n <li class="follow_item S_line2">\r\n <dl class="clearfix">\r\n <dt class="mod_pic">\r\n <a href="//weibo.com/louisedai?refer_flag=1087030701_2975_2019_0" title="游戏少女小九九" target="_blank">\r\n <img alt="游戏少女小九九" src="https://tvax2.sinaimg.cn/crop.0.0.512.512.50/861e6f5dly8g7ek4j1188j20e80e8aae.jpg?KID=imgbed,tva&Expires=1575980285&ssig=QeHs1DXVk1" usercard="id=2250141533&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">\r\n </a>\r\n </dt>\r\n <dd class="mod_info S_line1">\r\n <div class="info_name W_fb W_f14">\r\n <a class="S_txt1" target="_blank" usercard="id=2250141533&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/louisedai?refer_flag=1087030701_2975_2019_0" title="游戏少女小九九">\r\n \t<strong usercard="id=2250141533&refer_flag=1087030701_2975_2019_0" >游戏少女小九九</strong>\r\n </a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve_gold"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class="W_icon icon_female"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n </div>\r\n <div class="info_connect">\r\n <span class="conn_type">关注<em class="count">100</em></span>\r\n <span class="conn_type W_vline S_line1">粉丝<em class="count">263万</em></span>\r\n <span class="conn_type W_vline S_line1">微博<em class="count">731</em></span>\r\n </div>\r\n <div class="info_add"><em class="tit S_txt2">地址</em><span>北京</span></div>\r\n <div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主</span></div>\r\n </dd>\r\n <dd class="opt_box" node-type="opt_box" layout-shell="false">\r\n \t\t\t\t\t\t\t\t<span node-type="widget_followBtnBox" action-data="f=1&uid=2250141533&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href="javascript:;" action-type="follow" action-data="template=2&uid=2250141533&fnick=游戏少女小九九&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\r\n </dd>\r\n </dl>\r\n </li>\r\n <li class="follow_item S_line2">\r\n <dl class="clearfix">\r\n <dt class="mod_pic">\r\n <a href="//weibo.com/u/2475189623?refer_flag=1087030701_2975_2019_0" title="手游女玩家" target="_blank">\r\n <img alt="手游女玩家" src="https://tvax2.sinaimg.cn/crop.0.0.1080.1080.50/93886577ly8fzna6s3flfj20u00u075u.jpg?KID=imgbed,tva&Expires=1575980285&ssig=j7BQN6zFxS" usercard="id=2475189623&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">\r\n </a>\r\n </dt>\r\n <dd class="mod_info S_line1">\r\n <div class="info_name W_fb W_f14">\r\n <a class="S_txt1" target="_blank" usercard="id=2475189623&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/u/2475189623?refer_flag=1087030701_2975_2019_0" title="手游女玩家">\r\n \t<strong usercard="id=2475189623&refer_flag=1087030701_2975_2019_0" >手游女玩家</strong>\r\n </a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve_gold"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class="W_icon icon_female"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n </div>\r\n <div class="info_connect">\r\n <span class="conn_type">关注<em class="count">244</em></span>\r\n <span class="conn_type W_vline S_line1">粉丝<em class="count">505万</em></span>\r\n <span class="conn_type W_vline S_line1">微博<em class="count">3748</em></span>\r\n </div>\r\n <div class="info_add"><em class="tit S_txt2">地址</em><span>北京</span></div>\r\n <div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主 游戏视频自媒体</span></div>\r\n </dd>\r\n <dd class="opt_box" node-type="opt_box" layout-shell="false">\r\n \t\t\t\t\t\t\t\t<span node-type="widget_followBtnBox" action-data="f=1&uid=2475189623&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href="javascript:;" action-type="follow" action-data="template=2&uid=2475189623&fnick=手游女玩家&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\r\n </dd>\r\n </dl>\r\n </li>\r\n <li class="follow_item S_line2">\r\n <dl class="clearfix">\r\n <dt class="mod_pic">\r\n <a href="//weibo.com/u/1230043607?refer_flag=1087030701_2975_2019_0" title="网瘾少年的游戏日常" target="_blank">\r\n <img alt="网瘾少年的游戏日常" src="https://tva4.sinaimg.cn/crop.0.0.700.700.50/4950f9d7jw8f7gbefl2m7j20jg0jgabm.jpg?KID=imgbed,tva&Expires=1575980448&ssig=vefko3EHy0" usercard="id=1230043607&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">\r\n </a>\r\n </dt>\r\n <dd class="mod_info S_line1">\r\n <div class="info_name W_fb W_f14">\r\n <a class="S_txt1" target="_blank" usercard="id=1230043607&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/u/1230043607?refer_flag=1087030701_2975_2019_0" title="网瘾少年的游戏日常">\r\n \t<strong usercard="id=1230043607&refer_flag=1087030701_2975_2019_0" >网瘾少年的游戏日常</strong>\r\n </a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class="W_icon icon_male"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n </div>\r\n <div class="info_connect">\r\n <span class="conn_type">关注<em class="count">266</em></span>\r\n <span class="conn_type W_vline S_line1">粉丝<em class="count">663万</em></span>\r\n <span class="conn_type W_vline S_line1">微博<em class="count">16235</em></span>\r\n </div>\r\n <div class="info_add"><em class="tit S_txt2">地址</em><span>海外 其他</span></div>\r\n <div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主 游戏视频自媒体</span></div>\r\n <div class="info_relation">标签:电子竞技</div>\r\n </dd>\r\n <dd class="opt_box" node-type="opt_box" layout-shell="false">\r\n \t\t\t\t\t\t\t\t<span node-type="widget_followBtnBox" action-data="f=1&uid=1230043607&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href="javascript:;" action-type="follow" action-data="template=2&uid=1230043607&fnick=网瘾少年的游戏日常&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\r\n </dd>\r\n </dl>\r\n </li>\r\n <li class="follow_item S_line2">\r\n <dl class="clearfix">\r\n <dt class="mod_pic">\r\n <a href="//weibo.com/u/5444117278?refer_flag=1087030701_2975_2019_0" title="UziQAQ" target="_blank">\r\n <img alt="UziQAQ" src="https://tvax1.sinaimg.cn/crop.0.0.1125.1125.50/005WqXBcly8fv193jk443j30v90v9goy.jpg?KID=imgbed,tva&Expires=1575980555&ssig=fRDgB32vrS" usercard="id=5444117278&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">\r\n </a>\r\n </dt>\r\n <dd class="mod_info S_line1">\r\n <div class="info_name W_fb W_f14">\r\n <a class="S_txt1" target="_blank" usercard="id=5444117278&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/u/5444117278?refer_flag=1087030701_2975_2019_0" title="UziQAQ">\r\n \t<strong usercard="id=5444117278&refer_flag=1087030701_2975_2019_0" >UziQAQ</strong>\r\n </a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve_gold"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class="W_icon icon_male"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n </div>\r\n <div class="info_connect">\r\n <span class="conn_type">关注<em class="count">122</em></span>\r\n <span class="conn_type W_vline S_line1">粉丝<em class="count">381万</em></span>\r\n <span class="conn_type W_vline S_line1">微博<em class="count">370</em></span>\r\n </div>\r\n <div class="info_add"><em class="tit S_txt2">地址</em><span>湖北 宜昌</span></div>\r\n <div class="info_intro"><em class="tit S_txt2">简介</em><span>RNG电子竞技俱乐部ADC队员</span></div>\r\n <div class="info_relation">标签:Dota</div>\r\n </dd>\r\n <dd class="opt_box" node-type="opt_box" layout-shell="false">\r\n \t\t\t\t\t\t\t\t<span node-type="widget_followBtnBox" action-data="f=1&uid=5444117278&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href="javascript:;" action-type="follow" action-data="template=2&uid=5444117278&fnick=UziQAQ&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\r\n </dd>\r\n </dl>\r\n </li>\r\n <li class="follow_item S_line2">\r\n <dl class="clearfix">\r\n <dt class="mod_pic">\r\n <a href="//weibo.com/234290240?refer_flag=1087030701_2975_2019_0" title="兔玩游戏" target="_blank">\r\n <img alt="兔玩游戏" src="https://tvax4.sinaimg.cn/crop.5.33.355.355.50/005vhJLPly8g7ql71h9lkj30b40b4js6.jpg?KID=imgbed,tva&Expires=1575980555&ssig=xtuyrvF6Zg" usercard="id=5042958097&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">\r\n </a>\r\n </dt>\r\n <dd class="mod_info S_line1">\r\n <div class="info_name W_fb W_f14">\r\n <a class="S_txt1" target="_blank" usercard="id=5042958097&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/234290240?refer_flag=1087030701_2975_2019_0" title="兔玩游戏">\r\n \t<strong usercard="id=5042958097&refer_flag=1087030701_2975_2019_0" >兔玩游戏</strong>\r\n </a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve_gold"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class="W_icon icon_female"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n </div>\r\n <div class="info_connect">\r\n <span class="conn_type">关注<em class="count">702</em></span>\r\n <span class="conn_type W_vline S_line1">粉丝<em class="count">661万</em></span>\r\n <span class="conn_type W_vline S_line1">微博<em class="count">47470</em></span>\r\n </div>\r\n <div class="info_add"><em class="tit S_txt2">地址</em><span>北京</span></div>\r\n <div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主</span></div>\r\n <div class="info_relation">标签:电子竞技</div>\r\n </dd>\r\n <dd class="opt_box" node-type="opt_box" layout-shell="false">\r\n \t\t\t\t\t\t\t\t<span node-type="widget_followBtnBox" action-data="f=1&uid=5042958097&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href="javascript:;" action-type="follow" action-data="template=2&uid=5042958097&fnick=兔玩游戏&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\r\n </dd>\r\n </dl>\r\n </li>\r\n <li class="follow_item S_line2">\r\n <dl class="clearfix">\r\n <dt class="mod_pic">\r\n <a href="//weibo.com/u/5791806870?refer_flag=1087030701_2975_2019_0" title="王者荣耀代练代打小星酱" target="_blank">\r\n <img alt="王者荣耀代练代打小星酱" src="https://tvax3.sinaimg.cn/crop.0.0.1080.1080.50/006jXPxQly8g1piyysz13j30u00u076a.jpg?KID=imgbed,tva&Expires=1575980555&ssig=MKEs2GXBHS" usercard="id=5791806870&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">\r\n </a>\r\n </dt>\r\n <dd class="mod_info S_line1">\r\n <div class="info_name W_fb W_f14">\r\n <a class="S_txt1" target="_blank" usercard="id=5791806870&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/u/5791806870?refer_flag=1087030701_2975_2019_0" title="王者荣耀代练代打小星酱">\r\n \t<strong usercard="id=5791806870&refer_flag=1087030701_2975_2019_0" >王者荣耀代练代打小星酱</strong>\r\n </a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class="W_icon icon_male"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n </div>\r\n <div class="info_connect">\r\n <span class="conn_type">关注<em class="count">778</em></span>\r\n <span class="conn_type W_vline S_line1">粉丝<em class="count">47万</em></span>\r\n <span class="conn_type W_vline S_line1">微博<em class="count">1766</em></span>\r\n </div>\r\n <div class="info_add"><em class="tit S_txt2">地址</em><span>广东</span></div>\r\n <div class="info_intro"><em class="tit S_txt2">简介</em><span>王者荣耀小星工作室诚信效率为本</span></div>\r\n <div class="info_relation">标签:电子竞技</div>\r\n </dd>\r\n <dd class="opt_box" node-type="opt_box" layout-shell="false">\r\n \t\t\t\t\t\t\t\t<span node-type="widget_followBtnBox" action-data="f=1&uid=5791806870&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href="javascript:;" action-type="follow" action-data="template=2&uid=5791806870&fnick=王者荣耀代练代打小星酱&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\r\n </dd>\r\n </dl>\r\n </li>\r\n <li class="follow_item S_line2">\r\n <dl class="clearfix">\r\n <dt class="mod_pic">\r\n <a href="//weibo.com/lolesports?refer_flag=1087030701_2975_2019_0" title="英雄联盟赛事" target="_blank">\r\n <img alt="英雄联盟赛事" src="https://tvax2.sinaimg.cn/crop.33.30.338.338.50/006hzhGely8g9jamcq9krj30b40b4myl.jpg?KID=imgbed,tva&Expires=1575980555&ssig=S0cC6L9qMn" usercard="id=5756404150&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">\r\n </a>\r\n </dt>\r\n <dd class="mod_info S_line1">\r\n <div class="info_name W_fb W_f14">\r\n <a class="S_txt1" target="_blank" usercard="id=5756404150&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/lolesports?refer_flag=1087030701_2975_2019_0" title="英雄联盟赛事">\r\n \t<strong usercard="id=5756404150&refer_flag=1087030701_2975_2019_0" >英雄联盟赛事</strong>\r\n </a>\r\n \t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve_gold"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a><i class="W_icon icon_male"></i></a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n </div>\r\n <div class="info_connect">\r\n <span class="conn_type">关注<em class="count">407</em></span>\r\n <span class="conn_type W_vline S_line1">粉丝<em class="count">338万</em></span>\r\n <span class="conn_type W_vline S_line1">微博<em class="count">26084</em></span>\r\n </div>\r\n <div class="info_add"><em class="tit S_txt2">地址</em><span>广东 深圳</span></div>\r\n <div class="info_intro"><em class="tit S_txt2">简介</em><span>英雄联盟赛事君</span></div>\r\n <div class="info_relation">标签:电子竞技</div>\r\n </dd>\r\n <dd class="opt_box" node-type="opt_box" layout-shell="false">\r\n \t\t\t\t\t\t\t\t<span node-type="widget_followBtnBox" action-data="f=1&uid=5756404150&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a href="javascript:;" action-type="follow" action-data="template=2&uid=5756404150&fnick=英雄联盟赛事&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\r\n </dd>\r\n </dl>\r\n </li>\r\n \r\n </ul>\r\n </div>\r\n \r\n\t\t\t\t\t\t\t\t\t\t\t<div class="WB_cardpage S_line1" >\r\n <div class="W_pages">\r\n\t\t<a class="page prev S_txt1 S_line1 page_dis" ><span>上一页</span></a>\r\n\t\t\r\n\t\t\t\t\t\t\t\t\t<a bpfilter="page" class="page S_txt1 S_bg1">1</a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a bpfilter="page" class="page S_txt1" href="/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=2#Pl_Core_F4RightUserList__4">2</a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a bpfilter="page" class="page S_txt1" href="/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=3#Pl_Core_F4RightUserList__4">3</a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a bpfilter="page" class="page S_txt1" href="/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=4#Pl_Core_F4RightUserList__4">4</a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a bpfilter="page" class="page S_txt1" href="/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=5#Pl_Core_F4RightUserList__4">5</a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a bpfilter="page" class="page S_txt1" href="/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=6#Pl_Core_F4RightUserList__4">6</a>\r\n\t\t\t\t\t\t\t\t\t\t\t<a class="page S_txt2 page_dis">...</a>\r\n\t\t\t\t\t\t\t\t\t\t\t<a bpfilter="page" class="page S_txt1" href="/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=111#Pl_Core_F4RightUserList__4">111</a>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t<a bpfilter="page" class="page next S_txt1 S_line1" href="/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=2#Pl_Core_F4RightUserList__4"><span>下一页</span></a>\r\n\t\t\t\t</div>\r\n</div>\r\n\t\t\t\t\t\t\t\t\t\t </div>\r\n \r\n </div>\r\n </div>\r\n \t\t <!--/粉丝列表模块-->\r\n </div>\r\n'}
观察这个字典,我们发现他有一个html的键值,我们将他输出看看
<div class="WB_cardwrap S_bg2">
<!--粉丝列表模块-->
<div class="PCD_followlist">
<div class="WB_innerwrap">
<div class="follow_box">
<div class="follow_inner">
<ul class="follow_list">
<li class="follow_item S_line2">
<dl class="clearfix">
<dt class="mod_pic">
<a href="//weibo.com/u/6342288605?refer_flag=1087030701_2975_2019_0" title="电竞游戏菌" target="_blank">
<img alt="电竞游戏菌" src="https://tvax1.sinaimg.cn/crop.0.0.751.751.50/006VdAZvly8fuyl5qodnhj30kv0kv75p.jpg?KID=imgbed,tva&Expires=1575980448&ssig=sybSN%2F8Bc0" usercard="id=6342288605&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">
</a>
</dt>
<dd class="mod_info S_line1">
<div class="info_name W_fb W_f14">
<a class="S_txt1" target="_blank" usercard="id=6342288605&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/u/6342288605?refer_flag=1087030701_2975_2019_0" title="电竞游戏菌">
<strong usercard="id=6342288605&refer_flag=1087030701_2975_2019_0" >电竞游戏菌</strong>
</a>
<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve_gold"></i></a> <a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a> <a><i class="W_icon icon_female"></i></a>
</div>
<div class="info_connect">
<span class="conn_type">关注<em class="count">132</em></span>
<span class="conn_type W_vline S_line1">粉丝<em class="count">695万</em></span>
<span class="conn_type W_vline S_line1">微博<em class="count">3130</em></span>
</div>
<div class="info_add"><em class="tit S_txt2">地址</em><span>北京</span></div>
<div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主 游戏视频自媒体</span></div>
</dd>
<dd class="opt_box" node-type="opt_box" layout-shell="false">
<span node-type="widget_followBtnBox" action-data="f=1&uid=6342288605&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">
<a href="javascript:;" action-type="follow" action-data="template=2&uid=6342288605&fnick=电竞游戏菌&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>
</span>
</dd>
</dl>
</li>
<li class="follow_item S_line2">
<dl class="clearfix">
<dt class="mod_pic">
<a href="//weibo.com/u/6568022419?refer_flag=1087030701_2975_2019_0" title="王者荣耀玩家菌" target="_blank">
<img alt="王者荣耀玩家菌" src="https://tvax1.sinaimg.cn/crop.0.0.512.512.50/007auKFtly8g2p4mz3nxgj30e80e8aat.jpg?KID=imgbed,tva&Expires=1575980625&ssig=ezQt%2BoNR1S" usercard="id=6568022419&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">
</a>
</dt>
<dd class="mod_info S_line1">
<div class="info_name W_fb W_f14">
<a class="S_txt1" target="_blank" usercard="id=6568022419&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/u/6568022419?refer_flag=1087030701_2975_2019_0" title="王者荣耀玩家菌">
<strong usercard="id=6568022419&refer_flag=1087030701_2975_2019_0" >王者荣耀玩家菌</strong>
</a>
<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve_gold"></i></a> <a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a> <a><i class="W_icon icon_female"></i></a>
</div>
<div class="info_connect">
<span class="conn_type">关注<em class="count">92</em></span>
<span class="conn_type W_vline S_line1">粉丝<em class="count">442万</em></span>
<span class="conn_type W_vline S_line1">微博<em class="count">1331</em></span>
</div>
<div class="info_add"><em class="tit S_txt2">地址</em><span>上海</span></div>
<div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主</span></div>
</dd>
<dd class="opt_box" node-type="opt_box" layout-shell="false">
<span node-type="widget_followBtnBox" action-data="f=1&uid=6568022419&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">
<a href="javascript:;" action-type="follow" action-data="template=2&uid=6568022419&fnick=王者荣耀玩家菌&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>
</span>
</dd>
</dl>
</li>
<li class="follow_item S_line2">
<dl class="clearfix">
<dt class="mod_pic">
<a href="//weibo.com/u/5587463354?refer_flag=1087030701_2975_2019_0" title="西卡_李浩宇" target="_blank">
<img alt="西卡_李浩宇" src="https://tvax4.sinaimg.cn/crop.0.0.1080.1080.50/00668qsGly8g6tq2fe2egj30u00u0mz7.jpg?KID=imgbed,tva&Expires=1575980625&ssig=93%2F6pv%2FFM7" usercard="id=5587463354&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">
</a>
</dt>
<dd class="mod_info S_line1">
<div class="info_name W_fb W_f14">
<a class="S_txt1" target="_blank" usercard="id=5587463354&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/u/5587463354?refer_flag=1087030701_2975_2019_0" title="西卡_李浩宇">
<strong usercard="id=5587463354&refer_flag=1087030701_2975_2019_0" >西卡_李浩宇</strong>
</a>
<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve_gold"></i></a> <a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a> <a><i class="W_icon icon_male"></i></a>
</div>
<div class="info_connect">
<span class="conn_type">关注<em class="count">117</em></span>
<span class="conn_type W_vline S_line1">粉丝<em class="count">580万</em></span>
<span class="conn_type W_vline S_line1">微博<em class="count">589</em></span>
</div>
<div class="info_add"><em class="tit S_txt2">地址</em><span>上海 静安区</span></div>
<div class="info_intro"><em class="tit S_txt2">简介</em><span> 上海七煌信息科技有限公司游戏解说李浩宇</span></div>
</dd>
<dd class="opt_box" node-type="opt_box" layout-shell="false">
<span node-type="widget_followBtnBox" action-data="f=1&uid=5587463354&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">
<a href="javascript:;" action-type="follow" action-data="template=2&uid=5587463354&fnick=西卡_李浩宇&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>
</span>
</dd>
</dl>
</li>
<li class="follow_item S_line2">
<dl class="clearfix">
<dt class="mod_pic">
<a href="//weibo.com/louisedai?refer_flag=1087030701_2975_2019_0" title="游戏少女小九九" target="_blank">
<img alt="游戏少女小九九" src="https://tvax2.sinaimg.cn/crop.0.0.512.512.50/861e6f5dly8g7ek4j1188j20e80e8aae.jpg?KID=imgbed,tva&Expires=1575980625&ssig=jCmPOXYE4T" usercard="id=2250141533&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">
</a>
</dt>
<dd class="mod_info S_line1">
<div class="info_name W_fb W_f14">
<a class="S_txt1" target="_blank" usercard="id=2250141533&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/louisedai?refer_flag=1087030701_2975_2019_0" title="游戏少女小九九">
<strong usercard="id=2250141533&refer_flag=1087030701_2975_2019_0" >游戏少女小九九</strong>
</a>
<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve_gold"></i></a> <a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a> <a><i class="W_icon icon_female"></i></a>
</div>
<div class="info_connect">
<span class="conn_type">关注<em class="count">100</em></span>
<span class="conn_type W_vline S_line1">粉丝<em class="count">263万</em></span>
<span class="conn_type W_vline S_line1">微博<em class="count">731</em></span>
</div>
<div class="info_add"><em class="tit S_txt2">地址</em><span>北京</span></div>
<div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主</span></div>
</dd>
<dd class="opt_box" node-type="opt_box" layout-shell="false">
<span node-type="widget_followBtnBox" action-data="f=1&uid=2250141533&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">
<a href="javascript:;" action-type="follow" action-data="template=2&uid=2250141533&fnick=游戏少女小九九&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>
</span>
</dd>
</dl>
</li>
<li class="follow_item S_line2">
<dl class="clearfix">
<dt class="mod_pic">
<a href="//weibo.com/u/2475189623?refer_flag=1087030701_2975_2019_0" title="手游女玩家" target="_blank">
<img alt="手游女玩家" src="https://tvax2.sinaimg.cn/crop.0.0.1080.1080.50/93886577ly8fzna6s3flfj20u00u075u.jpg?KID=imgbed,tva&Expires=1575980625&ssig=ir2gYWGVvJ" usercard="id=2475189623&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">
</a>
</dt>
<dd class="mod_info S_line1">
<div class="info_name W_fb W_f14">
<a class="S_txt1" target="_blank" usercard="id=2475189623&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/u/2475189623?refer_flag=1087030701_2975_2019_0" title="手游女玩家">
<strong usercard="id=2475189623&refer_flag=1087030701_2975_2019_0" >手游女玩家</strong>
</a>
<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve_gold"></i></a> <a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a> <a><i class="W_icon icon_female"></i></a>
</div>
<div class="info_connect">
<span class="conn_type">关注<em class="count">244</em></span>
<span class="conn_type W_vline S_line1">粉丝<em class="count">505万</em></span>
<span class="conn_type W_vline S_line1">微博<em class="count">3748</em></span>
</div>
<div class="info_add"><em class="tit S_txt2">地址</em><span>北京</span></div>
<div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主 游戏视频自媒体</span></div>
</dd>
<dd class="opt_box" node-type="opt_box" layout-shell="false">
<span node-type="widget_followBtnBox" action-data="f=1&uid=2475189623&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">
<a href="javascript:;" action-type="follow" action-data="template=2&uid=2475189623&fnick=手游女玩家&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>
</span>
</dd>
</dl>
</li>
<li class="follow_item S_line2">
<dl class="clearfix">
<dt class="mod_pic">
<a href="//weibo.com/u/1230043607?refer_flag=1087030701_2975_2019_0" title="网瘾少年的游戏日常" target="_blank">
<img alt="网瘾少年的游戏日常" src="https://tva4.sinaimg.cn/crop.0.0.700.700.50/4950f9d7jw8f7gbefl2m7j20jg0jgabm.jpg?KID=imgbed,tva&Expires=1575980448&ssig=vefko3EHy0" usercard="id=1230043607&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">
</a>
</dt>
<dd class="mod_info S_line1">
<div class="info_name W_fb W_f14">
<a class="S_txt1" target="_blank" usercard="id=1230043607&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/u/1230043607?refer_flag=1087030701_2975_2019_0" title="网瘾少年的游戏日常">
<strong usercard="id=1230043607&refer_flag=1087030701_2975_2019_0" >网瘾少年的游戏日常</strong>
</a>
<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve"></i></a> <a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a> <a><i class="W_icon icon_male"></i></a>
</div>
<div class="info_connect">
<span class="conn_type">关注<em class="count">266</em></span>
<span class="conn_type W_vline S_line1">粉丝<em class="count">663万</em></span>
<span class="conn_type W_vline S_line1">微博<em class="count">16235</em></span>
</div>
<div class="info_add"><em class="tit S_txt2">地址</em><span>海外 其他</span></div>
<div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主 游戏视频自媒体</span></div>
<div class="info_relation">标签:电子竞技</div>
</dd>
<dd class="opt_box" node-type="opt_box" layout-shell="false">
<span node-type="widget_followBtnBox" action-data="f=1&uid=1230043607&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">
<a href="javascript:;" action-type="follow" action-data="template=2&uid=1230043607&fnick=网瘾少年的游戏日常&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>
</span>
</dd>
</dl>
</li>
<li class="follow_item S_line2">
<dl class="clearfix">
<dt class="mod_pic">
<a href="//weibo.com/u/5444117278?refer_flag=1087030701_2975_2019_0" title="UziQAQ" target="_blank">
<img alt="UziQAQ" src="https://tvax1.sinaimg.cn/crop.0.0.1125.1125.50/005WqXBcly8fv193jk443j30v90v9goy.jpg?KID=imgbed,tva&Expires=1575980555&ssig=fRDgB32vrS" usercard="id=5444117278&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">
</a>
</dt>
<dd class="mod_info S_line1">
<div class="info_name W_fb W_f14">
<a class="S_txt1" target="_blank" usercard="id=5444117278&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/u/5444117278?refer_flag=1087030701_2975_2019_0" title="UziQAQ">
<strong usercard="id=5444117278&refer_flag=1087030701_2975_2019_0" >UziQAQ</strong>
</a>
<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve_gold"></i></a> <a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a> <a><i class="W_icon icon_male"></i></a>
</div>
<div class="info_connect">
<span class="conn_type">关注<em class="count">122</em></span>
<span class="conn_type W_vline S_line1">粉丝<em class="count">381万</em></span>
<span class="conn_type W_vline S_line1">微博<em class="count">370</em></span>
</div>
<div class="info_add"><em class="tit S_txt2">地址</em><span>湖北 宜昌</span></div>
<div class="info_intro"><em class="tit S_txt2">简介</em><span>RNG电子竞技俱乐部ADC队员</span></div>
<div class="info_relation">标签:Dota</div>
</dd>
<dd class="opt_box" node-type="opt_box" layout-shell="false">
<span node-type="widget_followBtnBox" action-data="f=1&uid=5444117278&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">
<a href="javascript:;" action-type="follow" action-data="template=2&uid=5444117278&fnick=UziQAQ&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>
</span>
</dd>
</dl>
</li>
<li class="follow_item S_line2">
<dl class="clearfix">
<dt class="mod_pic">
<a href="//weibo.com/234290240?refer_flag=1087030701_2975_2019_0" title="兔玩游戏" target="_blank">
<img alt="兔玩游戏" src="https://tvax4.sinaimg.cn/crop.5.33.355.355.50/005vhJLPly8g7ql71h9lkj30b40b4js6.jpg?KID=imgbed,tva&Expires=1575980625&ssig=JZOOAeu1kI" usercard="id=5042958097&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">
</a>
</dt>
<dd class="mod_info S_line1">
<div class="info_name W_fb W_f14">
<a class="S_txt1" target="_blank" usercard="id=5042958097&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/234290240?refer_flag=1087030701_2975_2019_0" title="兔玩游戏">
<strong usercard="id=5042958097&refer_flag=1087030701_2975_2019_0" >兔玩游戏</strong>
</a>
<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve_gold"></i></a> <a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a> <a><i class="W_icon icon_female"></i></a>
</div>
<div class="info_connect">
<span class="conn_type">关注<em class="count">702</em></span>
<span class="conn_type W_vline S_line1">粉丝<em class="count">661万</em></span>
<span class="conn_type W_vline S_line1">微博<em class="count">47470</em></span>
</div>
<div class="info_add"><em class="tit S_txt2">地址</em><span>北京</span></div>
<div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主</span></div>
<div class="info_relation">标签:电子竞技</div>
</dd>
<dd class="opt_box" node-type="opt_box" layout-shell="false">
<span node-type="widget_followBtnBox" action-data="f=1&uid=5042958097&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">
<a href="javascript:;" action-type="follow" action-data="template=2&uid=5042958097&fnick=兔玩游戏&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>
</span>
</dd>
</dl>
</li>
<li class="follow_item S_line2">
<dl class="clearfix">
<dt class="mod_pic">
<a href="//weibo.com/u/5791806870?refer_flag=1087030701_2975_2019_0" title="王者荣耀代练代打小星酱" target="_blank">
<img alt="王者荣耀代练代打小星酱" src="https://tvax3.sinaimg.cn/crop.0.0.1080.1080.50/006jXPxQly8g1piyysz13j30u00u076a.jpg?KID=imgbed,tva&Expires=1575980555&ssig=MKEs2GXBHS" usercard="id=5791806870&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">
</a>
</dt>
<dd class="mod_info S_line1">
<div class="info_name W_fb W_f14">
<a class="S_txt1" target="_blank" usercard="id=5791806870&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/u/5791806870?refer_flag=1087030701_2975_2019_0" title="王者荣耀代练代打小星酱">
<strong usercard="id=5791806870&refer_flag=1087030701_2975_2019_0" >王者荣耀代练代打小星酱</strong>
</a>
<a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a> <a><i class="W_icon icon_male"></i></a>
</div>
<div class="info_connect">
<span class="conn_type">关注<em class="count">778</em></span>
<span class="conn_type W_vline S_line1">粉丝<em class="count">47万</em></span>
<span class="conn_type W_vline S_line1">微博<em class="count">1766</em></span>
</div>
<div class="info_add"><em class="tit S_txt2">地址</em><span>广东</span></div>
<div class="info_intro"><em class="tit S_txt2">简介</em><span>王者荣耀小星工作室诚信效率为本</span></div>
<div class="info_relation">标签:电子竞技</div>
</dd>
<dd class="opt_box" node-type="opt_box" layout-shell="false">
<span node-type="widget_followBtnBox" action-data="f=1&uid=5791806870&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">
<a href="javascript:;" action-type="follow" action-data="template=2&uid=5791806870&fnick=王者荣耀代练代打小星酱&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>
</span>
</dd>
</dl>
</li>
<li class="follow_item S_line2">
<dl class="clearfix">
<dt class="mod_pic">
<a href="//weibo.com/lolesports?refer_flag=1087030701_2975_2019_0" title="英雄联盟赛事" target="_blank">
<img alt="英雄联盟赛事" src="https://tvax2.sinaimg.cn/crop.33.30.338.338.50/006hzhGely8g9jamcq9krj30b40b4myl.jpg?KID=imgbed,tva&Expires=1575980625&ssig=SO1VeojdEf" usercard="id=5756404150&refer_flag=1087030701_2975_2019_0" width="50" height="50" alt="">
</a>
</dt>
<dd class="mod_info S_line1">
<div class="info_name W_fb W_f14">
<a class="S_txt1" target="_blank" usercard="id=5756404150&refer_flag=1087030701_2975_2019_0" target="_blank" href="//weibo.com/lolesports?refer_flag=1087030701_2975_2019_0" title="英雄联盟赛事">
<strong usercard="id=5756404150&refer_flag=1087030701_2975_2019_0" >英雄联盟赛事</strong>
</a>
<a target="_blank" href="//verified.weibo.com/verify"><i title= "微博个人认证 " class="W_icon icon_approve_gold"></i></a> <a title="微博会员" target="_blank" href="https://vip.weibo.com/personal?from=main" action-type="ignore_list"suda-uatrack="key=profile_head&value=member_guest"><i class="W_icon icon_member"></i></a> <a><i class="W_icon icon_male"></i></a>
</div>
<div class="info_connect">
<span class="conn_type">关注<em class="count">407</em></span>
<span class="conn_type W_vline S_line1">粉丝<em class="count">338万</em></span>
<span class="conn_type W_vline S_line1">微博<em class="count">26084</em></span>
</div>
<div class="info_add"><em class="tit S_txt2">地址</em><span>广东 深圳</span></div>
<div class="info_intro"><em class="tit S_txt2">简介</em><span>英雄联盟赛事君</span></div>
<div class="info_relation">标签:电子竞技</div>
</dd>
<dd class="opt_box" node-type="opt_box" layout-shell="false">
<span node-type="widget_followBtnBox" action-data="f=1&uid=5756404150&nogroup=1&template=1&refer_flag=1087030701_2975_2019_0">
<a href="javascript:;" action-type="follow" action-data="template=2&uid=5756404150&fnick=英雄联盟赛事&nogroup=1&unlogin=1" class="W_btn_b btn_22px"><em class="W_ficon ficon_add S_ficon">+</em>关注</a>
</span>
</dd>
</dl>
</li>
</ul>
</div>
<div class="WB_cardpage S_line1" >
<div class="W_pages">
<a class="page prev S_txt1 S_line1 page_dis" ><span>上一页</span></a>
<a bpfilter="page" class="page S_txt1 S_bg1">1</a>
<a bpfilter="page" class="page S_txt1" href="/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=2#Pl_Core_F4RightUserList__4">2</a>
<a bpfilter="page" class="page S_txt1" href="/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=3#Pl_Core_F4RightUserList__4">3</a>
<a bpfilter="page" class="page S_txt1" href="/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=4#Pl_Core_F4RightUserList__4">4</a>
<a bpfilter="page" class="page S_txt1" href="/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=5#Pl_Core_F4RightUserList__4">5</a>
<a bpfilter="page" class="page S_txt1" href="/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=6#Pl_Core_F4RightUserList__4">6</a>
<a class="page S_txt2 page_dis">...</a>
<a bpfilter="page" class="page S_txt1" href="/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=111#Pl_Core_F4RightUserList__4">111</a>
<a bpfilter="page" class="page next S_txt1 S_line1" href="/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page=2#Pl_Core_F4RightUserList__4"><span>下一页</span></a>
</div>
</div>
</div>
</div>
</div>
<!--/粉丝列表模块-->
</div>
发现这个html有我们需要的数据,终于找到它了,
在通过BeautifulSoup解析
html = script_dict['html']
html = BeautifulSoup(html,'lxml')
之后就可以通过find_all()方法查找我们需要的标签了
先找到名字标签
name_list = html.find_all('strong') # 名字列表
print(name_list)
名字列表结果如下:
[<strong usercard="id=6342288605&refer_flag=1087030701_2975_2019_0">电竞游戏菌</strong>, <strong usercard="id=6568022419&refer_flag=1087030701_2975_2019_0">王者荣耀玩家菌</strong>, <strong usercard="id=5587463354&refer_flag=1087030701_2975_2019_0">西卡_李浩宇</strong>, <strong usercard="id=2250141533&refer_flag=1087030701_2975_2019_0">游戏少女小九九</strong>, <strong usercard="id=2475189623&refer_flag=1087030701_2975_2019_0">手游女玩家</strong>, <strong usercard="id=1230043607&refer_flag=1087030701_2975_2019_0">网瘾少年的游戏日常</strong>, <strong usercard="id=5444117278&refer_flag=1087030701_2975_2019_0">UziQAQ</strong>, <strong usercard="id=5042958097&refer_flag=1087030701_2975_2019_0">兔玩游戏</strong>, <strong usercard="id=5791806870&refer_flag=1087030701_2975_2019_0">王者荣耀代练代打小星酱</strong>, <strong usercard="id=5756404150&refer_flag=1087030701_2975_2019_0">英雄联盟赛事</strong>]
得到我们想要的,没问题
再找到关注量
attention_list = html.find_all('em', class_='count')
print(attention_list_list)
查看我们关注量情况
[<em class="count">132</em>, <em class="count">695万</em>, <em class="count">3131</em>, <em class="count">92</em>, <em class="count">442万</em>, <em class="count">1331</em>, <em class="count">117</em>, <em class="count">580万</em>, <em class="count">589</em>, <em class="count">100</em>, <em class="count">263万</em>, <em class="count">731</em>, <em class="count">244</em>, <em class="count">505万</em>, <em class="count">3748</em>, <em class="count">266</em>, <em class="count">663万</em>, <em class="count">16235</em>, <em class="count">122</em>, <em class="count">381万</em>, <em class="count">370</em>, <em class="count">702</em>, <em class="count">661万</em>, <em class="count">47470</em>, <em class="count">778</em>, <em class="count">47万</em>, <em class="count">1766</em>, <em class="count">407</em>, <em class="count">338万</em>, <em class="count">26084</em>]
发现它不仅有关注量,还包括了粉丝量和微博量,而且存放位置有规律,先存关注量,然后粉丝量,最后微博量,我们将它们分别提取出来即可
_list = html.find_all('em', class_='count')#关注量,粉丝量,微博量
attention_count_list = []# 关注量列表
fan_count_list = [] # 粉丝量列表
weibo_count_list = [] # 微博量列表
qq = 0
for l in range(len(_list)):
if qq == 0:
attention_count_list.append(_list[l])
qq = 1
continue
if qq == 1:
fan_count_list.append(_list[l])
qq = 2
continue
if qq == 2:
weibo_count_list.append(_list[l])
qq = 0
continue
print(attention_count_list)
print(fan_count_list)
print(weibo_count_list)
查看它们的结果是否有误
[<em class="count">132</em>, <em class="count">92</em>, <em class="count">117</em>, <em class="count">100</em>, <em class="count">244</em>, <em class="count">266</em>, <em class="count">122</em>, <em class="count">702</em>, <em class="count">778</em>, <em class="count">407</em>]
[<em class="count">695万</em>, <em class="count">442万</em>, <em class="count">580万</em>, <em class="count">263万</em>, <em class="count">505万</em>, <em class="count">663万</em>, <em class="count">381万</em>, <em class="count">661万</em>, <em class="count">47万</em>, <em class="count">338万</em>]
[<em class="count">3132</em>, <em class="count">1331</em>, <em class="count">589</em>, <em class="count">731</em>, <em class="count">3748</em>, <em class="count">16235</em>, <em class="count">370</em>, <em class="count">47470</em>, <em class="count">1766</em>, <em class="count">26084</em>]
没问题,可以查看地址信息了
连简介的信息一起看到了,我们就一起写了把
address_info_list = html.find_all('div',class_='info_add')#地址列表
Introduction_info_list = html.find_all('div',class_='info_intro')#简介列表
print(html.find_all('div',class_='info_add'))
print(html.find_all('div',class_='info_intro'))
打印地址和简介信息看看
[<div class="info_add"><em class="tit S_txt2">地址</em><span>北京</span></div>, <div class="info_add"><em class="tit S_txt2">地址</em><span>上海</span></div>, <div class="info_add"><em class="tit S_txt2">地址</em><span>上海 静安区</span></div>, <div class="info_add"><em class="tit S_txt2">地址</em><span>北京</span></div>, <div class="info_add"><em class="tit S_txt2">地址</em><span>北京</span></div>, <div class="info_add"><em class="tit S_txt2">地址</em><span>海外 其他</span></div>, <div class="info_add"><em class="tit S_txt2">地址</em><span>湖北 宜昌</span></div>, <div class="info_add"><em class="tit S_txt2">地址</em><span>北京</span></div>, <div class="info_add"><em class="tit S_txt2">地址</em><span>广东</span></div>, <div class="info_add"><em class="tit S_txt2">地址</em><span>广东 深圳</span></div>]
[<div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主 游戏视频自媒体</span></div>, <div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主</span></div>, <div class="info_intro"><em class="tit S_txt2">简介</em><span> 上海七煌信息科技有限公司游戏解说李浩宇</span></div>, <div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主</span></div>, <div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主 游戏视频自媒体</span></div>, <div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主 游戏视频自媒体</span></div>, <div class="info_intro"><em class="tit S_txt2">简介</em><span>RNG电子竞技俱乐部ADC队员</span></div>, <div class="info_intro"><em class="tit S_txt2">简介</em><span>知名游戏博主</span></div>, <div class="info_intro"><em class="tit S_txt2">简介</em><span>王者荣耀小星工作室诚信效率为本</span></div>, <div class="info_intro"><em class="tit S_txt2">简介</em><span>英雄联盟赛事君</span></div>]
没问题,我们可以逐个抓取每个游戏名人的信息了
for j in range(len(name_list)):
print('姓名:'+name_list[j].string)#名字
print('关注量:'+attention_count_list[j].string)#关注
print('粉丝量:'+fan_count_list[j].string)#粉丝
print('微博量'+weibo_count_list[j].string)#微博量
print('地址:'+address_info_list[j].span.string)#地址
print('简介:'+str(Introduction_info_list[j].span.string))#简介
数据不知道放到哪里,还是在建个表,然后将表放到数据库中把
use homework;
create table game_celebrities(
name varchar(20) ,
attention_count varchar(20),
fan_count varchar(20),
weibo_count varchar(20),
address varchar(20),
introduction varchar(100)
)
然后将爬到的数据存入数据库中
for j in range(len(name_list)):
a = name_list[j].string#名字
b = attention_count_list[j].string#关注
c = fan_count_list[j].string#粉丝
d = weibo_count_list[j].string#微博量
e = address_info_list[j].span.string#地址
f = str(Introduction_info_list[j].span.string)#简介
sql = 'INSERT INTO game_celebrities(name,attention_count,fan_count,weibo_count,address,introduction) VALUES(%s,%s,%s,%s,%s,%s)'
cursor.execute(sql,(a,b,c,d,e,f))
print('插入成功')
db.commit()
到数据库中查看数据
整体代码
import requests
from bs4 import BeautifulSoup
import json
import pymysql
db = pymysql.connect('ip','QINYUYOU','密码','homework')
cursor = db.cursor()
for i in range(1,111):
url = 'https://d.weibo.com/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page={0}&ajaxpagelet=1&__ref=/1087030002_2975_2019_0&_t=FM_157596805800930'.format(i)
headers = {
'cookie': 'SUB=_2AkMqsmVqf8NxqwJRmP4QxW_lZItxyQvEieKc7pSxJRMxHRl-yT9kqlUMtRB6ATJLhQPCOWG7wxuc5v0FC-d9AWBglQ_Y; SUBP=0033WrSXqPxfM72-Ws9jqgMF55529P9D9W5bZc-nbvDZeZk_rAigVCoy; login_sid_t=85df6a57ea9f6a5fa01a9ea6483f42be; cross_origin_proto=SSL; _s_tentry=passport.weibo.com; Apache=7143900905628.509.1575938659425; SINAGLOBAL=7143900905628.509.1575938659425; ULV=1575938659431:1:1:1:7143900905628.509.1575938659425:; TC-Page-G0=153ff31dae1cf71cc65e7e399bfce283|1575940042|1575939977',
'user-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36'
}
r = requests.get(url,headers=headers)
r_b = BeautifulSoup(r.text,'lxml')
script_list = r_b.find('script')#找到script标签
str_script = str(script_list.string)#将script标签内容转为字符串
str_script = str_script[15:-1]#截取字符串中的字典字符串
script_dict = json.loads(str_script)#将字符串转为字典
print(script_dict)
#print(script_dict['html'])
html = script_dict['html']
html = BeautifulSoup(html,'lxml')
name_list = html.find_all('strong') # 名字列表
_list = html.find_all('em', class_='count')#关注量,粉丝量,微博量
attention_count_list = []# 关注量列表
fan_count_list = [] # 粉丝量列表
weibo_count_list = [] # 微博量列表
qq = 0
for l in range(len(_list)):
if qq == 0:
attention_count_list.append(_list[l])
qq = 1
continue
if qq == 1:
fan_count_list.append(_list[l])
qq = 2
continue
if qq == 2:
weibo_count_list.append(_list[l])
qq = 0
continue
# print(attention_count_list)
# print(fan_count_list)
# print(weibo_count_list)
address_info_list = html.find_all('div',class_='info_add')#地址列表
Introduction_info_list = html.find_all('div',class_='info_intro')#简介列表
# print(html.find_all('div',class_='info_add'))
# print(html.find_all('div',class_='info_intro'))
for j in range(len(name_list)):
a = name_list[j].string#名字
b = attention_count_list[j].string#关注
c = fan_count_list[j].string#粉丝
d = weibo_count_list[j].string#微博量
e = address_info_list[j].span.string#地址
f = str(Introduction_info_list[j].span.string)#简介
sql = 'INSERT INTO game_celebrities(name,attention_count,fan_count,weibo_count,address,introduction) VALUES(%s,%s,%s,%s,%s,%s)'
cursor.execute(sql,(a,b,c,d,e,f))
print('插入成功')
db.commit()
db.close()
最后终于把微博上动态数据抓下来了,被微博狠狠揍了一下,加油把,好好学习!!!
遇到了问题
遇到了问题,在第206条数据的时候,报错了
pymysql.err.InternalError: (1366, "Incorrect string value: '\\xF0\\x9F\\x8F\\xBB\\xEF\\xB8...' for column 'introduction' at row 1")
google一查,是mysql的问题,我们现在微博上找到这一条数据看看,
好像是乱码,我数据库用的类型的varchar,出错了,不改数据库,我就把这条数据跳过把,当是21页第6条数据时就跳过
第501条数据也出现这样的问题,那最好的办法还是改mysql把
google之后,在mysql中运行这个代码
ALTER TABLE game_celebrities CONVERT TO CHARACTER SET utf8mb4
应该是把标的编码格式换了,就可以把乱码加入到数据库中了
真.最后的代码
import requests
from bs4 import BeautifulSoup
import json
import pymysql
import time
db = pymysql.connect('139.155.71.69','QINYUYOU','QINyuyou5821661!','homework')
cursor = db.cursor()
for i in range(1,112):
time.sleep(2)
url = 'https://d.weibo.com/1087030002_2975_2019_0?pids=Pl_Core_F4RightUserList__4&page={0}&ajaxpagelet=1&__ref=/1087030002_2975_2019_0&_t=FM_157596805800930'.format(i)
headers = {
'cookie': 'SUB=_2AkMqsmVqf8NxqwJRmP4QxW_lZItxyQvEieKc7pSxJRMxHRl-yT9kqlUMtRB6ATJLhQPCOWG7wxuc5v0FC-d9AWBglQ_Y; SUBP=0033WrSXqPxfM72-Ws9jqgMF55529P9D9W5bZc-nbvDZeZk_rAigVCoy; login_sid_t=85df6a57ea9f6a5fa01a9ea6483f42be; cross_origin_proto=SSL; _s_tentry=passport.weibo.com; Apache=7143900905628.509.1575938659425; SINAGLOBAL=7143900905628.509.1575938659425; ULV=1575938659431:1:1:1:7143900905628.509.1575938659425:; TC-Page-G0=153ff31dae1cf71cc65e7e399bfce283|1575940042|1575939977',
'user-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36'
}
r = requests.get(url,headers=headers)
r_b = BeautifulSoup(r.text,'lxml')
script_list = r_b.find('script')#找到script标签
str_script = str(script_list.string)#将script标签内容转为字符串
str_script = str_script[15:-1]#截取字符串中的字典字符串
script_dict = json.loads(str_script)#将字符串转为字典
print(script_dict)
#print(script_dict['html'])
html = script_dict['html']
html = BeautifulSoup(html,'lxml')
name_list = html.find_all('strong') # 名字列表
_list = html.find_all('em', class_='count')#关注量,粉丝量,微博量
attention_count_list = []# 关注量列表
fan_count_list = [] # 粉丝量列表
weibo_count_list = [] # 微博量列表
qq = 0
for l in range(len(_list)):
if qq == 0:
attention_count_list.append(_list[l])
qq = 1
continue
if qq == 1:
fan_count_list.append(_list[l])
qq = 2
continue
if qq == 2:
weibo_count_list.append(_list[l])
qq = 0
continue
# print(attention_count_list)
# print(fan_count_list)
# print(weibo_count_list)
address_info_list = html.find_all('div',class_='info_add')#地址列表
Introduction_info_list = html.find_all('div',class_='info_intro')#简介列表
# print(html.find_all('div',class_='info_add'))
# print(html.find_all('div',class_='info_intro'))
#print(Introduction_info_list)
for j in range(len(name_list)):
if i == 21 and j == 5:
continue
a = name_list[j].string#名字
b = attention_count_list[j].string#关注
c = fan_count_list[j].string#粉丝
d = weibo_count_list[j].string#微博量
e = address_info_list[j].span.string#地址
f = str(Introduction_info_list[j].span.string)#简介
sql = 'INSERT INTO game_celebrities(name,attention_count,fan_count,weibo_count,address,introduction) VALUES(%s,%s,%s,%s,%s,%s)'
cursor.execute(sql,(a,b,c,d,e,f))
print('插入成功')
db.commit()
db.close()
来源:CSDN
作者:qq_36523007
链接:https://blog.csdn.net/qq_36523007/article/details/103477822