manojmj92 / subtitle-downloader

Python script to automatically download subtitles for any movie/tv series episode.
GNU General Public License v3.0
777 stars 239 forks source link

ModuleNotFoundError #39

Open srijeetHalder opened 7 years ago

srijeetHalder commented 7 years ago

Traceback (most recent call last): File "C:\subtitle-downloader.py", line 19, in import requests,time,re,zipfile ModuleNotFoundError: No module named 'requests' Traceback (most recent call last): File "C:\subtitle-downloader.py", line 19, in import requests,time,re,zipfile ModuleNotFoundError: No module named 'requests' Traceback (most recent call last): File "C:\subtitle-downloader.py", line 19, in import requests,time,re,zipfile ModuleNotFoundError: No module named 'requests' Traceback (most recent call last): File "C:\subtitle-downloader.py", line 19, in import requests,time,re,zipfile ModuleNotFoundError: No module named 'requests' GOTO was unexpected at this time.

Above error comes when I am using the script.

marauderlabs commented 7 years ago

same as #25. Already reported.

manojmj92 commented 7 years ago

Have you installed the requests package?

On 7 Apr 2017 11:52 a.m., "Anand" notifications@github.com wrote:

same as #25 https://github.com/manojmj92/subtitle-downloader/issues/25. Already reported.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/manojmj92/subtitle-downloader/issues/39#issuecomment-292451850, or mute the thread https://github.com/notifications/unsubscribe-auth/AD2OwYUo4Kx2nh00XJBfKSbT4qb1JBOnks5rtdY9gaJpZM4M2f_E .

jay-ramani commented 7 years ago

The latest version of the script is broken for packages and functionality as well.

Installed the requests, lxml, and BeautifulSoup packages. However, the script remains broken for SubDB search included! I manually searched on SubDB for many movies and found subtitles. Example, Moneyball released in 2011. The script however doesn't download from SubDB, I commented the SubScene code and put some debugs to find it's giving a 404 error.

When was this last tested to be working?

ewwink commented 7 years ago

there are few unnecessary module in this repos, like requests its only shorthand for urllib and not builtin module and we can replace with function get() like

def get(url):
     req = urllib2.Request(url)
     html = urllib2.urlopen(req).read()
     return html

second is module bs4 (BeautifulSoup) known as super slow html parser (http://blog.dispatched.ch/2010/08/16/beautifulsoup-vs-lxml-performance/) use instead lxml directly or powerful Regex so dont need to install module lxml. another problem is search results is no longer with structure a > span tags but to capture the results we can use regex re.compile('href="(/subtitles/[^"]+)"').findall(html) I'm not an expert so let wait @manojmj92 to completely rewrite this project 😃