3
I’m trying to create a virtual intelligence system, and hosted the language files on my FTP. These files are from a language I made myself, called SVDB, and hosted on FTP, and when I download in the application the text file it comes with HTML. This is the original file (hosted on FTP):
default {
wrong: "Desculpe, não entendi";
language-name: "Português Brasileiro";
language-code: "PT-BR";
version: "1.0";
}
replace-strings {
R0001: "vc|você";
R0002: "td|tudo";
}
K00001 {
input: "olá|ola|oi|eae";
output: "Olá!";
action-id: "";
}
K00002 {
input: "tudo bem?|você está bem?";
output: "Estou bem, obrigado por perguntar.";
action-id: "";
}
And that’s what the WebClient.DownloadString()
low:
It downloads a code totally nothing to do with what I want, and the SVDB parser of the error. That’s the address where the file is hosted:
http://server-advenker32.66ghz.com/Panthon/Server/Langs/pt-br/input.txt
And that’s the code I’m using to download the file:
Public Function GetLanguageServer(ByVal LangCode As String) As MainServer
Dim v As New WebClient
Dim s As String = v.DownloadString("http://server-advenker32.66ghz.com/Panthon/Server/Langs/" & LangCode.ToLower & "/input.txt")
Return TextParser.ResolveServerFromString(s) ' o Parser tenta entender o que foi baixado aqui
End Function
So how do I download the file from a formatting like the original shown above?
Note: The permissions of the hosted file are with code 744 (Public read permissions)
Note: The file is hosted on my uHostAll company FTP.
Note: While trying to access the file by browser, it appears correctly and without any problem.
So, how do I emulate this? I was thinking about being able to select the text of the component
WebBrowser
and copy, because in it appears right, but do not know how could do it, and the worst is that the propertyDocumentText
returns nothing...– CypherPotato
What API are you talking about, the SVDB?
– CypherPotato
There is something in the middle of the file serving this "content filter". There is no way to do a direct access? Your file is being served by something intermediate. A normal hosting does not do this.
– Bacco
Well, a hosting that puts a JS halfway to me is far from appropriate. Or there’s something you don’t want to comment on, or you’re misusing some resource of hers that has the face of gambiarra :) - If the problem is to circumvent this hosting, the question would be another. As it stands, the problem is the hosting, not your code and not your API.
– Bacco
Oh yes, I understood, so I managed to circumvent my own hosting with this answer I just made >:)
– CypherPotato