📖Lofter
https://newsmiss.lofter.com
guaner001125 (317)2024/12/18
修一些小问题
{ "bookSourceComment": "需登录\n◎搜索格式◎\n1、搜索用户<关闭精确搜索>\n@用户名\n2、搜索合集<关闭精确搜索>\n#合集\n3、搜索文章,直接搜索\n发现规则\n 🏷标签\n标签名::https:\/\/api.lofter.com\/oldapi\/tagPosts.api?product=lofter-android-6.13.0&method=newTagSearch&offset={{(page-1) *22}}&limit=22&firstpermalink=null&tag=标签名&type=new,{\"method\": \"POST\",\"body\":\"null\"}\n📃用户(搜索可以得到)\n出现目录加载失败,请尝试刷新,因为可能是请求失败导致的", "bookSourceGroup": "③📖 论坛", "bookSourceName": "📖Lofter", "bookSourceType": 0, "bookSourceUrl": "https:\/\/newsmiss.lofter.com", "bookUrlPattern": "", "customOrder": 55, "enabled": true, "enabledCookieJar": true, "enabledExplore": true, "exploreUrl": " ---------- 🏷标签 ---------- ::\n百合::https:\/\/api.lofter.com\/oldapi\/tagPosts.api?product=lofter-android-6.13.0&method=newTagSearch&offset={{(page-1) *22}}&limit=22&firstpermalink=null&tag=百合&type=new,{\"method\": \"POST\",\"body\":\"null\"}\n\n ---------- 📃用户 ---------- ::\n砂上雪::http:\/\/api.lofter.com\/v2.0\/blogHomePage.api?product=lofter-android-6.13.0,{\"method\":\"POST\",\"body\":\"targetblogid=514131314&supportposttypes=1%2C2%2C3%2C4%2C5%2C6&blogdomain=taste-s.lofter.com&offset={{(page-1)*18}}&method=getPostLists&postdigestnew=1&returnData=1&limit=18&checkpwd=1&needgetpoststat=1\"}", "header": "{\n\"Content-Type\": \"application\/x-www-form-urlencoded;charset=utf-8\"}", "lastUpdateTime": "1734537404548", "loginUrl": "https:\/\/newsmiss.lofter.com", "respondTime": 241015, "ruleBookInfo": { "author": "$.response.blogInfo.blogNickName||$.response.posts[0].post.blogInfo.blogNickName", "canReName": "1", "coverUrl": "$.response.collection.coverUrl@put:{page:$.response.blogInfo.blogStat.publicPostCount}", "init": "<js>\ntry{\ncookie = cookie.getCookie(\"https:\/\/newsmiss.lofter.com\");\n\nlofter = String(cookie).match(\/;\\s(LOFTER-[^-]+-LOGIN-AUTH)=(.*?);\/);\n\nheader = {};\nheader[lofter[1]] = lofter[2];\nsource.putLoginHeader(JSON.stringify(header));\nresult;\n}catch(e){\n\tresult = result\n\t}\n<\/js>", "intro": "@js:\na='{{$.response.collection.description}}';\nb='{{$.response.blogInfo.blogNickName}}';\nc=java.getString('$.response.posts[0].post.digest||$.response.collection.description||$.response.blogInfo.selfIntro');\n\nresult =c;\n\ncname=\"{{$.response.posts[0].post.postCollection.name}}\";\ncdes=java.getString('$.response.posts[0].post.postCollection.description');\nccount=\"{{$.response.posts[0].post.postCollection.postCount}}\";\nif(cname){\nresult=result+\"\\n‎\\n🈴所属合集:\"+cname+\"\\n📜合集介绍:\"+cdes+\"\\n\"+\"🔢合集章节总数:\"+ccount\n+\"\\n🔍搜索合集:#\"+cname+\"<关闭精确搜索>\";\n\nString(result).replace(\/📜合集介绍:\\n\/,'')+String(book.intro).replace(\/([\\s\\S]+?)--复制\/,'<br>‎<br>--复制').replace(\/.*?::\/,book.author+'::')\n}else{\n\tString(book.intro)\n\t}", "kind": "$.postCollection", "lastChapter": "", "name": "$.response.collection.name", "tocUrl": "$.response.blogsetting.blogId\n@js:\nif(result){\nid='{{$.response.blogsetting.blogId}}';\nlink='{{$.response.blogLink}}';\nurl='http:\/\/api.lofter.com\/v2.0\/blogHomePage.api?product=lofter-android-6.9.2,';\npost={\"method\": \"POST\",\n\"body\": \"targetblogid=\"+id+\"&supportposttypes=1%2C2%2C3%2C4%2C5%2C6&blogdomain=\"+link+\"&offset=0&method=getPostLists&postdigestnew=1&returnData=1&limit=500&checkpwd=1&needgetpoststat=1\"}\nresult=url+JSON.stringify(post);\njava.put('url',result)}else if(baseUrl.match(\/postCollection\/)){\nresult=java.get('url')\n}" }, "ruleContent": { "content": "<js>\nif(\/\\.mp4\/.test(baseUrl)){\n\tresult = \"请点击章节链接观看视频\\n视频链接:\"+baseUrl\n\t}else{\ncontent = java.getString(\"$..content\");\nimgs = eval(String(java.getString(\"$..photoLinks\")));\nvideo =\/video_down_url\\\\\":\\\\\"(.*?)\\\\\"\/.test(result)? \"视频链接:\"+String(result).match(\/video_down_url\\\\\":\\\\\"(.*?)\\\\\"\/)[1]:\"\";\nimg = \"\";\nimgs?imgs.forEach(x=>{\n\tx?img += \"<img src=\\\"\"+x.orign.replace(\/%7C.*\/g,'')+\"\\\">\\n\":\"\"\n\t}):\"\"\nresult = content + \"\\n\"+img+\"\\n\"+video;\n}\n<\/js>", "imageDecode": "", "imageStyle": "FULL", "nextContentUrl": "<js>\nif(!\/myReturnGift\/.test(baseUrl)){\ntry{\n\t\tid = java.getString(\"$..post.id\");\n\t\tid2 = java.getString(\"$..post.blogId\");\nurl =\"https:\/\/api.lofter.com\/v1.1\/trade\/gift\/post\/newSupportInfo?postId=\"+id+\"&blogId=\"+id2+\"&openFansVipPlan=0&vipFans=0\";\njava.log(JSON.parse(String(java.ajax(url))).code)\n\t$ = JSON.parse(String(java.ajax(url)));\n\tjava.log(JSON.stringify($))\n\tl = $.data.gainReturnGifts.length?$.data.gainReturnGifts:$.data.returnGifts;\n\tls = []\n\tl.forEach(x=>{\n\t\turl = \"https:\/\/api.lofter.com\/v1.1\/trade\/gift\/myReturnGift?id=\"+x.id+\"&postId=\"+id+\"&blogId=\"+id2;\n\t\tls.push(url)\n\t\t})\n\tresult = ls\n\t}catch(e){\n\t\t}\n\t}\n<\/js>", "replaceRegex": "##src=\"(.*?)\"##src=\"$1,{'headers':{'referer':'{{$..blogPageUrl}}'}}\"", "sourceRegex": "", "webJs": "" }, "ruleExplore": { "author": "$.post.blogInfo.blogNickName", "bookList": "<js>result.replace(\/null\/g,'')<\/js>\n$.response.items[*]||$.response.posts[*]", "bookUrl": "@js:url='{{$.post.blogId||$.post.blogPageUrl}}';\nid='{{$.post.id}}';\nmain=url.match(\/_blogid_\\d+\/)?url.match(\/_blogid_(\\d+)\/)[1]:url;\nbody=\"blogdomain=_blogid_\"+main+\".lofter.com&postid=\"+id;\nresult='https:\/\/api.lofter.com\/oldapi\/post\/detail.api?product=lofter-android-7.4.4,{\"method\":\"POST\",\"body\":\"'+String(body)+'\"}';", "coverUrl": "$.post\n@js:if(result.match(\/firstImageUrl=\\[\"\",\"\"\\]\/)){\nresult=result.match(\/bigAvaImg=(.*?),\/)?result.match(\/bigAvaImg=(.*?),\/)[1]:'';}else{\nresult=result.match(\/firstImageUrl=\\[\"([^\"]+)\"\/)?result.match(\/firstImageUrl=\\[\"([^\"]+)\"\/)[1]:\"\"\n}", "intro": "{{$.post.digest}}\n<br>‎<br>\n--复制下面的文字,可将用户添加发现或者订阅--\n{{$.post.blogInfo.blogNickName}}::http:\/\/api.lofter.com\/v2.0\/blogHomePage.api?product=lofter-android-7.4.4,{\"method\":\"POST\",\"body\":\"targetblogid={{$.post.blogInfo.blogId}}&supportposttypes=1%2C2%2C3%2C4%2C5%2C6&blogdomain={{$.post.blogInfo.blogName}}.lofter.com&offset={{'\\{\\{(page-1)*18\\}\\}&method=getPostLists&postdigestnew=1&returnData=1&limit=18&checkpwd=1&needgetpoststat=1\"}'}}", "kind": "$.post.tag", "lastChapter": "$.post.publishTime\n@js:result=java.timeFormat(parseInt(result));\njava.put('time',result)", "name": "$.post.title||$.post.noticeLinkTitle||$.post.digest||$.post.blogInfo.blogId||$.post.blogPageUrl##<\/*\\w.*?>" }, "ruleSearch": { "author": "$.blogInfo.blogNickName||$.blogName", "bookList": "<js>java.log(baseUrl);result<\/js>\n$..postData[*]||$.data.posts[*]||$.data.blogs[*]||$.data.collections[*]", "bookUrl": "$.postPageUrl\n@js:\nif(!result){\nif(!'{{$.name}}'){\nid='{{$.blogId}}';\nresult='http:\/\/api.lofter.com\/v2.0\/blogHomePage.api?product=lofter-android-7.4.4,{\"method\": \"POST\",\"body\":\"targetblogid='+id+'&method=getBlogInfoDetail&returnData=1&checkpwd=1&needgetpoststat=1\"}'}else{\nblogid='{{$.blogId}}';\nid='{{$.id}}';\nname='{{$.blogName}}';\njava.put('name',name);\nresult='https:\/\/api.lofter.com\/v1.1\/postCollection.api?product=lofter-android-7.4.4,{\"method\": \"POST\",\"body\":\"blogdomain='+name+'.lofter.com&method=getCollectionSimple&offset=0&limit=2000&blogid='+blogid+'&collectionid='+id+'&order=1\"}';java.put('url',result)\n}}else{\nbody=\"blogdomain=_blogid_{{$.blogId}}.lofter.com&postid={{$.id}}\";\nresult='https:\/\/api.lofter.com\/oldapi\/post\/detail.api?product=lofter-android-7.4.4,{\"method\":\"POST\",\"body\":\"'+String(body)+'\"}';\n\t\n\t};", "coverUrl": "$.firstImageUrl[0]||$.blogInfo.bigAvaImg||$.bigAvaImg||$.coverUrl", "intro": "{{$.digest||$.selfIntro||$.posts[0].digest}}\n<br>‎<br>\n--复制下面的文字,可将用户添加发现或者订阅--\n{{$.blogInfo.blogNickName||$.blogNickName||$.blogName}}::http:\/\/api.lofter.com\/v2.0\/blogHomePage.api?product=lofter-android-6.9.2,{\"method\":\"POST\",\"body\":\"supportposttypes=1%2C2%2C3%2C4%2C5%2C6&blogdomain={{$.blogName||$.blogInfo.blogName}}.lofter.com&offset={{'\\{\\{(page-1)*18\\}\\}&method=getPostLists&postdigestnew=1&returnData=1&limit=18&checkpwd=1&needgetpoststat=1\"}'}}", "kind": "$.tagList||$.tags", "lastChapter": "$.publishTime\n<js>\nif(result){\nresult?result=java.timeFormat(parseInt(result)):'';\njava.put('time',result)}else{\nresult=java.getString('$.posts[0].title||$.posts[0].digest')\n}<\/js>\n##<\/*\\w+.*?>", "name": "$.title||$.noticeLinkTitle||$.digest||$.blogInfo.blogNiceName||$.blogNickName||$.name##<\/*\\w.*?>", "wordCount": "" }, "ruleToc": { "chapterList": "$..posts[*]||$.response.items[*]@put:{blogname:$..blogName}", "chapterName": "$.post.title||$.post.digest||$.post.blogInfo.blogNickName\n<js>if(result){\nresult=result\n}else{result=book.name}\nString(result).replace(\/<\\\/*\\w.*?>\/g,'')\n<\/js>\n##(^.{1,25})##$1###", "chapterUrl": "<js>\nif(\/postCollection|blogHomePage\/.test(baseUrl)){\tbody=\"blogdomain=_blogid_{{$.post.blogId}}.lofter.com&postid={{$.post.id}}\";\nresult='https:\/\/api.lofter.com\/oldapi\/post\/detail.api?product=lofter-android-7.4.4,{\"method\":\"POST\",\"body\":\"'+String(body)+'\"}';\n\t}else\tif(\/video_down_url\":\"(.*?)\"\/.test(result)){\n\t\tresult = String(result).match(\/video_down_url\":\"(.*?)\"\/)[1];\n\t\t}else{\n\t\t\tresult = baseUrl\n\t\t\t}\n<\/js>", "nextTocUrl": "<js>\npages=java.get('page');\npage=parseInt(pages\/500);\nurl=String(java.get('url'));\nlist=[];\n\nif(page>6){\npage=6\n}else{page=page}\n\nfor(i=1;i<=page;i++){\nlist.push(url.replace(\/offset=\\d+\/,'offset='+(parseInt(i)*500)))\n}\n\nlist\n<\/js>", "updateTime": "$.post.publishTime\n@js:result?java.timeFormat(parseInt(result)):java.get('time')" }, "searchUrl": "@js:\nif(key.indexOf('@')==0){\nresult='https:\/\/api.lofter.com\/newsearch\/blog.json?key='+encodeURI(key.match(\/^@(.*)\/)[1])+'&offset={\\{(page-1) *10}\\}';\n}else if(key.indexOf('#')==0 || key.indexOf('#')==0){\nresult='https:\/\/api.lofter.com\/newsearch\/collection.json?key='+encodeURI(key.match(\/^(?:#|#)(.*)\/)[1])+'&offset={\\{(page-1) *10}\\}';\nresult\n}else{\n\theader = {\"headers\":{\n\t\"Content-Type\": \"application\/x-www-form-urlencoded;charset=utf-8\",\n\t\"deviceid\": java.androidId(),\n \"if-modified-since\": String(new Date()).replace(\/(.*?)\\s(.*?)\\s(.*?)\\s(.*?)GMT.*\/,'$1, $3 $2 $4 GMT')\n}}\n\n\tresult = \"https:\/\/api.lofter.com\/newsearch\/post.json?key=\"+key+\"&sortType=0&offset={\\{(page-1) *20}\\}&limit=20\"+\",\"+JSON.stringify(header);\n\t}", "variableComment": "", "weight": 0 }