-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
piloking
committed
Oct 13, 2024
1 parent
71cd242
commit 77df760
Showing
17 changed files
with
146 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: release | |
on: | ||
push: | ||
tags: | ||
- '*' | ||
- "*" | ||
|
||
jobs: | ||
jsr: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
tasks: | ||
- name: Setup | ||
init: echo "LINEJS GITPOD" | ||
- name: Setup | ||
init: echo "LINEJS GITPOD" | ||
|
||
vscode: | ||
extensions: | ||
- denoland.vscode-deno | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,69 @@ | ||
import { JSDOM } from 'npm:[email protected]'; | ||
import { JSDOM } from "npm:[email protected]"; | ||
|
||
async function getLatestMobile() { | ||
const dom = new JSDOM(await fetch("https://apps.apple.com/jp/app/line/id443904275", { | ||
"headers": { | ||
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7", | ||
"accept-language": "ja-JP,ja;q=0.9,en-US;q=0.8,en;q=0.7", | ||
"cache-control": "no-cache", | ||
"pragma": "no-cache", | ||
"priority": "u=0, i", | ||
"sec-fetch-dest": "document", | ||
"sec-fetch-mode": "navigate", | ||
"sec-fetch-site": "same-origin", | ||
"sec-fetch-user": "?1", | ||
"upgrade-insecure-requests": "1", | ||
"cookie": "geo=JP; dssf=1; geo=JP", | ||
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" | ||
}, | ||
"referrerPolicy": "strict-origin-when-cross-origin", | ||
"body": null, | ||
"method": "GET" | ||
}).then(r => r.text())); | ||
const dom = new JSDOM( | ||
await fetch("https://apps.apple.com/jp/app/line/id443904275", { | ||
"headers": { | ||
"accept": | ||
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7", | ||
"accept-language": "ja-JP,ja;q=0.9,en-US;q=0.8,en;q=0.7", | ||
"cache-control": "no-cache", | ||
"pragma": "no-cache", | ||
"priority": "u=0, i", | ||
"sec-fetch-dest": "document", | ||
"sec-fetch-mode": "navigate", | ||
"sec-fetch-site": "same-origin", | ||
"sec-fetch-user": "?1", | ||
"upgrade-insecure-requests": "1", | ||
"cookie": "geo=JP; dssf=1; geo=JP", | ||
"user-agent": | ||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36", | ||
}, | ||
"referrerPolicy": "strict-origin-when-cross-origin", | ||
"body": null, | ||
"method": "GET", | ||
}).then((r) => r.text()), | ||
); | ||
const document = dom.window.document; | ||
const apple = JSON.parse(document.querySelector("#shoebox-media-api-cache-apps").textContent) | ||
const line = JSON.parse(Object.values(apple)[0] as string) | ||
return line.d[0].attributes.platformAttributes.ios.versionHistory[0].versionDisplay as string | ||
const apple = JSON.parse( | ||
document.querySelector("#shoebox-media-api-cache-apps").textContent, | ||
); | ||
const line = JSON.parse(Object.values(apple)[0] as string); | ||
return line.d[0].attributes.platformAttributes.ios.versionHistory[0] | ||
.versionDisplay as string; | ||
} | ||
async function getLatestDesktop() { | ||
const dom = new JSDOM(await fetch("https://apps.apple.com/jp/app/line/id539883307?ign-mpt=uo%3D4&mt=12", { | ||
"headers": { | ||
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7", | ||
"accept-language": "ja-JP,ja;q=0.9,en-US;q=0.8,en;q=0.7", | ||
"cache-control": "no-cache", | ||
"pragma": "no-cache", | ||
"priority": "u=0, i", | ||
"sec-fetch-dest": "document", | ||
"sec-fetch-mode": "navigate", | ||
"sec-fetch-site": "same-origin", | ||
"sec-fetch-user": "?1", | ||
"upgrade-insecure-requests": "1", | ||
"cookie": "geo=JP; dssf=1; geo=JP", | ||
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" | ||
}, | ||
"referrerPolicy": "strict-origin-when-cross-origin", | ||
"body": null, | ||
"method": "GET" | ||
}).then(r => r.text())); | ||
const dom = new JSDOM( | ||
await fetch( | ||
"https://apps.apple.com/jp/app/line/id539883307?ign-mpt=uo%3D4&mt=12", | ||
{ | ||
"headers": { | ||
"accept": | ||
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7", | ||
"accept-language": "ja-JP,ja;q=0.9,en-US;q=0.8,en;q=0.7", | ||
"cache-control": "no-cache", | ||
"pragma": "no-cache", | ||
"priority": "u=0, i", | ||
"sec-fetch-dest": "document", | ||
"sec-fetch-mode": "navigate", | ||
"sec-fetch-site": "same-origin", | ||
"sec-fetch-user": "?1", | ||
"upgrade-insecure-requests": "1", | ||
"cookie": "geo=JP; dssf=1; geo=JP", | ||
"user-agent": | ||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36", | ||
}, | ||
"referrerPolicy": "strict-origin-when-cross-origin", | ||
"body": null, | ||
"method": "GET", | ||
}, | ||
).then((r) => r.text()), | ||
); | ||
const document = dom.window.document; | ||
const apple = JSON.parse(document.querySelector("#shoebox-media-api-cache-apps").textContent) | ||
const line = JSON.parse(Object.values(apple)[0] as string) | ||
return line.d[0].attributes.platformAttributes.osx.versionHistory[0].versionDisplay as string | ||
} | ||
const apple = JSON.parse( | ||
document.querySelector("#shoebox-media-api-cache-apps").textContent, | ||
); | ||
const line = JSON.parse(Object.values(apple)[0] as string); | ||
return line.d[0].attributes.platformAttributes.osx.versionHistory[0] | ||
.versionDisplay as string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
"tweetnacl": "npm:tweetnacl@^1.0.3", | ||
"jsdom": "npm:[email protected]", | ||
"node-types": "npm:@types/node@latest", | ||
"node-int64":"npm:node-int64" | ||
"node-int64": "npm:node-int64" | ||
}, | ||
"tasks": { | ||
"format": "deno run -A npm:@biomejs/biome format --write ./packages/**/*.ts", | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.