jdaviderb / youtube-audio

extract videos from youtube in audio format using webscraping techniques :notes:
MIT License
69 stars 1 forks source link

mini_racer issue #17

Open MarioRuiz opened 1 year ago

MarioRuiz commented 1 year ago

puts youtube.formats # Array TypeError: wrong argument type nil (expected String) from /Users/marioruizsanchez/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/mini_racer-0.6.3/lib/mini_racer.rb:228:in `eval_unsafe'

bengladwell commented 10 months ago

I am also experiencing this error. @MarioRuiz did you figure anything out?

bengladwell commented 10 months ago

I did a little more digging. It's just unmaintained code. ytInitialPlayerConfig in script_parser.rb, should now be ytInitialPlayerResponse, but more errors surface after you fix that. Because this gem uses scraping, it's always going to be a bit brittle. I'm sure it worked well when it was built, but it's stale at this point and will take ongoing effort to keep up with Youtube's changes.