epg-grabber 0.38.0 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/index.js +3 -0
- package/tests/__data__/output/guide.xml +2 -2
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@ Arguments:
|
|
|
73
73
|
|
|
74
74
|
- `-c, --config`: path to config file
|
|
75
75
|
- `-o, --output`: path to output file or path template (example: `guides/{site}.{lang}.xml`; default: `guide.xml`)
|
|
76
|
-
- `-x, --proxy`: use the specified proxy
|
|
76
|
+
- `-x, --proxy`: use the specified proxy (example: `socks5://username:password@127.0.0.1:1234`)
|
|
77
77
|
- `--channels`: path to list of channels; you can also use wildcard to specify the path to multiple files at once (example: `example.com_*.channels.xml`)
|
|
78
78
|
- `--lang`: set default language for all programs (default: `en`)
|
|
79
79
|
- `--days`: number of days for which to grab the program (default: `1`)
|
|
@@ -98,6 +98,7 @@ module.exports = {
|
|
|
98
98
|
days: 3, // number of days for which to grab the program (default: 1)
|
|
99
99
|
delay: 5000, // delay between requests (default: 3000)
|
|
100
100
|
maxConnections: 200, // limit on the number of concurrent requests (default: 1)
|
|
101
|
+
curl: true, // display each request as CURL (default: false)
|
|
101
102
|
|
|
102
103
|
request: { // request options (details: https://github.com/axios/axios#request-config)
|
|
103
104
|
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
|
@@ -80,6 +80,9 @@ class EPGGrabberMock {
|
|
|
80
80
|
}
|
|
81
81
|
config = merge(this.config, config)
|
|
82
82
|
config = parseConfig(config)
|
|
83
|
+
|
|
84
|
+
await buildRequest({ channel, date, config })
|
|
85
|
+
|
|
83
86
|
let _programs = await config.parser({ channel, date: _date })
|
|
84
87
|
let programs = _programs.map(data => new Program(data, channel))
|
|
85
88
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" ?><tv date="
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?><tv date="20250715">
|
|
2
2
|
<channel id="1TV.com"><display-name>1 TV</display-name><icon src="https://example.com/logos/1TV.png"/><url>https://example.com</url></channel>
|
|
3
3
|
<channel id="2TV.com"><display-name>2 TV</display-name><url>https://example.com</url></channel>
|
|
4
4
|
<channel id="3TV.com"><display-name>3 TV</display-name><url>https://example2.com</url></channel>
|
|
5
5
|
<channel id="4TV.com"><display-name>4 TV</display-name><url>https://example2.com</url></channel>
|
|
6
6
|
<programme start="20220101000000 +0000" stop="20220101010000 +0000" channel="1TV.com"><title lang="fr">Program1</title></programme>
|
|
7
|
+
<programme start="20220101000000 +0000" stop="20220101010000 +0000" channel="2TV.com"><title>Program1</title></programme>
|
|
7
8
|
<programme start="20220101000000 +0000" stop="20220101010000 +0000" channel="4TV.com"><title>Program1</title></programme>
|
|
8
9
|
<programme start="20220101000000 +0000" stop="20220101010000 +0000" channel="3TV.com"><title>Program1</title></programme>
|
|
9
|
-
<programme start="20220101000000 +0000" stop="20220101010000 +0000" channel="2TV.com"><title>Program1</title></programme>
|
|
10
10
|
</tv>
|