cbanack / comic-vine-scraper

An add-on script for ComicRack that lets you copy details from Comic Vine into your comic books.
243 stars 47 forks source link

Could not create SSL/TLS secure channel. #463

Closed namanix closed 4 years ago

namanix commented 4 years ago

The scraper worked fine until today. Since this evening I cannot get anything from the scraper. See error underneath. I did see that they renewed their SSL certificate yesterday. I can open the url in Chrome and Internet Explorer just fine. No SSL errors. Any idea how I can fix this?

trying to match this book automatically...
ERROR OCCURRED CONTACTING COMICVINE. RETRYING...
------------------- PYTHON ERROR ------------------------
Caught DatabaseConnectionError: Comic Vine database could not be reached
url: https://comicvine.gamespot.com/api/search/?api_key=...&client=cvscraper&format=xml&limit=100&resources=volume&field_list=name,start_year,publisher,id,image,count_of_issues&query=a-force
CAUSE: System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
   at System.Net.HttpWebRequest.GetResponse()
   at Microsoft.Scripting.Interpreter.FuncCallInstruction`2.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2)
   at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
   at IronPython.Compiler.Ast.CallExpression.Invoke0Instruction.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
   at Microsoft.Scripting.Interpreter.FuncCallInstruction`4.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)
   at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Roaming\cYo\ComicRack\Scripts\Comic Vine Scraper\scrapeengine.py", line 142, in scrape
  File "C:\Users\Administrator\AppData\Roaming\cYo\ComicRack\Scripts\Comic Vine Scraper\scrapeengine.py", line 257, in _ScrapeEngine__scrape
  File "C:\Users\Administrator\AppData\Roaming\cYo\ComicRack\Scripts\Comic Vine Scraper\scrapeengine.py", line 426, in _ScrapeEngine__scrape_book
  File "C:\Users\Administrator\AppData\Roaming\cYo\ComicRack\Scripts\Comic Vine Scraper\automatcher.py", line 38, in find_series_ref
  File "C:\Users\Administrator\AppData\Roaming\cYo\ComicRack\Scripts\Comic Vine Scraper\automatcher.py", line 75, in __find_best_series
  File "C:\Users\Administrator\AppData\Roaming\cYo\ComicRack\Scripts\Comic Vine Scraper\db.py", line 156, in query_series_refs
  File "C:\Users\Administrator\AppData\Roaming\cYo\ComicRack\Scripts\Comic Vine Scraper\cvdb.py", line 142, in _query_series_refs
  File "C:\Users\Administrator\AppData\Roaming\cYo\ComicRack\Scripts\Comic Vine Scraper\cvdb.py", line 165, in __query_series_refs
  File "C:\Users\Administrator\AppData\Roaming\cYo\ComicRack\Scripts\Comic Vine Scraper\cvconnection.py", line 65, in _query_series_ids_dom
  File "C:\Users\Administrator\AppData\Roaming\cYo\ComicRack\Scripts\Comic Vine Scraper\cvconnection.py", line 217, in __get_dom
  File "C:\Users\Administrator\AppData\Roaming\cYo\ComicRack\Scripts\Comic Vine Scraper\cvconnection.py", line 174, in __get_dom
namanix commented 4 years ago

Fixed the problem by forcing TLS V1.2 for the requests. See the pull request: https://github.com/cbanack/comic-vine-scraper/pull/464

cbanack commented 4 years ago

Great, a bug report with an attached solution is my favourite kind of bug report. :)

I'll merge your pull request and release a new version of the scraper sometime soon. Thanks!

namanix commented 4 years ago

Amazing! Do check if the full "import system" is needed. It might be a bit overkill for it. But my python isn't good enough to make it better haha

cbanack commented 4 years ago

Pull requested accepted and merged into Comic Vine Scraper 1.0.99.