📖微博

https://m.weibo.cn

guaner001125 (317)4天前

支持查看编辑记录


网页能打开看的基本能看,其他bug未知

搜索格式如下
①综合:直接搜索

以下需关闭精确搜索
②用户:@用户名@
③超话:%超话名%
④话题:#话题名#

更改下面数字可查看评论(不登录只有20条,登录后条数太多会请求频繁导致获取正文为空【可以选择清除cookie回到未登录状态】)

是/否开启评论:是20条
二维码导入
{
    "bookSourceComment": "网页能打开看的基本能看,其他bug未知\n搜索格式如下\n①综合:直接搜索\n\n以下需关闭精确搜索\n②用户:@用户名@\n③超话:%超话名%\n④话题:#话题名#\n\n更改下面数字可查看评论(不登录只有20条,登录后条数太多会请求频繁导致获取正文为空【可以选择清除cookie回到未登录状态】)\n\n是\/否开启评论:是20条",
    "bookSourceGroup": "③📖  论坛",
    "bookSourceName": "📖微博",
    "bookSourceType": 0,
    "bookSourceUrl": "https:\/\/m.weibo.cn",
    "bookUrlPattern": "https:\/\/m.weibo.cn\/detail\/\\d+",
    "customOrder": 67,
    "enabled": true,
    "enabledCookieJar": true,
    "enabledExplore": true,
    "exploreUrl": "                                      超话                                        ::\n\n百合小说::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=100808f0685be662acf02ce3230fac1a7e9443_-_feed&page={{page}}\nmilklove::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=1008086a3f910bdc5fcd535fb9aeffdffc75ff_-_feed&page={{page}}\n                                      用户                                        ::\n\n一条废狗狗狗狗::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=1076036055804589_-_WEIBO_SECOND_PROFILE_WEIBO&luicode=10000011&lfid=1076036055804589_-_WEIBO_SECOND_PROFILE_WEIBO&page_type=03&page={{page}}\n\n崖生_深海::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=1076037727808028_-_WEIBO_SECOND_PROFILE_WEIBO&page_type=03&page={{page}}\n\n砂上雪::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=1076035239650586_-_WEIBO_SECOND_PROFILE_WEIBO&luicode=10000011&lfid=1076035239650586_-_WEIBO_SECOND_PROFILE_WEIBO&page_type=03&page={{page}}\nWhisky老鹿::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=1076036537563116_-_WEIBO_SECOND_PROFILE_WEIBO&luicode=10000011&lfid=1076036537563116_-_WEIBO_SECOND_PROFILE_WEIBO&page_type=03&page={{page}}\n郭斯特::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=1076031907542963_-_WEIBO_SECOND_PROFILE_WEIBO&luicode=10000011&lfid=1076031907542963_-_WEIBO_SECOND_PROFILE_WEIBO&page_type=03&page={{page}}\n\n西凌萝卜::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=1076032141864060_-_WEIBO_SECOND_PROFILE_WEIBO&luicode=10000011&lfid=1076035239650586_-_WEIBO_SECOND_PROFILE_WEIBO&page_type=03&page={{page}}\n口袋巧克力::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=1076031423169553_-_WEIBO_SECOND_PROFILE_WEIBO&luicode=10000011&lfid=1076031423169553_-_WEIBO_SECOND_PROFILE_WEIBO&page_type=03&page={{page}}\n\n\n                                      话题                                        ::\n\n#百合小说推荐#::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=231522type%3D1%26t%3D10%26q%3D%23%E7%99%BE%E5%90%88%E5%B0%8F%E8%AF%B4%E6%8E%A8%E8%8D%90%23&luicode=10000011&lfid=100103type%253D38%2526q%253D%E7%99%BE%E5%90%88%E5%B0%8F%E8%AF%B4%2526t%253D&page={{page}}\n#百合小说#::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=231522type%3D1%26t%3D10%26q%3D%23%E7%99%BE%E5%90%88%E5%B0%8F%E8%AF%B4%23&isnewpage=1&luicode=10000011&lfid=100103type%253D38%2526q%253D%E7%99%BE%E5%90%88%E5%B0%8F%E8%AF%B4%2526t%253D&page={{page}}",
    "header": "{\n  \"User-Agent\": \"Mozilla\/5.0 (Linux; Android 8.1.0; JKM-AL00b Build\/HUAWEIJKM-AL00b; wv) AppleWebKit\/537.36 (KHTML, like Gecko) Version\/4.0 Chrome\/66.0.3359.126 MQQBrowser\/6.2 TBS\/044807 Mobile Safari\/537.36\"\n}",
    "lastUpdateTime": "1758730624358",
    "loginUrl": "https:\/\/m.weibo.cn",
    "respondTime": 195470,
    "ruleBookInfo": {
        "author": "@js:\n\/screen_name\": \"\/.test(result)?String(result).match(\/\"screen_name\": \"([^\"]+)\"\/)[1]:\"\";",
        "canReName": "1",
        "intro": "@js:\n\nresult = \/\"text\": \".*\",\/.test(result)?String(result).match(\/ \"text\": \"(.*)\",\/)[1]:\"\";\n\nif(\/extparam=\/.test(baseUrl)){\n\tcontainerid = baseUrl.match(\/containerid=(.*)\/)[1];\n\tresult += \"\\n---复制下方文字,将#超话#粘贴进发现规则---\\n\"+book.name+`::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=${containerid}_-_feed&page={\\{page}}`\n\t}\n\nif(\/search\\?\/.test(baseUrl)){\n\tcontainerid = baseUrl.replace(\/http.*?\\?\/,'https:\/\/m.weibo.cn\/api\/container\/getIndex?');\n\tresult += \"\\n---复制下方文字,将#话题#粘贴进发现规则---\\n\"+book.name+`::${containerid}&page={\\{page}}`\n\t}\n\nif(\/u\\\/\/.test(baseUrl)){\n\tcontainerid = baseUrl.match(\/u\\\/(\\d+)\/)[1];\n\tresult += \"\\n---复制下方文字,将#用户#粘贴进发现规则---\\n\"+book.name+`::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=107603${containerid}_-_WEIBO_SECOND_PROFILE_WEIBO&page_type=03&page={\\{page}}`\n\t}\nresult;",
        "name": "<js>\nresult = \/\"text\": \".*\",\/.test(result)?String(result).match(\/ \"text\": \"(.*)\",\/)[1]:\"\";\n<\/js>\ntext##^(.{0,30})##$1......####",
        "tocUrl": "@js:baseUrl"
    },
    "ruleContent": {
        "content": "<js>\ntry{\ncimg=[];\nif(String(result).match(\/ \"text\": \"(.*)\",\/)){\nb=String(result).match(\/ \"text\": \"(.*)\",\/)[1];}\nelse{b=''}\n\nif(String(result).match(\/\"size\":\\s*\"[^\"]+\",\\s*\"url\":\\s*\"[^\"]+\"\/g)){\na=String(result).match(\/\"size\":\\s*\"[^\"]+\",\\s*\"url\":\\s*\"[^\"]+\"\/g);\nfor (i=0;i<a.length;i++){\n       cimg.push(a[i].match(\/url\":\\s*\"([^\"]+)\"\/)[1])\n    }\n    \nhtml='';\nfor(i in cimg){\nhtml += '<img src=\"'+cimg[i]+'\">\\n'\n}}else{html=''}\n\n\nif(\/title=%E7%BC%96%E8%BE%91%E8%AE%B0%E5%BD%95\/.test(baseUrl)){\n\thtml = \"\";\n\tjson = JSON.parse(result).data.cards;\n\tjson.forEach(x=>{\n\t\t     let mblog = x.card_group[0].mblog;\n\t\t     let time = mblog.created_at;\n\t\t     \/\/ 原始时间字符串\nconst timeStr = mblog.created_at\n\n\/\/ 创建 Date 对象\nconst date = new Date(timeStr);\nconst year = date.getFullYear();\nconst month = String(date.getMonth() + 1).padStart(2, '0');\nconst day = String(date.getDate()).padStart(2, '0');\nconst hours = String(date.getHours()).padStart(2, '0');\nconst minutes = String(date.getMinutes()).padStart(2, '0');\nconst seconds = String(date.getSeconds()).padStart(2, '0');\n\nconst customFormat = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\t\t   \t\t       \n\t\t     let picsJ = mblog.pics;\n\t\t     let pics = \"\";\n\t\t     \n\t\t     if(picsJ)picsJ.forEach(y=>{\n\t\t     \t     pics +=\"<img src=\\\"\"+ y.large.url+\"\\\">\\n\"\t     \t\n\t\t     \t})\n\t\t     html += \"-⬇️ 编辑于\"+customFormat+\" ⬇️ -\\n\"+mblog.text+\"\\n\"+pics+\"\\n&lrm;\\n\";\n\t\t})\n\tresult = html\n\t}\n\n\nif(\/timeline_card_small_article_default\/.test(result)&&!\/title=%E7%BC%96%E8%BE%91%E8%AE%B0%E5%BD%95\/.test(baseUrl)){\n\t$ = result.match(\/\"page_info\":\\s*(\\{[\\s\\S]+?\\}),\\s+\"bid\/)[1];\n\t$ = JSON.parse($);\n\thtml = '<img src=\"'+$.page_pic.url+'\">\\n'\n}\n   \nif(!baseUrl.match(\/ttarticle\/)&&!\/title=%E7%BC%96%E8%BE%91%E8%AE%B0%E5%BD%95\/.test(baseUrl)){\nresult = org.jsoup.Jsoup.parse(b).html()+'\\n'+html+java.getString(\"@@class.h5-4con@html||class.error_msg@text\")\n}else if(!\/title=%E7%BC%96%E8%BE%91%E8%AE%B0%E5%BD%95\/.test(baseUrl)){result=java.getString(\"@@class.f-art@html||class.error_msg@text\")\n}\n\nif(\/暂无目录......\/.test(chapter.title)){\n\t\n\tresult = book.intro\n\t}\n\n\nif(\/是\\d+条\/.test(source.bookSourceComment) && !baseUrl.match(\/ttarticle\/) && \/detail\/.test(baseUrl)){\npage = source.bookSourceComment.match(\/是(\\d+)条\/)[1];\n\npage = Math.ceil(page\/20);\nmid = baseUrl.match(\/(\\d+)$\/)[1];\nmax_id=\"0\";\ncomments=\"\";\ncount = 0;\n\nfor(j=1;j<=page;j++){\ncommentsurl = `https:\/\/m.weibo.cn\/comments\/hotflow?id=${mid}&mid=${mid}&max_id=${max_id}&max_id_type=0`;\nvar times = Math.round(new Date().getTime() \/ 1000)\nwhile(Math.round(new Date().getTime() \/ 1000)-times<1){}\nhh= java.ajax(commentsurl);\nif(\/体验微博客户端\/.test(hh)){\n\th={};\n\tpage = 2;\n\t}else{\n\th=\/<title>登录 - 微博<\\\/title>\/.test(hh)?{}:JSON.parse(hh);\n\tif(\/<title>登录 - 微博<\\\/title>\/.test(hh)){java.toast(\"更多评论请登录\");break;}\n\t\t}\nif(h.ok==1){\nlist=h.data.data;\nmax_id = h.data.max_id;\nif(j==1){\ntotal = Math.ceil(h.data.total_number\/20);\npage= page<=total?page:total;\n}\n    for(i=0;i<list.length;i++){\n    \t\n    \tdetails=\"\";\n    if(list[i].pic!=undefined){\n    pic=list[i].pic.large.url;\n    details = `<br><img src=\"${pic}\"><br>`\n    \t\n}\ncount += 1;\ncomments +=\"\\n--@\"+list[i].user.screen_name+\"@--\\n\"+list[i].text+details;\n      }}\n}  \n result + comments\n\n}\n\n}catch(e){\n\tjava.log(\"错误: \"+e)\n\t}\n\t\n<\/js>",
        "imageDecode": "var Magua = new JavaImporter();\nMagua.importPackage(\n    Packages.java.io,\n    Packages.android.graphics\n);\n\nwith(Magua) {\n    \/\/ 1. 解码原始图片数据\n    var img = BitmapFactory.decodeByteArray(result, 0, result.length);\n    var originalWidth = img.getWidth();\n    var originalHeight = img.getHeight();\n\n    \/\/ 2. 判断是否需要旋转(仅当 width > height * 3 时旋转)\n    if (originalWidth > originalHeight * 4.5) {\n        \/\/ 3. 创建新图片(旋转后宽高互换)\n        var newWidth = originalHeight;\n        var newHeight = originalWidth;\n        var newImg = Bitmap.createBitmap(newWidth, newHeight, Bitmap.Config.ARGB_8888);\n\n        \/\/ 4. 使用 Matrix 旋转图片(顺时针90度)\n        var canvas = new Canvas(newImg);\n        var matrix = new Matrix();\n        matrix.setRotate(90);\n        matrix.postTranslate(newWidth, 0); \/\/ 调整位移避免裁剪\n\n        \/\/ 5. 绘制旋转后的图片\n        canvas.drawBitmap(img, matrix, null);\n\n        \/\/ 6. 转换为字节数组输出\n        var outputStream = new ByteArrayOutputStream();\n        newImg.compress(Bitmap.CompressFormat.PNG, 100, outputStream);\n        result = outputStream.toByteArray();\n    }\n    \/\/ 否则直接保留原图(无需操作)\n}\nresult",
        "imageStyle": "FULL",
        "nextContentUrl": "<js>\nif(\/title=%E7%BC%96%E8%BE%91%E8%AE%B0%E5%BD%95\/.test(baseUrl)){\n\tpage = JSON.parse(src).data.cardlistInfo.page;\n\tif(page!=null){\n\t\tresult = baseUrl.replace(\/&page=\/g,'')+\"&page=\"+page;\n\t\t}\n\t}\n\n<\/js>",
        "replaceRegex": "##<img.*?src=\"https:\/\/.*?small.*?default.*?\">|https:\/\/m.weibo.cn\\\\\"|\\\\\"|<!---->\n<js>\nresult = result.replace(\/src=\"([^\"]+)\"\/g,'src=\"$1,{\\\"headers\\\":{\\\"referer\\\":\\\"https:\/\/m.weibo.cn\\\"}}\"').replace(\/(<img.*?>)\/g,'$1\\n').replace(\/(--@.*?@--)\/g,'\\n&lrm;\\n$1');\n<\/js>\n##<img src=\"https:\/\/m.weibo.cn\/detail\/.*?\">"
    },
    "ruleExplore": {},
    "ruleSearch": {
        "bookList": "<js>\nif(java.getString(\"$.msg\")!=\"\"){\njava.toast(java.getString(\"$.msg\"));\n}\nresult;\n<\/js>\n$.data.cards[*]&&$.data.cards[*].card_group[*]",
        "bookUrl": "$.mblog.id\n@js:\nif(\/^\\d+$\/.test(result)){\nresult=\"https:\/\/m.weibo.cn\/detail\/\"+result\n}else{\n\tresult = \"{{$.scheme}}\";\n\t}",
        "checkKeyWord": "https:\/\/m.weibo.cn\/detail\/4856119220244813",
        "coverUrl": "{{$.mblog.page_info.page_pic.url||$.mblog.thumbnail_pic||$.mblog.user.profile_image_url||$.pic||$.user.profile_image_url}},{\"headers\":{\"referer\":\"https:\/\/m.weibo.cn\"}}",
        "intro": "$..text&&$.desc1&&$..description##\\n+|(?:<br \/>)+#~",
        "kind": "$.desc2&&$..verified_reason",
        "lastChapter": "$.mblog.created_at",
        "name": "$.mblog.text||$.title_sub||$.user.screen_name@js:result.replace(\/<.*?>\/g,\"\").match(\/(.{0,30}).*\/)[1]",
        "wordCount": "##timeline_card_small_article_default##有专栏###"
    },
    "ruleToc": {
        "chapterList": "<js>\n\nd=\/\"text\": \"(.*)\",\/.test(result)?String(result).match(\/ \"text\": \"(.*)\",\/)[1]:\"暂无目录\";\nb=d.replace(\/<.*?>\/g,\"\").replace(\/#.*?#\/g,\"\");\nc=baseUrl;\nl=[];\n\nedit_count = Number(\/\"edit_count\": \\d+\/.test(result)?result.match(\/\"edit_count\": (\\d+),\/)[1]:0);\n\n\nif(\/网页链接\/.test(d) || \/timeline_card_small_article_default\/.test(d)){\n\tif(\/timeline_card_small_article_default\/.test(d)){\n\t\tl.push({text:b.substring(0,10)+\"......\",href:c});\n\tl.push({\n\t\thref:result.match(\/\"page_url\": \"([^\"]+)\",\/)[1]+\",{'webView':true}\",\n\t\ttext:result.match(\/\"content1\": \"([^\"]+)\",\/)[1],\n\t\tinfo:result.match(\/ \"content2\": \"([^\"]*)\",\/)[1]\n\t\t})\n}\n\nif(\/网页链接\/.test(d)){\n\tlist = d.match(\/<br \\\/>[^<]+<a  href=\\\\\"[^\"]+\\\\\" data-hid\/g);\n\tl.push({\n\t\ttext:b.substring(0,10)+\"......\",\n\t\thref:c\n\t\t})\n\tfor(i in list){\n\tl.push({\n\t\ttext : list[i].match(\/>([^<]+)<a\/)[1],\n\t\thref:list[i].match(\/href=\\\\\"([^\"]+)\\\\\"\/)[1]\n\t\t})\n\t  }\n\t}\n\t}else{\n\t\tl.push({text:b.substring(0,10)+\"......\",href:c})\n\t\t}\n\nif(edit_count>0){\n\tl.push({\n\t\ttext:\"编辑记录\",\n\thref:\"https:\/\/m.weibo.cn\/api\/container\/getIndex?title=%E7%BC%96%E8%BE%91%E8%AE%B0%E5%BD%95&containerid=231440_-_\"+baseUrl.match(\/(\\d+)\/)[1]\n\t\t})\n\t\n\t}\t\t\n\t\t\n\t\tl\n<\/js>",
        "chapterName": "text",
        "chapterUrl": "href",
        "updateTime": "info"
    },
    "searchUrl": "@js:\nresult =\"https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=100103type%3D1%26q%3D{{key}}%26t%3D&page_type=searchall&page={{page}}\";\n\nif(\/^#.*?#$\/.test(key)){\n\t\/\/话题搜索\n\tkey = key.match(\/^#(.*?)#$\/)[1];\tresult=`https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=100103type%3D38%26q%3D${key}%26t%3D&page_type=searchall&page={{page}}`\n\t}\n\t\nif(\/^%.*?%$\/.test(key)){\n\t\/\/超话搜索\n\tkey = key.match(\/^%(.*?)%$\/)[1];\tresult=`https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=100103type%3D98%26q%3D${key}%26t%3D&page_type=searchall&page={{page}}`\n\t}\n\t\nif(\/^@.*?@$\/.test(key)){\n\t\/\/用户搜索\n\tkey = key.match(\/^@(.*?)@$\/)[1];\tresult=`https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=100103type%3D3%26q%3D${key}%26t%3D&page_type=searchall&page={{page}}`\n\t}",
    "weight": 0
}
广告