sistem Posted January 19, 2021 Report Share Posted January 19, 2021 a Quote Link to comment Share on other sites More sharing options...
kapiaba Posted January 20, 2021 Report Share Posted January 20, 2021 Sistem, não entendi! Não baixou filme nenhum, e sim uma JPG no meu PENDRIVE em F:\ no seu caso era E:\ O que está errado aqui, já que você não postou commpleto. #include "FiveWin.ch" static oWnd //----------------------------------------------------------------// function Main() local oBar, cRequest cRequest := ( "http://www.omdbapi.com/?t=Mr.+Sardonicus&apikey=777fbcc4" ) DEFINE WINDOW oWnd TITLE "Baixar Filmes" DEFINE BUTTONBAR oBar _3D OF oWnd DEFINE BUTTON OF oBar ACTION( httpFilmes( cRequest ) ) SET MESSAGE OF oWnd TO "Baixar Filmes" NOINSET CLOCK DATE KEYBOARD ACTIVATE WINDOW oWnd return nil FUNCTION httpFilmes( cRequest ) LOCAL oHttp, aArray, cResp // DEFAULT cRequest := "http://www.omdbapi.com/?t=Mr.+Sardonicus&apikey=777fbcc4" Try oHttp := CreateObject( "Microsoft.XMLHTTP" ) Catch MsgInfo( "erro XMLHTTP" ) End oHttp:Open( 'GET', cRequest, .F. ) oHttp:SetRequestHeader( "Content-Type", "application/json" ) oHttp:Send() IF oHttp:Status != 200 Msgstop( Alltrim( str(oHttp:Status ) ) + "-" + oHttp:StatusText , "Erro" ) RETURN nil ENDIF Try cResp := oHttp:ResponseBody Catch MsgInfo( "erro responsebody" ) RETURN nil End Hb_jsondecode( cResp, @aArray ) IF aArray == nil Msgstop( "Erro ao retornar os dados." ) RETURN nil ENDIF IF Alltrim( aArray["Response"] ) = "False" Msgstop( Alltrim( aArray["Response"] ) + "-" + Alltrim( aArray["Error"] ) ) RETURN nil ENDIF ? "Title: " + Alltrim( aArray["Title"] ) + CRLF + ; "Type: " + Alltrim( aArray["Type"] ) + CRLF + ; "Year: " + Alltrim( aArray["Year"] ) + CRLF + ; "Released: " + Alltrim( aArray["Released"] ) + CRLF + ; "Runtime: " + Alltrim( aArray["Runtime"] ) + CRLF + ; "Production: " + Alltrim( aArray["Production"] ) + CRLF + ; "Director: " + Alltrim( aArray["Director"] ) + CRLF + ; "Poster: " + Alltrim( aArray["Poster"] ) + CRLF + ; "Plot: " + Alltrim( aArray["Plot"] ) + CRLF + ; "Language: " + Alltrim( aArray["Language"] ) + CRLF + ; "Country: " + Alltrim( aArray["Country"] ) + CRLF + ; "Actors: " + Alltrim( aArray["Actors"] ) + CRLF + ; "Awards: " + Alltrim( aArray["Awards"] ) + CRLF + ; "Genre: " + Alltrim( aArray["Genre"] ) + CRLF + ; "Writer: " + Alltrim( aArray["Writer"] ) Dowlfile( Alltrim( aArray["Poster"] ), "F:\" + Alltrim( aArray["Title"] ) + "." + Right( Alltrim(aArray["Poster"] ),3 ) ) xBrowse(aArray) RETURN nil FUNCTION Dowlfile( cLink, cDest ) LOCAL oXMLHTTP, oADODBStream, lOk := .F. oXMLHTTP := Createobject( "Microsoft.XMLHTTP" ) oADODBStream := Createobject( "Adodb.Stream" ) oXMLHTTP:Open( "GET", cLink, .F. ) oXMLHTTP:Send() IF oXMLHTTP:Status() == 200 oADODBStream:Type := 1 oADODBStream:Open() oADODBStream:Write( oXMLHTTP:ResponseBody ) oADODBStream:Savetofile( cDest, 2 ) // ? cDest // Baixou uma imagem JPG em F:\ correto isso? Msginfo( "Download ok", "Aviso" ) // diz q sim, mas nekas... lOk := .T. ELSE Msgalert( "erro download", "Aviso" ) lOk := .F. ENDIF RETURN lOk ????????????????? Abs Quote Link to comment Share on other sites More sharing options...
kapiaba Posted January 20, 2021 Report Share Posted January 20, 2021 Depois morre... propaganda enganosa do kraliyouuussss.... kkkkkkkkkkkkkkkkkkkkkkkk, valeu, eu prefiro o xvideos... kkkkkkkk. Abs. Quote Link to comment Share on other sites More sharing options...
Jorge Andrade Posted January 29, 2021 Report Share Posted January 29, 2021 Em 20/01/2021 at 15:27, kapiaba disse: Depois morre... propaganda enganosa do kraliyouuussss.... kkkkkkkkkkkkkkkkkkkkkkkk, valeu, eu prefiro o xvideos... kkkkkkkk. Abs. Morrendo de rir aqui. ahahahaha, Pensou que ir passar o dia todo baixando e vendo a Rita Cadilac, Gretchen e o Pablo Vittar ahahahahahaha Quote Link to comment Share on other sites More sharing options...
Eric.Developer Posted January 29, 2021 Report Share Posted January 29, 2021 faltou um caracter, então responderá corretamente no browser.http://www.omdbapi.com/?t=Mr.+Sardonicus&apikey=777fbcc4& [],Contatos profissionais (e-mail e chat) Quote Link to comment Share on other sites More sharing options...
Leisye Posted October 9, 2021 Report Share Posted October 9, 2021 Tenho ficado frustrado ultimamente porque o netflix tem acesso ruim e pode não carregar. Meu amigo falou que a questão é ter um bom acesso a VPN, já imaginou? Ela me aconselhou a comprar vpn neste serviço Como assistir Netflix americana? e assistir netflix sem problemas. Eu leio o que não sou só eu. Provavelmente tentarei comprá-lo mesmo assim para continuar assistindo meus filmes favoritos. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.