4v3ngR / pluto_tv_scraper

Generate an m3u8 and xml (epg) for pluto tv channels
https://www.npmjs.com/package/plutotv-scraper
MIT License
19 stars 6 forks source link

Characters in regex not recognised #14

Closed Facy5 closed 8 months ago

Facy5 commented 8 months ago

So far, the way to exclude channel, or group of channels, is made by regex. But in Windows, when you want to exclude muliples channels, the character | is not considered as a part of the command, but it sees it as a new command, which output this in Terminal :

plutotv-scraper --exclude-channels '^(Local News|En Español)$'
'En' is not recognized as an internal or external command.

Is there another way to list undesired channels (by ex : --exclude-channels Channel1 Channel2 …) ?

Also, in Ubuntu, some French channels have the character ' in their names, resulting this error :

plutotv-scraper --mapping FR --exclude-channels '^(Alerte Cobra|Walker Texas Ranger|Les filles d'à côté)$'
-bash: syntax error near unexpected token `)'
4v3ngR commented 8 months ago

Are you able to try some of the suggestions outlined here? https://stackoverflow.com/questions/1200235/how-to-pass-a-quoted-pipe-character-to-cmd-exe

Perhaps one of these will work for Windows:

plutotv-scraper --mapping FR --exclude-channels "(Alerte Cobra|Walker Texas Ranger|Les filles d'à côté)" plutotv-scraper --mapping FR --exclude-channels "(Alerte Cobra^|Walker Texas Ranger^|Les filles d'à côté)"

Let me know how it goes and I'll update the README. I don't want to have to force the user to explicitly specify every channel they want to skip, in case they want to skip 100s (as there are over 300 channels in the US m3u8, it is possible to want to skip lots of them)

4v3ngR commented 8 months ago

My tests have shown that using double quotes in cmd.exe works as expected. I've updated the readme