close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 7 years ago

Last modified 7 years ago

#1960 accepted defect

GetUrlContents falla sobre https

Reported by: Jorge Owned by: Jorge
Priority: normal Milestone: Mantainance
Component: Kernel Version: 3.4
Severity: critical Keywords:
Cc:

Description

El siguiente ejemplo falla con todos los métodos:

Text GetUrlContents("https://finance.yahoo.com/quote/AAPL/history?period1=1350338400&period2=1508104800&interval=1d&filter=history&frequency=1d");

debajo los mensajes de error:

FAIL

Warning: [1] [GetUrlContents.tcl.curl] error: Protocol "https" not supported or disabled in libcurl


ERROR: [1] TolConfig no es un objeto valido para el tipo Anything.

ERROR: [2] [GetUrlContents] Invalid option value at TolConfigManager::Config::ExternalTools::UrlDownloader="tcom:iexplorer"
Method used by GetUrlContents in order to download contents from remote URL's. Valid methods are tcl:uri tcl:curl and sys:wget


[Call stack]
  [1] Text TolCore::GetUrlContents (Text url)

ERROR: [3] invalid command name "::tcom::NULL"


[Call stack]
  [3] Anything Error (Text message)
  [2] Text TolCore::GetUrlContents.tcom.iexplore (Text url)
  [1] Text TolCore::GetUrlContents (Text url)

ERROR: [4] Error del Sistema Operativo 
"frequency" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.


[Call stack]
  [3] Real TolCore::OSCmdWait (Text order)
  [2] Text TolCore::GetUrlContents.sys.wget (Text url)
  [1] Text TolCore::GetUrlContents (Text url)

Warning: [2] No se puede abrir para lectura el fichero C:/Users/jsperez/AppData/Roaming/tol/tmp/wget.643603831.tmp

Change History (1)

comment:1 Changed 7 years ago by Jorge

Status: newaccepted

Con wget hay que usar la opción --no-check-certificate

//////////////////////////////////////////////////////////////////////////////
Text GetUrlContents0(Text url)
//////////////////////////////////////////////////////////////////////////////
{
  If(TolConfigManager::Config::Various::Verbose::DownloadingUrl,
  WriteLn("[GetUrlContents.sys.wget]Downloading from \""+url+"\" ..."));
  Text tmp = TmpDir+"wget."<<IntRand(111111111,999999999)+".tmp";
  Text order = "wget --no-check-certificate -O"+tmp+" "+url;
  Real OSCmdWait(order);
  Text txt = ReadFile(tmp);
  Real OSFilRemove(tmp);
  txt
};
Note: See TracTickets for help on using tickets.