cooperhammond / irs

:guitar: :notes: A music downloader that understands your metadata needs.
MIT License
381 stars 26 forks source link

Keep getting errror related to chrome webdriver #52

Closed amit-bhandari closed 5 years ago

amit-bhandari commented 5 years ago

I keep getting following error.

selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

I have downloaded chrome webdriver and installed it in system path as well.

I am using UBUNTU 16.04

parsehex commented 5 years ago

Had this error using Ubuntu 18.10 as well, also had chome webdriver in PATH.

amit-bhandari commented 5 years ago

Did you find solution? @parseHex

parsehex commented 5 years ago

Just took a try at getting it to work and succeeded. I don't know if it's what you're supposed to do but here's what I did:

amit-bhandari commented 5 years ago

I tried your steps but I don't know what's wrong with irs, it's opening chromium browser upon execution. Used to work flawlessly couple months back.

parsehex commented 5 years ago

It opens Chromium when you execute the irs command? Is there a message toward the top of the browser window saying something along the lines of "Chrome is being control by automated test software."? If so then that's normal I think - it looks like irs controls Chromium to bypass YouTube's captcha.

It took a minute or two to download a song but it finished eventually and I found the song in my home directory's Music folder.

amit-bhandari commented 5 years ago

Yes, it said the title which you mentioned.

But still it crashed saying this on traceback.

`Traceback (most recent call last): File "/home/ab/.local/lib/python3.5/site-packages/irs/ripper.py", line 229, in find_yt_url return ("https://youtube.com" + self.code["href"], self.code["title"]) TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/ab/.local/bin/irs", line 11, in sys.exit(main()) File "/home/ab/.local/lib/python3.5/site-packages/irs/cli.py", line 82, in main console(ripper) File "/home/ab/.local/lib/python3.5/site-packages/irs/utils.py", line 350, in console ripper.song(song_name, artist_name) File "/home/ab/.local/lib/python3.5/site-packages/irs/ripper.py", line 429, in song video_url, video_title = self.find_yt_url(song, artist) File "/home/ab/.local/lib/python3.5/site-packages/irs/ripper.py", line 226, in find_yt_url return self.find_yt_url(song, artist, additional_search, caught_by_google, first, tries=tries + 1) File "/home/ab/.local/lib/python3.5/site-packages/irs/ripper.py", line 226, in find_yt_url return self.find_yt_url(song, artist, additional_search, caught_by_google, first, tries=tries + 1) File "/home/ab/.local/lib/python3.5/site-packages/irs/ripper.py", line 226, in find_yt_url return self.find_yt_url(song, artist, additional_search, caught_by_google, first, tries=tries + 1) File "/home/ab/.local/lib/python3.5/site-packages/irs/ripper.py", line 226, in find_yt_url return self.find_yt_url(song, artist, additional_search, caught_by_google, first, tries=tries + 1) File "/home/ab/.local/lib/python3.5/site-packages/irs/ripper.py", line 226, in find_yt_url return self.find_yt_url(song, artist, additional_search, caught_by_google, first, tries=tries + 1) File "/home/ab/.local/lib/python3.5/site-packages/irs/ripper.py", line 224, in find_yt_url return self.find_yt_url(song, artist, additional_search, caught_by_google, first=True, tries=tries + 1) File "/home/ab/.local/lib/python3.5/site-packages/irs/ripper.py", line 234, in find_yt_url return self.find_yt_url(song=song, artist=artist, additional_search=additional_search, caught_by_google=True, tries=tries + 1) File "/home/ab/.local/lib/python3.5/site-packages/irs/ripper.py", line 159, in find_yt_url soup = BeautifulSoup(CaptchaCheat.cheat_it(link), 'html.parser') File "/home/ab/.local/lib/python3.5/site-packages/irs/utils.py", line 472, in cheat_it while CaptchaCheat.strip_it(b.evaluate_script("document.URL")) != CaptchaCheat.strip_it(url): File "/home/ab/.local/lib/python3.5/site-packages/irs/utils.py", line 478, in strip_it s = s.strip("http://") TypeError: a bytes-like object is required, not 'str' `

parsehex commented 5 years ago

Okay so I dug around a little bit and was able to get this error on my machine. It looks like this error is related to Python 3. I had it installed with 2 before so I didn't get the error and got it when I switched.

Try uninstalling Python 3's version and install Python 2's and see if that helps.

amit-bhandari commented 5 years ago

Okay let me try with python 2

cooperhammond commented 5 years ago

So I removed the chromedriver entirely with #55, so there's no getting around the captcha yet. In the future I'll bring back the captcha cheater.