acomputerguru / periscope

Automatically exported from code.google.com/p/periscope
0 stars 0 forks source link

Sometimes doesn't work when specifying --language #124

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Version 0.2.4 on debian stable

To reproduce:
1.try to download a sub with --language=en
2.try to download the same sub without --language=en

It should work both times, instead it happens with some files that it works 
only on 2nd try, and it downloads the english version.

This is a non working case:

periscope --debug --language=en 
/media/mediaserver/torrents/finiti/Castle.2009.S04E13.HDTV.XviD-LOL.avi
INFO:periscope.periscope:Searching subtitles for 
/media/mediaserver/torrents/finiti/Castle.2009.S04E13.HDTV.XviD-LOL.avi with 
langs ['en']
INFO:periscope.periscope:Searching on OpenSubtitles 
INFO:periscope.periscope:Searching on Subtitulos 
DEBUG:periscope.plugins.OpenSubtitles:8ee836489b829a78
DEBUG:periscope.plugins.SubtitleDatabase:Downloading 
http://www.subtitulos.es/castle-2009/4x13
INFO:periscope.periscope:Searching on Podnapisi 
DEBUG:periscope.plugins.OpenSubtitles:query
DEBUG:periscope.plugins.Podnapisi:Searching for Castle.2009.S04E13.HDTV.XviD-LOL
INFO:periscope.periscope:Searching on TheSubDB 
DEBUG:periscope.plugins.SubtitleDatabase:Downloading 
http://simple.podnapisi.net/ppodnapisi/search?sR=Castle.2009.S04E13.HDTV.XviD-LO
L&sJ=2
DEBUG:periscope.plugins.TheSubDB:File hash : b385ba7f0fb959681c6db29876d098e7
DEBUG:periscope.plugins.TheSubDB:Query URL : 
http://api.thesubdb.com/?action=download&hash=b385ba7f0fb959681c6db29876d098e7
INFO:periscope.periscope:Searching on BierDopje 
DEBUG:periscope.plugins.BierDopje:possible langs : ['en'] 
DEBUG:periscope.plugins.BierDopje:Looking for subs @ 
http://api.bierdopje.com/112C8204D6754A2A/GetAllSubsFor/12708/4/13/en
INFO:periscope.periscope:Searching on SubsWiki 
DEBUG:root:dl'ing http://www.subswiki.com/serie/castle_2009/4/13/
INFO:periscope.plugins.SubtitleDatabase:SubsWiki writing 0 items to queue
INFO:periscope.plugins.SubtitleDatabase:BierDopje writing 0 items to queue
DEBUG:periscope.plugins.OpenSubtitles:{'status': '200 OK', 'seconds': 
0.0070000000000000001, 'token': 'i8bhu1q8hnk7qtj4dav7domte5'}
DEBUG:periscope.plugins.OpenSubtitles:query: 
token='i8bhu1q8hnk7qtj4dav7domte5', search='{'moviebytesize': '366735806', 
'sublanguageid': 'eng', 'moviehash': '8ee836489b829a78'}'
WARNING:periscope.plugins.SubtitleDatabase:HTTP Error: 404 - 
http://www.subtitulos.es/castle-2009/4x13
INFO:periscope.plugins.SubtitleDatabase:Subtitulos writing 0 items to queue
INFO:periscope.plugins.SubtitleDatabase:TheSubDB writing 0 items to queue
DEBUG:periscope.plugins.OpenSubtitles:Result: {'status': '200 OK', 'seconds': 
0.037999999999999999, 'data': False}
INFO:periscope.plugins.SubtitleDatabase:OpenSubtitles writing 0 items to queue
DEBUG:periscope.plugins.Podnapisi:[]
DEBUG:periscope.plugins.SubtitleDatabase:Downloading 
http://simple.podnapisi.net/ppodnapisi/search?sR=Castle.2009.S04E13.HDTV.XviD-LO
&sJ=2
DEBUG:periscope.plugins.Podnapisi:[]
INFO:periscope.plugins.SubtitleDatabase:Podnapisi writing 0 items to queue
INFO:__main__:**************************************************
INFO:__main__:Downloaded 0 subtitles
INFO:__main__:**************************************************

The same file, without language specification:

periscope --debug 
/media/mediaserver/torrents/finiti/Castle.2009.S04E13.HDTV.XviD-LOL.avi
INFO:__main__:No lang given, looking into config file
INFO:periscope.periscope:lang read from config: 
INFO:periscope.periscope:Searching subtitles for 
/media/mediaserver/torrents/finiti/Castle.2009.S04E13.HDTV.XviD-LOL.avi with 
langs None
INFO:periscope.periscope:Searching on OpenSubtitles 
INFO:periscope.periscope:Searching on Subtitulos 
INFO:periscope.periscope:Searching on Podnapisi 
DEBUG:periscope.plugins.OpenSubtitles:8ee836489b829a78
DEBUG:periscope.plugins.SubtitleDatabase:Downloading 
http://www.subtitulos.es/castle-2009/4x13
DEBUG:periscope.plugins.Podnapisi:Searching for Castle.2009.S04E13.HDTV.XviD-LOL
INFO:periscope.periscope:Searching on TheSubDB 
DEBUG:periscope.plugins.OpenSubtitles:query
DEBUG:periscope.plugins.SubtitleDatabase:Downloading 
http://simple.podnapisi.net/ppodnapisi/search?sR=Castle.2009.S04E13.HDTV.XviD-LO
L&sJ=0
DEBUG:periscope.plugins.TheSubDB:File hash : b385ba7f0fb959681c6db29876d098e7
DEBUG:periscope.plugins.TheSubDB:Query URL : 
http://api.thesubdb.com/?action=download&hash=b385ba7f0fb959681c6db29876d098e7
INFO:periscope.periscope:Searching on BierDopje 
INFO:periscope.periscope:Searching on SubsWiki 
DEBUG:periscope.plugins.BierDopje:possible langs : ['nl', 'en'] 
DEBUG:root:dl'ing http://www.subswiki.com/serie/castle_2009/4/13/
DEBUG:periscope.plugins.BierDopje:Looking for subs @ 
http://api.bierdopje.com/112C8204D6754A2A/GetAllSubsFor/12708/4/13/nl
INFO:periscope.plugins.SubtitleDatabase:SubsWiki writing 0 items to queue
DEBUG:periscope.plugins.BierDopje:Looking for subs @ 
http://api.bierdopje.com/112C8204D6754A2A/GetAllSubsFor/12708/4/13/en
DEBUG:periscope.plugins.OpenSubtitles:{'status': '200 OK', 'seconds': 
0.0089999999999999993, 'token': '69dg5kanvdetsgrf091k62hhb3'}
DEBUG:periscope.plugins.OpenSubtitles:query: 
token='69dg5kanvdetsgrf091k62hhb3', search='{'moviebytesize': '366735806', 
'moviehash': '8ee836489b829a78'}'
INFO:periscope.plugins.SubtitleDatabase:TheSubDB writing 0 items to queue
WARNING:periscope.plugins.SubtitleDatabase:HTTP Error: 404 - 
http://www.subtitulos.es/castle-2009/4x13
INFO:periscope.plugins.SubtitleDatabase:Subtitulos writing 0 items to queue
INFO:periscope.plugins.SubtitleDatabase:BierDopje writing 0 items to queue
DEBUG:periscope.plugins.OpenSubtitles:Result: {'status': '200 OK', 'seconds': 
0.0060000000000000001, 'data': [{'ISO639': 'en', 'SubComments': '0', 'UserID': 
'0', 'SubFileName': 'Castle - 04x13 - An Embarrassment Of 
Bitches.LOL.English.C.orig.Addic7ed.com.srt', 'SubAddDate': '2012-01-24 
12:54:00', 'SubBad': '0', 'SubLanguageID': 'eng', 'SeriesEpisode': '13', 
'MovieImdbRating': '9.7', 'SubHash': '0d8e0bed2cbe6eac641a8566e71e4d4f', 
'MovieReleaseName': 'Castle.2009.S04E13.HDTV.XviD-LOL', 'SubtitlesLink': 
'http://www.opensubtitles.org/en/subtitles/4456052/castle-an-embarrassment-of-bi
tches-en', 'IDMovie': '121000', 'SubDownloadsCnt': '143', 'QueryParameters': 
{'moviebytesize': '366735806', 'moviehash': '8ee836489b829a78'}, 
'MovieByteSize': '366735806', 'MovieKind': 'episode', 'SeriesSeason': '4', 
'IDSubMovieFile': '4142286', 'SubSize': '77510', 'IDSubtitle': '4456052', 
'IDSubtitleFile': '1953015995', 'SubHearingImpaired': '0', 'SubSumCD': '1', 
'QueryNumber': '0', 'SubAuthorComment': '', 'MovieNameEng': '', 'MatchedBy': 
'moviehash', 'SubRating': '0.0', 'SubDownloadLink': 
'http://www.opensubtitles.org/en/download/filead/1953015995.gz', 
'ZipDownloadLink': 'http://www.opensubtitles.org/en/download/subad/4456052', 
'SubFeatured': '0', 'MovieTimeMS': '0', 'SubActualCD': '1', 'UserNickName': '', 
'SubFormat': 'srt', 'MovieHash': '8ee836489b829a78', 'LanguageName': 'English', 
'UserRank': '', 'MovieName': '"Castle" An Embarrassment of Bitches', 
'IDMovieImdb': '2122569', 'MovieYear': '2012'}, {'ISO639': 'bg', 'SubComments': 
'0', 'UserID': '0', 'SubFileName': 'NCIS - 6x13 - Broken Bird.HDTV.LOL.en.srt', 
'SubAddDate': '2010-08-07 17:17:01', 'SubBad': '0', 'SubLanguageID': 'bul', 
'SeriesEpisode': '13', 'MovieImdbRating': '7.8', 'SubHash': 
'086ef198b5bfd1bda5b8baab5955ccfb', 'MovieReleaseName': ':NCIS 6x13 Broken Bird 
HDTV LOL en', 'SubtitlesLink': 
'http://www.opensubtitles.org/en/subtitles/3734836/ncis-naval-criminal-investiga
tive-service-broken-bird-bg', 'IDMovie': '96362', 'SubDownloadsCnt': '917', 
'QueryParameters': {'moviebytesize': '366735806', 'moviehash': 
'8ee836489b829a78'}, 'MovieByteSize': '366735806', 'MovieKind': 'episode', 
'SeriesSeason': '6', 'IDSubMovieFile': '4142964', 'SubSize': '51744', 
'IDSubtitle': '3734836', 'IDSubtitleFile': '1952390224', 'SubHearingImpaired': 
'0', 'SubSumCD': '1', 'QueryNumber': '0', 'SubAuthorComment': '', 
'MovieNameEng': '', 'MatchedBy': 'moviehash', 'SubRating': '0.0', 
'SubDownloadLink': 
'http://www.opensubtitles.org/en/download/filead/1952390224.gz', 
'ZipDownloadLink': 'http://www.opensubtitles.org/en/download/subad/3734836', 
'SubFeatured': '0', 'MovieTimeMS': '0', 'SubActualCD': '1', 'UserNickName': '', 
'SubFormat': 'srt', 'MovieHash': '8ee836489b829a78', 'LanguageName': 
'Bulgarian', 'UserRank': '', 'MovieName': '"NCIS: Naval Criminal Investigative 
Service" Broken Bird', 'IDMovieImdb': '1256288', 'MovieYear': '2009'}]}
DEBUG:periscope.plugins.OpenSubtitles:[{'ISO639': 'en', 'SubComments': '0', 
'UserID': '0', 'SubFileName': 'Castle - 04x13 - An Embarrassment Of 
Bitches.LOL.English.C.orig.Addic7ed.com.srt', 'SubAddDate': '2012-01-24 
12:54:00', 'SubBad': '0', 'SubLanguageID': 'eng', 'SeriesEpisode': '13', 
'MovieImdbRating': '9.7', 'SubHash': '0d8e0bed2cbe6eac641a8566e71e4d4f', 
'MovieReleaseName': 'Castle.2009.S04E13.HDTV.XviD-LOL', 'SubtitlesLink': 
'http://www.opensubtitles.org/en/subtitles/4456052/castle-an-embarrassment-of-bi
tches-en', 'IDMovie': '121000', 'SubDownloadsCnt': '143', 'QueryParameters': 
{'moviebytesize': '366735806', 'moviehash': '8ee836489b829a78'}, 
'MovieByteSize': '366735806', 'MovieKind': 'episode', 'SeriesSeason': '4', 
'IDSubMovieFile': '4142286', 'SubSize': '77510', 'IDSubtitle': '4456052', 
'IDSubtitleFile': '1953015995', 'SubHearingImpaired': '0', 'SubSumCD': '1', 
'QueryNumber': '0', 'SubAuthorComment': '', 'MovieNameEng': '', 'MatchedBy': 
'moviehash', 'SubRating': '0.0', 'SubDownloadLink': 
'http://www.opensubtitles.org/en/download/filead/1953015995.gz', 
'ZipDownloadLink': 'http://www.opensubtitles.org/en/download/subad/4456052', 
'SubFeatured': '0', 'MovieTimeMS': '0', 'SubActualCD': '1', 'UserNickName': '', 
'SubFormat': 'srt', 'MovieHash': '8ee836489b829a78', 'LanguageName': 'English', 
'UserRank': '', 'MovieName': '"Castle" An Embarrassment of Bitches', 
'IDMovieImdb': '2122569', 'MovieYear': '2012'}, {'ISO639': 'bg', 'SubComments': 
'0', 'UserID': '0', 'SubFileName': 'NCIS - 6x13 - Broken Bird.HDTV.LOL.en.srt', 
'SubAddDate': '2010-08-07 17:17:01', 'SubBad': '0', 'SubLanguageID': 'bul', 
'SeriesEpisode': '13', 'MovieImdbRating': '7.8', 'SubHash': 
'086ef198b5bfd1bda5b8baab5955ccfb', 'MovieReleaseName': ':NCIS 6x13 Broken Bird 
HDTV LOL en', 'SubtitlesLink': 
'http://www.opensubtitles.org/en/subtitles/3734836/ncis-naval-criminal-investiga
tive-service-broken-bird-bg', 'IDMovie': '96362', 'SubDownloadsCnt': '917', 
'QueryParameters': {'moviebytesize': '366735806', 'moviehash': 
'8ee836489b829a78'}, 'MovieByteSize': '366735806', 'MovieKind': 'episode', 
'SeriesSeason': '6', 'IDSubMovieFile': '4142964', 'SubSize': '51744', 
'IDSubtitle': '3734836', 'IDSubtitleFile': '1952390224', 'SubHearingImpaired': 
'0', 'SubSumCD': '1', 'QueryNumber': '0', 'SubAuthorComment': '', 
'MovieNameEng': '', 'MatchedBy': 'moviehash', 'SubRating': '0.0', 
'SubDownloadLink': 
'http://www.opensubtitles.org/en/download/filead/1952390224.gz', 
'ZipDownloadLink': 'http://www.opensubtitles.org/en/download/subad/3734836', 
'SubFeatured': '0', 'MovieTimeMS': '0', 'SubActualCD': '1', 'UserNickName': '', 
'SubFormat': 'srt', 'MovieHash': '8ee836489b829a78', 'LanguageName': 
'Bulgarian', 'UserRank': '', 'MovieName': '"NCIS: Naval Criminal Investigative 
Service" Broken Bird', 'IDMovieImdb': '1256288', 'MovieYear': '2009'}]
INFO:periscope.plugins.SubtitleDatabase:OpenSubtitles writing 2 items to queue
DEBUG:periscope.plugins.Podnapisi:[]
DEBUG:periscope.plugins.SubtitleDatabase:Downloading 
http://simple.podnapisi.net/ppodnapisi/search?sR=Castle.2009.S04E13.HDTV.XviD-LO
&sJ=0
DEBUG:periscope.plugins.Podnapisi:[]
INFO:periscope.plugins.SubtitleDatabase:Podnapisi writing 0 items to queue
DEBUG:periscope.periscope:All subtitles: 
DEBUG:periscope.periscope:[{'lang': 'en', 'plugin': 
<periscope.plugins.OpenSubtitles.OpenSubtitles object at 0x14f8e50>, 
'filename': 
'/media/mediaserver/torrents/finiti/Castle.2009.S04E13.HDTV.XviD-LOL.avi', 
'link': 'http://www.opensubtitles.org/en/download/filead/1953015995.gz', 
'release': 'Castle - 04x13 - An Embarrassment Of 
Bitches.LOL.English.C.orig.Addic7ed.com.srt', 'page': 
'http://www.opensubtitles.org/en/download/filead/1953015995.gz'}, {'lang': 
'bg', 'plugin': <periscope.plugins.OpenSubtitles.OpenSubtitles object at 
0x14f8e50>, 'filename': 
'/media/mediaserver/torrents/finiti/Castle.2009.S04E13.HDTV.XviD-LOL.avi', 
'link': 'http://www.opensubtitles.org/en/download/filead/1952390224.gz', 
'release': 'NCIS - 6x13 - Broken Bird.HDTV.LOL.en.srt', 'page': 
'http://www.opensubtitles.org/en/download/filead/1952390224.gz'}]
INFO:periscope.periscope:Trying to download subtitle: 
http://www.opensubtitles.org/en/download/filead/1953015995.gz
DEBUG:periscope.plugins.SubtitleDatabase:Downloading 
http://www.opensubtitles.org/en/download/filead/1953015995.gz
DEBUG:periscope.plugins.SubtitleDatabase:Download finished to file 
/media/mediaserver/torrents/finiti/Castle.2009.S04E13.HDTV.XviD-LOL.srt.gz. 
Size : 29250
INFO:__main__:**************************************************
INFO:__main__:Downloaded 1 subtitles
INFO:__main__:en - 
/media/mediaserver/torrents/finiti/Castle.2009.S04E13.HDTV.XviD-LOL.srt
INFO:__main__:**************************************************

I think the key is in "WARNING:periscope.plugins.SubtitleDatabase:HTTP Error: 
404 - ".

Original issue reported on code.google.com by d.co...@gmail.com on 24 Jan 2012 at 10:03

GoogleCodeExporter commented 9 years ago
Actually, I see that the 404 error is in both logs, so it shouldn't matter

Original comment by d.co...@gmail.com on 24 Jan 2012 at 10:05