iptv-org/epg

ERR: Unexpected token ; in JSON at position 6950

marianpopeanga opened this issue · 2 comments

Describe your issue

I am getting the following error now when using this guide after an upgrade.

npm run grab -- --site=programetv.ro --lang=ro --days=3 --maxConnections=2 -o guides/ro/programetv.ro.xml

grab
npx tsx scripts/commands/epg/grab.ts --site=programetv.ro --lang=ro --days=3 --maxConnections=2 -o guides/ro/programetv.ro.xml

starting...
config:
output: guides/ro/programetv.ro.xml
maxConnections: 2
gzip: false
site: programetv.ro
lang: ro
days: 3
loading channels...
found 305 channel(s)
run #1:
[1/915] programetv.ro (ro) - 24-mix-teleshop - Apr 28, 2024 (0 programs)
ERR: Unexpected token ; in JSON at position 6950
[2/915] programetv.ro (ro) - 24-mix-teleshop - Apr 27, 2024 (0 programs)
ERR: Unexpected token ; in JSON at position 6950

I had to use this version "libxmljs2": "^0.32.0", (instead of 0.33.0) in order to not have to do a build, since i don't have the g++ installed on this machine, and the build was failing.

git diff package.json
diff --git a/package.json b/package.json
index 3638aec6..ece0499c 100644
--- a/package.json
+++ b/package.json
@@ -61,7 +61,7 @@
"inquirer": "^8.2.6",
"jest": "^29.7.0",
"langs": "^2.0.0",

  • "libxmljs2": "^0.33.0",
  • "libxmljs2": "^0.32.0",
    "lodash": "^4.17.21",
    "luxon": "^3.3.0",
    "markdown-include": "^0.4.3",

$ npm --version
8.19.4
$ node --version
v16.20.0

Should be fixed by #2359

Works now. Thanks !