Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
fix: getClientIDv2 regex fix length of client_id to 32
Browse files Browse the repository at this point in the history
  • Loading branch information
vaaski committed Feb 19, 2021
1 parent f4451b8 commit 5f47ef9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const ScrapeIDs = {
}

const scriptReg = /<script(?: crossorigin)? src="(https:\/\/a-v2\.sndcdn\.com\/assets\/.+\.js)"/gm
const clientIDReg = /client_id=(\w+)/
const clientIDReg = /client_id=(\w{32})/
export const getClientIDv2 = async (): Promise<string> => {
const html = await ky(scrapeURL).text()
const scriptURLs = Array.from(html.matchAll(scriptReg), (m: string[]) => m[1])
Expand Down

0 comments on commit 5f47ef9

Please sign in to comment.