Skip to content

Commit 4df25c9

Browse files
Merge pull request #2743 from iptv-org/patch-2025.03.1
Patch 2025.03.1
2 parents 0728f6c + 6a4404b commit 4df25c9

File tree

6 files changed

+2512
-114
lines changed

6 files changed

+2512
-114
lines changed

README.md

Lines changed: 42 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,15 @@ npm install
3939

4040
## Usage
4141

42-
To start the download of the guide, select one of the [supported sites](SITES.md) and paste its name into the command below:
42+
To start the download of the guide, select one of the supported sites from [SITES.md](SITES.md) file and paste its name into the command below:
4343

4444
```sh
4545
npm run grab --- --site=example.com
4646
```
4747

48-
And once the download is complete, the guide will be saved to the `guide.xml` file.
48+
Then run it and wait for the guide to finish downloading. When finished, a new `guide.xml` file will appear in the current directory.
49+
50+
You can also customize the behavior of the script using this options:
4951

5052
```sh
5153
Usage: npm run grab --- [options]
@@ -55,35 +57,13 @@ Options:
5557
-c, --channels <path> Path to *.channels.xml file (required if the "--site" attribute is
5658
not specified)
5759
-o, --output <path> Path to output file (default: "guide.xml")
58-
-l, --lang <code> Filter channels by language (ISO 639-2 code)
59-
-t, --timeout <milliseconds> Override the default timeout for each request
60-
-d, --delay <milliseconds> Override the default delay between request
60+
-l, --lang <code> Allows to limit the download to channels in the specified language only (ISO 639-1 code)
61+
-t, --timeout <milliseconds> Timeout for each request in milliseconds (default: 0)
62+
-d, --delay <milliseconds> Delay between request in milliseconds (default: 0)
6163
-x, --proxy <url> Use the specified proxy (example: "socks5://username:[email protected]:1234")
62-
--days <days> Override the number of days for which the program will be loaded
63-
(defaults to the value from the site config)
64-
--maxConnections <number> Limit on the number of concurrent requests (default: 1)
65-
--cron <expression> Schedule a script run (example: "0 0 * * *")
66-
--gzip Create a compressed version of the guide as well (default: false)
67-
```
68-
69-
### Access the guide by URL
70-
71-
You can make the guide available via URL by running your own server:
72-
73-
```sh
74-
npm run serve
75-
```
76-
77-
After that, the guide will be available at the link:
78-
79-
```
80-
http://localhost:3000/guide.xml
81-
```
82-
83-
In addition it will be available to other devices on the same local network at the address:
84-
85-
```
86-
http://<your_local_ip_address>:3000/guide.xml
64+
--days <days> Number of days for which the program will be loaded (defaults to the value from the site config)
65+
--maxConnections <number> Number of concurrent requests (default: 1)
66+
--gzip Specifies whether or not to create a compressed version of the guide (default: false)
8767
```
8868
8969
### Parallel downloading
@@ -116,12 +96,42 @@ npm run grab --- --channels=path/to/custom.channels.xml
11696
11797
### Run on schedule
11898
119-
If you want to download the guide automatically on a schedule, you need to pass a valid [cron expression](https://crontab.guru/) to the script using the `--cron` attribute:
99+
To download the guide on a schedule, you can use the included process manager. Just run it with desire [cron expression](https://crontab.guru/) and the `grab` options:
120100
121101
```sh
122-
npm run grab --- --site=example.com --cron="0 0 * * *"
102+
npx pm2 start npm --no-autorestart --cron-restart="0 0,12 * * *" -- run grab --- --site=example.com
123103
```
124104
105+
To track the process, you can use the command:
106+
107+
```sh
108+
npx pm2 logs
109+
```
110+
111+
For more info go to [pm2](https://pm2.keymetrics.io/docs/usage/quick-start/) documentation.
112+
113+
### Access the guide by URL
114+
115+
You can make the guide available via URL by running your own server. The easiest way to do this is to run this command:
116+
117+
```sh
118+
npx serve
119+
```
120+
121+
After that, the guide will be available at the link:
122+
123+
```
124+
http://localhost:3000/guide.xml
125+
```
126+
127+
In addition it will be available to other devices on the same local network at the address:
128+
129+
```
130+
http://<your_local_ip_address>:3000/guide.xml
131+
```
132+
133+
For more info go to [serve](https://github.com/vercel/serve) documentation.
134+
125135
## Update
126136
127137
If you have downloaded the repository code according to the instructions above, then to update it will be enough to run the command:

0 commit comments

Comments
 (0)