epg-grabber 0.29.2 → 0.29.4

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 CHANGED
@@ -102,6 +102,15 @@ module.exports = {
102
102
 
103
103
  method: 'GET',
104
104
  timeout: 5000,
105
+ proxy: {
106
+ protocol: 'https',
107
+ host: '127.0.0.1',
108
+ port: 9000,
109
+ auth: {
110
+ username: 'mikeymike',
111
+ password: 'rapunz3l'
112
+ }
113
+ },
105
114
  cache: { // cache options (details: https://axios-cache-interceptor.js.org/#/pages/per-request-configuration)
106
115
  ttl: 60 * 1000 // 60s
107
116
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "epg-grabber",
3
- "version": "0.29.2",
3
+ "version": "0.29.4",
4
4
  "description": "Node.js CLI tool for grabbing EPG from different sites",
5
5
  "main": "src/index.js",
6
6
  "preferGlobal": true,
package/src/Program.js CHANGED
@@ -9,15 +9,15 @@ class Program {
9
9
  }
10
10
 
11
11
  const data = {
12
- site: p.site || c.site || '',
13
- channel: p.channel || c.id || '',
12
+ site: c.site || '',
13
+ channel: c.id || '',
14
14
  titles: toArray(p.titles || p.title).map(text => toTextObject(text, c.lang)),
15
15
  sub_titles: toArray(p.sub_titles || p.sub_title).map(text => toTextObject(text, c.lang)),
16
16
  descriptions: toArray(p.descriptions || p.description || p.desc).map(text =>
17
17
  toTextObject(text, c.lang)
18
18
  ),
19
19
  icon: toIconObject(p.icon),
20
- episodeNumbers: p.episodeNumbers || getEpisodeNumbers(p.season, p.episode),
20
+ episodeNumbers: p.episodeNum || p.episodeNumbers || getEpisodeNumbers(p.season, p.episode),
21
21
  date: p.date ? toUnix(p.date) : null,
22
22
  start: p.start ? toUnix(p.start) : null,
23
23
  stop: p.stop ? toUnix(p.stop) : null,
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="UTF-8" ?><tv date="20220829">
1
+ <?xml version="1.0" encoding="UTF-8" ?><tv date="20221120">
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
  <programme start="20220101000000 +0000" stop="20220101010000 +0000" channel="1TV.com"><title lang="fr">Program1</title></programme>
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="UTF-8" ?><tv date="20220829">
1
+ <?xml version="1.0" encoding="UTF-8" ?><tv date="20221120">
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
  </tv>
@@ -18,6 +18,15 @@ const config = {
18
18
  Cookie: 'abc=123',
19
19
  'User-Agent':
20
20
  'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36 Edg/79.0.309.71'
21
+ },
22
+ proxy: {
23
+ protocol: 'https',
24
+ host: '127.0.0.1',
25
+ port: 9000,
26
+ auth: {
27
+ username: 'mikeymike',
28
+ password: 'rapunz3l'
29
+ }
21
30
  }
22
31
  },
23
32
  url: 'http://example.com/20210319/1tv.json'
@@ -39,7 +48,16 @@ it('can build request', done => {
39
48
  responseType: 'arraybuffer',
40
49
  timeout: 5000,
41
50
  url: 'http://example.com/20210319/1tv.json',
42
- withCredentials: true
51
+ withCredentials: true,
52
+ proxy: {
53
+ protocol: 'https',
54
+ host: '127.0.0.1',
55
+ port: 9000,
56
+ auth: {
57
+ username: 'mikeymike',
58
+ password: 'rapunz3l'
59
+ }
60
+ }
43
61
  })
44
62
  done()
45
63
  })