mirror of
https://github.com/iptv-org/iptv-org.github.io.git
synced 2025-05-11 17:40:05 -04:00
Create load.js
This commit is contained in:
parent
ceef93ed00
commit
f5ae940e51
1 changed files with 22 additions and 0 deletions
22
src/load.js
Normal file
22
src/load.js
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
import { Storage } from '@freearhey/core'
|
||||||
|
import { ApiClient } from './utils/apiClient.js'
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
const client = new ApiClient({ storage: new Storage('src/data') })
|
||||||
|
|
||||||
|
const requests = [
|
||||||
|
client.download('blocklist.json'),
|
||||||
|
client.download('categories.json'),
|
||||||
|
client.download('channels.json'),
|
||||||
|
client.download('streams.json'),
|
||||||
|
client.download('guides.json'),
|
||||||
|
client.download('countries.json'),
|
||||||
|
client.download('languages.json'),
|
||||||
|
client.download('regions.json'),
|
||||||
|
client.download('subdivisions.json')
|
||||||
|
]
|
||||||
|
|
||||||
|
await Promise.all(requests)
|
||||||
|
}
|
||||||
|
|
||||||
|
main()
|
Loading…
Add table
Add a link
Reference in a new issue