From 25927ad13c1d08ce3db8e88ff021f33447d243f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B3=E5=85=83=E7=9A=93?= Date: Tue, 20 May 2025 23:42:25 +0800 Subject: [PATCH] Add Line Today hybrid listing and additional filters Fix excessive line wrapping and improve input text styling (This commit message is AI generated) --- about/scraping_line_today_home.md | 33 +++++++++++++++++ database/kidunfriendlycontent.json | 8 +++- pages/tools/freelinetoday.vue | 37 ++++++++++++++++++- .../api/contentcheck/kidunfriendlycontent.ts | 1 + 4 files changed, 77 insertions(+), 2 deletions(-) diff --git a/about/scraping_line_today_home.md b/about/scraping_line_today_home.md index dc2a3ee..f0523ff 100644 --- a/about/scraping_line_today_home.md +++ b/about/scraping_line_today_home.md @@ -74,3 +74,36 @@ The url hash is just what we needed to use my scraper :D You can query it by using: https://news.yuanhau.com/api/news/get/lt/8nlkYeV (Also videos are in the list, so avoid that) or just try this https://today.line.me/tw/v2/article/8nlkYeV and that's it, I've bypassed Line's attempt to block people like me. :) + + +## More to this debuckle +Apperently, there is something called a "hybrid listing" which is s simple recommendation system from here:` https://today.line.me/webapi/recommendation/hybrid/listings/${id}?country=tw&maxVideoCount=0&offset=0&length=70&optOut=false`, the ID still can be obtained via the same main endpoint, but just different things. Unlike the other api endpoint, it has a higher limit of 70, so you can do more things with it, and this endpoint is even easier to parse via json, just look at it. + +```JSON +{ + "id": "id", + "items": [ + { + "id": "news-id", + "title": "title", + "publisher": "publisher", + "publisherId": "100005", + "publishTimeUnix": 1747712924000, + "contentType": "GENERAL", + "thumbnail": { + "type": "IMAGE", + "hash": "image hash" + }, + "url": { + "hash": "67676767", + "url": "https://today.line.me/tw/v2/article/67767676" + }, + "categoryId": 100260, + "categoryName": "cattype" + } + ] +} +``` +This is 100% easier to work with, and with a another extra, I can easily search shitty news terms. Also there is as category type??? What? + +Also the id can just work with the following pattern in regex: `news_cat:[a-zA-Z0-9]{24}` diff --git a/database/kidunfriendlycontent.json b/database/kidunfriendlycontent.json index 7b72910..b4ad51a 100644 --- a/database/kidunfriendlycontent.json +++ b/database/kidunfriendlycontent.json @@ -14,6 +14,12 @@ "性侵", "裸照", "性感", - "找妹" + "找妹", + "肉蹼", + "超兇北半球", + "大露", + "色誘", + "死亡", + "撩妹" ] } diff --git a/pages/tools/freelinetoday.vue b/pages/tools/freelinetoday.vue index acef538..9f49d3d 100644 --- a/pages/tools/freelinetoday.vue +++ b/pages/tools/freelinetoday.vue @@ -1,19 +1,54 @@ diff --git a/server/api/contentcheck/kidunfriendlycontent.ts b/server/api/contentcheck/kidunfriendlycontent.ts index f060425..9425b6e 100644 --- a/server/api/contentcheck/kidunfriendlycontent.ts +++ b/server/api/contentcheck/kidunfriendlycontent.ts @@ -16,6 +16,7 @@ export default defineEventHandler(async (event) => { "性侵", "裸照", "性感", + "找妹", ], }; });