pystardust / ani-cli

A cli tool to browse and play anime
GNU General Public License v3.0
7.92k stars 544 forks source link

grep: invalid repetition count(s) #418

Closed justchokingaround closed 2 years ago

justchokingaround commented 2 years ago

Metadata (please complete the following information): Version: [v1.4.0] OS: [Mac OS Big Sur and Catalina] Shell: [zsh and fish]

Describe the bug Does not play video after episode is selected, tested with naruto, one piece, code geass...

To Reproduce

  1. Run ani-cli naruto
  2. Select episode 1

Expected behavior Video should open. Also tested for iina with -i flag, same results.

Screenshots (if applicable)

Screen Shot 2022-01-26 at 5 46 30 PM

Additional context

pystardust commented 2 years ago

This is due to using variable with grep with bad regular expression.

grep "$variable"

maybe the grep was meant to search for string and not regex but it has the format of a bad regex. We should use -F flag to inform grep that it's a string we are searching. line 335 and 187 are such lines

pystardust commented 2 years ago

@ura43 any progress on this? I can't reproduce this error

RaynardGerraldo commented 2 years ago

@ura43 any progress on this? I can't reproduce this error

are you in mac? because this is a mac only bug

RaynardGerraldo commented 2 years ago

@iamchokerman

i dont have a mac,so i need you to test this regex out

grep -Eo 'https?:\/\/(www)?[-a-zA-Z0-9@:%._\+~#=]{1,256}[a-zA-Z0-9()]{1,6}([-a-zA-Z0-9()@:%_\+.~#?&\/\/=]*)'

replace the regex in line 176 with this

justchokingaround commented 2 years ago

@RaynardGerraldo didnt change anything