Open onetuzi opened 3 years ago
打开 微博国际版 点击进入我的-》关注的超话 此时开始抓包 下拉刷新超话列表后停止抓包 抓包后搜索 cardlist 然后点进去复制最上面那个蓝色的链接就是ROW_URL 或者类似格式的链接
当初写README的时候没找到什么好图床 描述确实有点模糊 我下周改改 不好意思
骚瑞鸭 是我的问题 但是我昨天也是填写的这个 现在我重新试了一下还是会报介个错误www我也不太懂 是不是云函数的问题还是....
链接看上去没填错 现在有以下几个推测 1.版本出错问题 1.0.3之前版本有一些bug会导致参数错误 请确认下图中代码段位置是否为途中结构 如果不是try...except结构那就是版本错误 请使用1.0.3版本 2.不是版本问题 是由当前版本bug导致 请在腾讯云函数 函数管理最下方找到测试按钮 如果出现了类似下图中的 page x get data success 但是未能执行到 starting forming sign list 则是由当前版本错误引起 请通过邮箱联系我 我会尽快找出问题所在并发布修复 3.账号特殊性问题 在我见过的微博爬虫相关脚本中有人描述过有些账号和普通账号获取到的信息的结构是完全不同的 可能是由于这种不同导致的 请在下图中程序段位置添加红框内代码 再次在云函数中测试运行 查看打印结果是否与下图中的结构一致 如果确实是该问题导致的 也请联系我 我会尽快修复
哇哈哈哈哈哈,佩服作者!谢谢作者关心这个问题。 我现在已经按照您的指示排除了1.版本出错问题2.不是版本问题 是由当前版本bug导致这两种情况 我在第三种情况输出的是 `{
"statistics_from": "square_videos_tmp",
"v_p": "59",
"cardlistInfo": {
"title_top": "视频",
"show_style": 1,
"can_shared": 0,
"page": 1,
"total": 3000,
"containerid": "231159",
"tags": {
"cardlist_title": "",
"desc": "",
"keyword": "",
"labeltype": ""
},
"page_type": "03",
"background": "",
"cardlist_menus": [
"type": "button_menus_refresh",
},
{
"name": "刷新"
{
"name": "返回首页",
"type": "gohome",
}
}
"params": {
"scheme": "sinaweibo://gotohome"
],
"adhesive": 1
},
"cards": [
{
"mblog": {
"visible": {
"type": 0,
"list_id": 0
},
"created_at": "Mon Nov 01 23:51:15 +0800 2021",
"id": 4698872112481991,
"idstr": "4698872112481991",
"mid": "4698872112481991",
"can_edit": false,
"show_additional_indication": 0,
"version": 1,
"textLength": 312,
"text": "#搜救犬二驴# #萌宠日常记录# \n这两天一只搜救犬,在全国搜救犬比赛上强势出圈!\n乐的一众网友们说,最近的快乐都是二驴给的。\n\n是不是觉得搜救犬叫二驴不合适?其实这只狗子的英文名叫迈尔斯,中文名叫英里,但它爹喊它二驴!\n\n至于为什么叫二驴,你们看它强势出圈的过程就知道了,并且你肯定会为这个... http://m.weibo.cn/client/version",
"source_allowclick": 1,
"source_type": 3,
"appid": 576792,
"source": "<a href=\"sinaweibo://gotovideo?selected_containerid=231643_11_5009&source=vchannel_verify&extension=%7b%7d\" rel=\"nofollow\">微博视频号</a>",
"favorited": false,
"in_reply_to_status_id": "",
"in_reply_to_user_id": "",
"truncated": false,
"in_reply_to_screen_name": "",
"pic_ids": [],
"geo": null,
"mblog_vip_type": 0,
"pic_types": "",
"is_paid": false,
"user": {
"id": 7303902582,
"idstr": "7303902582",
"class": 1,
"screen_name": "萌宠指南pro",
"name": "萌宠指南pro",
"city": "1000",
"location": "陕西",
"province": "61",
"url": "",
"description": "一个爱讲猫狗故事的铲屎官! 我讲的故事都是真事儿 欢迎大家投稿自己家猫狗的有趣故事!投稿请私信! 商务❤:yst110521199504",
"profile_image_url": "https://tvax3.sinaimg.cn/crop.0.0.1080.1080.50/007YiqImly8gruvj00ex6j30u00u0taa.jpg?KID=imgbed,tva&Expires=1636275578&ssig=sZel%2F3ArB9",
"profile_url": "u/7303902582",
"domain": "",
"weihao": "",
"gender": "m",
"followers_count": 15266,
"followers_count_str": "1.5万",
"friends_count": 23,
"pagefriends_count": 2,
"statuses_count": 194,
"video_status_count": 160,
"favourites_count": 0,
"video_play_count": 0,
"created_at": "Wed Sep 11 13:24:27 +0800 2019",
"following": false,
"allow_all_act_msg": false,
"geo_enabled": true,
"verified": true,
"verified_type": 0,
"remark": "",
},
"insecurity": {
"sexual_content": false
"ptype": 0,
"allow_all_comment": true,
"avatar_large": "https://tvax3.sinaimg.cn/crop.0.0.1080.1080.180/007YiqImly8gruvj00ex6j30u00u0taa.jpg?KID=imgbed,tva&Expires=1636275578&ssig=WOsdAq7r91",
"avatar_hd": "https://tvax3.sinaimg.cn/crop.0.0.1080.1080.1024/007YiqImly8gruvj00ex6j30u00u0taa.jpg?KID=imgbed,tva&Expires=1636275578&ssig=UgyzubhX8i",
"verified_reason": "微博原创视频博主",
"verified_trade": "",
"verified_source": "",
"verified_source_url": "",
"verified_level": 3,
"verified_reason_url": "",
"verified_state": 0,
"verified_contact_name": "",
"verified_contact_email": "",
"verified_type_ext": 0,
"has_service_tel": false,
"verified_reason_modified": "",
"verified_contact_mobile": "",
"like_me": false,
"online_status": 0,
"follow_me": false,
"like": false,
"mbrank": 2,
"bi_followers_count": 3,
"lang": "zh-cn",
"star": 0,
"mbtype": 11,
"svip": 0,
"block_word": 0,
"block_app": 1,
"type": 1,
"level": 2,
"badge": {
"enterprise": 0,
"ulevel": 0,
"user_limit": 0,
"uc_domain": 0,
"anniversary": 0,
"taobao": 0,
"gongyi_level": 0,
"dailv": 0,
"zongyiji": 0,
"gongyi": 0,
"bind_taobao": 0,
"vip_activity1": 0,
"unread_pool": 0,
"daiyan": 0,
"vip_activity2": 0,
"fools_day_2016": 0,
"dzwbqlx_2016": 0,
"discount_2016": 0,
"uefa_euro_2016": 0,
"unread_pool_ext": 0,
"self_media": 0,
"lol_msi_2017": 0,
"follow_whitelist_video": 0,
"league_badge": 0,
"super_star_2017": 0,
"video_attention": 0,
"travel_2017": 0,
"lol_gm_2017": 0,
"cz_wed_2017": 0,
"inspector": 0,
"panda": 0,
"wenda": 0,
"wenchuan_10th": 0,
"uve_icon": 0,
"user_name_certificate": 1,
"suishoupai_2018": 0,
"league_badge_2018": 0,
"dailv_2018": 0,
"super_star_2018": 0,
"worldcup_2018": 0,
"wenda_v2": 0,
"yiqijuan_2018": 0,
"meilizhongguo_2018": 0,
"lol_s8": 0,
"kpl_2018": 0,
"asiad_2018": 0,
"qixi_2018": 0,
"national_day_2018": 0,
"weibo_display_fans": 0,
"relation_display": 0,
"wbzy_2018": 0,
"double11_2018": 0,
"memorial_2018": 0,
"v_influence_2018": 0,
"hongbaofei_2019": 0,
"status_visible": 0,
"denglong_2019": 0,
"fu_2019": 0,
"avengers_2019": 0,
"womensday_2018": 0,
"suishoupai_2019": 0,
"wusi_2019": 0,
"china_2019": 0,
"earth_2019": 0,
"hongrenjie_2019": 0,
"dailv_2019": 0,
"hongkong_2019": 0,
"jvhuasuan_2019": 0,
"taohuayuan_2019": 0,
"dzwbqlx_2019": 0,
"rrgyj_2019": 0,
"cishan_2019": 0,
"shouhuan_2019": 0,
"ant_2019": 0,
"family_2019": 0,
"weishi_2019": 0,
"shuang11_2019": 0,
"wbzy_2019": 1,
"starlight_2019": 0,
"kdx_2019": 0,
"daqi_2019": 0,
"gongjiri_2019": 0,
"macao_2019": 0,
"china_2019_2": 0,
"hongbao_2020": 0,
"feiyan_2020": 0,
"hope_2020": 0,
"kangyi_2020": 0,
"daka_2020": 0,
"green_2020": 0,
"graduation_2020": 0,
"pc_new": 0,
"kfc_2020": 0,
"dailv_2020": 0,
"movie_2020": 0,
"mi_2020": 0,
"cddyh_2020": 0,
"nike_2020": 0,
"vpick_2020": 0,
"school_2020": 0,
"hongrenjie_2020": 0,
"test_icon": 0,
"china_2020": 0,
"gongyi_2020": 0,
"aizi_2020": 0,
"nissan_2020": 0,
"zjszgf_2020": 0,
"zaolang_2020": 0,
"wennuanji_2020": 0,
"yijia7_2020": 0,
"hongbaofeifuniu_2021": 0,
"weibozhiye_2020": 0,
"kfcflag_2021": 0,
"cuccidlam20_2021": 0,
"cuccidlam12_2021": 0,
"hongbaofeijika_2021": 0,
"shequweiyuan_2021": 0,
"cuccidlam25_2021": 0,
"weibozhiyexianxia_2021": 0,
"zhongcaoguan_2021": 0,
"nihaoshenghuojie_2021": 0,
"lvzhilingyang_2021": 0,
"xiaominewlogo_2021": 0,
"disney5_2021": 0,
"earthguarder_2021": 0,
"yuanlongping_2021": 0,
"brand_account_2021": 0,
"ylpshuidao_2021": 0,
"gaokao_2021": 1,
"ouzhoubei_2021": 0,
"biyeji_2021": 0,
"party_cardid_state": 0,
"hongrenjie_2021": 0,
"aoyun_2021": 0,
"zhongcaouser_2021": 0,
"companion_card": 0,
"dailu_2021": 0,
"fishfarm_2021": 0,
"zhonghuacishanri_2021": 0,
"renrengongyijie_2021": 0,
"yinyuejie21_2021": 0,
"kaixue21_2021": 1,
"qianbaofu_2021": 0,
"yingxionglianmengs11_2021": 0,
"yxlmlpl_2021": 0
},
"badge_top": "",
"has_ability_tag": 1,
"extend": {
"mobile": 0
},
},
"privacy": {
"mbprivilege": "0000000000000000000000000000000000000000000000000000000004c00208"
"credit_score": 80,
"user_ability": 3407880,
"cardid": "star_1378",
"urank": 0,
"story_id": "7303902582_0",
"story_read_state": -1,
"story_scheme": "sinaweibo://story/segment?type=1&story_id=7303902582_0&segment_id=0",
"verified_detail": {
"custom": 0,
{
"key": 16,
"data": [
"sub_key": 1,
"weight": 103,
"desc": "微博原创视频博主",
"timestamp": 1633681494
}
]
},
"is_teenager": 0,
"is_teenager_list": 0,
"vclub_member": 0,
"is_guardian": 0,
"video_mark": 15,
"live_status": 0,
"pc_new": 0,
"special_follow": false,
"planet_video": 2,
"status_total_counter": {
"repost_cnt": 15555,
"comment_cnt": 6017,
"user_ability_extend": 0,
"total_cnt": 123373,
"like_cnt": 78135,
"comment_like_cnt": 23666
},
"video_total_counter": {
},
"tab_manage": "[0, 0]",
"play_cnt": 5611397
"brand_account": 0,
{
"url": "https://h5.sinaimg.cn/upload/2016/09/27/494/common_icon_membership_level2.png",
"icons": [
"name": "vip",
}
"annotations": [
"scheme": "https://new.vip.weibo.cn/double11?F=vipday_287_20211111_xiaohuanguan_icon"
]
},
],
"comments_count": 87,
{
"mapi_request": true
}
"reposts_count": 168,
"pending_approval_count": 0,
"reprint_cmt_count": 0,
"attitudes_count": 980,
"isLongText": true,
"reward_exhibition_type": 2,
"reward_scheme": "sinaweibo://reward?bid=1000293251&enter_id=1000293251&enter_type=1&oid=4698872112481991&seller=7303902582&share=18cb5613ebf3d8aadd9975c1036ab1f47&sign=67e3ba0151e06b89d352535f3bc06880",
"hide_flag": 0,
"mlevel": 0,
"biz_ids": [
230444
"biz_feature": 4294967304,
],
"hasActionTypeCard": 1,
"text_tag_tips": [],
"mblogtype": 0,
"rid": "0_0_0_6521456463708696221_0_0_0",
"page_type": 64,
"userType": 0,
"cardid": "star_1378",
"extern_safe": 0,
"more_info_type": 0,
"display_text_min_number": 1000000,
"number_display_strategy": {
"apply_scenario_flag": 3,
"display_text": "100万+"
"positive_recom_flag": 0,
},
"enable_comment_guide": true,
"is_show_bulletin": 2,
"safe_tags": 524288,
"content_auth": 0,
"gif_ids": "",
"comment_permission_type": -1,
},
"comment_manage_info": {
"approval_comment_type": 0,
"comment_sort_type": 0
"ug_red_envelope": false
"pic_num": 0,
"fid": 4698866191696335,
"alchemy_params": {
},
"reprint_type": 0,
"can_reprint": true,
"new_comment_style": 0,
"mblogtypename": "",
"mblogid": "KFu79apG7",
"url_struct": [
{
"scheme": "sinaweibo://detail/?mblogid=KFu79apG7",
"attitudes_status": 0,
"recom_state": -1,
"ori_url": "sinaweibo://browser?url=http%3A%2F%2Fm.weibo.cn%2Fclient%2Fversion&sinainternalbrowser=topnav&share_menu=1",
"short_url": "http://m.weibo.cn/client/version",
"url_title": "全文"
},
{
"url_title": "萌宠指南pro的微博视频",
"url_type_pic": "https://h5.sinaimg.cn/upload/2015/09/25/3/timeline_card_small_video.png",
"ori_url": "sinaweibo://video/vvs?mid=4698872112481991&object_id=1034:4698863387476027&url_type=39&object_type=video&pos=1",
"page_id": "2304444698863387476027",
"short_url": "http://t.cn/A6xhOU0Q",
"result": false,
"actionlog": {
"long_url": "https://video.weibo.com/show?fid=1034:4698863387476027",
"url_type": 39,
"act_type": 1,
"act_code": 799,
"lcardid": "",
"fid": "231159",
"mid": "4698872112481991",
"source": "video",
"oid": "1034:4698863387476027",
"uuid": 4698866191696335,
"ext": "uid:5666107874|mid:4698872112481991|objectid:1034%3A4698863387476027|from:1|object_duration:115.099|miduid:7303902582|rootuid:7303902582|rootmid:4698872112481991|authorid:7303902582|video_orientation:horizontal|third_vid:|is_album:1|is_contribution:1|video_tags:%E7%8B%97%2C%E6%90%9C%E6%95%91%E7%8A%AC|isfan:0|ua:iPhone12%252C1_iOS15.0_Weibo_intl._4500_wifi|first_level_channel_id:4379552642725861|second_level_channel_id:4379552642725875|sceneid:feed|uuid:4698866191696335|detail:web|contribution:1|short_video:1|st_video:0|author_mid:4698872112481991|cluster_type_status:q%2Cc%2Cs%2C16%2CF%2Cm%2Co|is_ad_weibo:0"
},
"storage_type": "oss",
"hide": 0,
"object_type": "",
"need_save_obj": 0
"ttl": 3600,
}
],
"obj_ext": "10万次观看",
"weibo_position": 1,
"show_attitude_bar": 0,
"page_info": {
"object_type": "video",
"object_id": "1034:4698863387476027",
"type": "11",
"page_id": "2304444698863387476027",
"content1": "萌宠指南pro的微博视频",
"content2": "#搜救犬二驴# #萌宠日常记录# \n这两天一只搜救犬,在全国搜救犬比赛上强势出圈!\n乐的一众网友们说,最近的快乐都是二驴给的。\n\n是不是觉得搜救犬叫二驴不合适?其实这只狗子的英文名叫迈尔斯,中文名叫英里,但它爹喊它二驴!\n\n至于为什么叫二驴,你们看它强势出圈的过程就知道了,并且你",
"video_orientation": "horizontal",
"act_status": 1,
"media_info": {
"name": "萌宠指南pro的微博视频",
"stream_url": "http://f.video.weibocdn.com/o0/RKpCmUXSlx07R3N0gMCA01041200jVZQ0E010.mp4?label=mp4_ld&template=640x360.25.0&trans_finger=6006a648d0db83b7d9951b3cee381a9c&ori=0&ps=1CwnkDw1GXwCQx&Expires=1636268378&ssig=%2BWx9XqgSlR&KID=unistore,video",
"stream_url_hd": "http://f.video.weibocdn.com/o0/cHXt0gpglx07R3N1mnJC01041200u9P30E010.mp4?label=mp4_hd&template=852x480.25.0&trans_finger=d8257cc71422c9ad30fe69ce9523c87b&ori=0&ps=1CwnkDw1GXwCQx&Expires=1636268378&ssig=%2BDbN7Iomj7&KID=unistore,video",
"h5_url": "https://video.weibo.com/show?fid=1034:4698863387476027",
"mp4_sd_url": "http://f.video.weibocdn.com/o0/RKpCmUXSlx07R3N0gMCA01041200jVZQ0E010.mp4?label=mp4_ld&template=640x360.25.0&trans_finger=6006a648d0db83b7d9951b3cee381a9c&ori=0&ps=1CwnkDw1GXwCQx&Expires=1636268378&ssig=%2BWx9XqgSlR&KID=unistore,video",
"mp4_hd_url": "http://f.video.weibocdn.com/o0/cHXt0gpglx07R3N1mnJC01041200u9P30E010.mp4?label=mp4_hd&template=852x480.25.0&trans_finger=d8257cc71422c9ad30fe69ce9523c87b&ori=0&ps=1CwnkDw1GXwCQx&Expires=1636268378&ssig=%2BDbN7Iomj7&KID=unistore,video",
"inch_5_5_mp4_hd": "",
"h265_mp4_hd": "",
"h265_mp4_ld": "",
"inch_4_mp4_hd": "",
"inch_5_mp4_hd": "",
"mp4_720p_mp4": "http://f.video.weibocdn.com/o0/mWjxFpyolx07R3N0WIz601041200Rtk00E010.mp4?label=mp4_720p&template=1280x720.25.0&trans_finger=775cb0ab963a74099cf9f840cd1987f1&ori=0&ps=1CwnkDw1GXwCQx&Expires=1636268378&ssig=9Whf8N2mP%2F&KID=unistore,video",
"hevc_mp4_720p": "",
"prefetch_type": 1,
"prefetch_size": 262144,
"act_status": 1,
"protocol": "general,dash",
"media_id": "4698863387476027",
"origin_total_bitrate": 0,
"duration": 115,
"forward_strategy": -1,
"is_short_video": 1,
"search_scheme": "sinaweibo://svssearch?containerid=232080",
"vote_is_show": 0,
"ext_info": {
"video_orientation": "horizontal"
},`
类似以上东西 感觉不像是超话的数据
咳咳sorry 也许是我刚刚链接搞错了 现在换了个链接 结构获取正常 但是还是不能做到签到 ` {
"card_type": "8",
"scheme": "sinaweibo://pageinfo?containerid=100808abe1abf04759c6ab7618a799be0b97a2&extparam=%E8%99%BE%E7%B1%B3%E4%BA%92%E8%81%94%23tabbar_follow%3D4668578743716345",
"itemid": "follow_super_follow_1_1",
"pic": "https://wx2.sinaimg.cn/thumb180/a50b0fd1ly9fsrzs4brhrj2050050dfw.jpg",
"buttons": [
"title_sub": "虾米互联",
"pic_corner_radius": 6,
"params": {
{
"type": "default",
},
"action": "/2/page/button?request_url=http%3A%2F%2Fi.huati.weibo.com%2Fmobile%2Fsuper%2Factive_fcheckin%3Fpageid%3D100808abe1abf04759c6ab7618a799be0b97a2%26container_id%3D100808abe1abf04759c6ab7618a799be0b97a2%26scheme_type%3D1%26source%3Dfollow"
"actionlog": {
"fid": "100803_-_followsuper"
"pic": "https://h5.sinaimg.cn/upload/100/582/2020/04/14/supertopic_fans_icon_register.png",
"act_code": 3142,
},
"name": "签到"
}
],
"desc1": "等级 LV.8",
"openurl": ""
{
"card_type": "6",
"desc2": "#虾米互联[超话]# [鼓掌][鼓掌][鼓掌][鼓掌] ",
},
"itemid": "follow_super_more_1",
"desc": "+ 更多感兴趣的超话",
"scheme": "sinaweibo://browser?url=https%3A%2F%2Fhuati.weibo.cn%2Fdiscovery%2Fsuper&sinainternalbrowser=topnav",
"openurl": ""
}
"openurl": ""
}
],
"banners": null,
],
"leading_cards": []
}
page 1 get data success
page 2 get data success
Start forming super topic sign list
Start forming requests params
Start doing sign tasks
超话 Linux运维 已签到 1/1 ##这个已经签到是我早上自己签到的
Starting notifying
Response RequestId:b1db263b-39df-45f0-837d-79c544448b7a RetMsg:null
END RequestId:b1db263b-39df-45f0-837d-79c544448b7a
Report RequestId:b1db263b-39df-45f0-837d-79c544448b7a Duration:25373ms Memory:256MB MemUsage:16.453125MB `
确实结构好像有点不同
请在这个位置添加如下代码段 查看是否与下图中结构一致 实际参数应与之前打印得到的对应字段参数相同
返回了个空壳哈哈哈哈
算啦先谢谢作者大大辣 要去学校了 我下周再搞辣!AwA
ROW_URL要填虾米....试了好多都不行 {"errorCode":1,"errorMessage":"user code exception caught","stackTrace":"Traceback (most recent call last):\n File \"/var/user/index.py\", line 6, in main_handler\n follow_list = supertopic.get_follow_list()\n File \"/var/user/supertopicsign.py\", line 83, in get_follow_list\n card_group = response.json().get('cards', [{}])[0].get('card_group', [])\nIndexError: list index out of range","statusCode":430}