[scilab-Users] recovering the text of a web page from internet
Adrien Vogt-Schilb
vogt at centre-cired.fr
Sun Mar 18 11:37:29 CET 2012
Hi
I don't understand.
I would download the text with wget to TMPDIR, then read with scilab (by
"open "myfile.txt", i wxas suggesting to do this from scilab). This
would use the harddrive as an intermediairy beetween wget and scilab.
Maybe you could use
unix_g
instead of unix. unix_g will capture the output of wget and return it to
scilab directly
I wish i could post an example, but i don't have wget installed in my PC
anymore
you may try something like:
a= unix_g("wget http://www.google.com/")
of course you still have to install wget, but that seems very reasonable
to me.
(just to be sure: unix and unix_g are scilab commands)
On 15/03/2012 21:24, Eric Dubois wrote:
> Thanks for your quick answer.
>
> However I am not sure that it answers exactly to my needs: what I am
> looking for is a way to do that FROM Scilab (that is with a Scilab
> command, encapsulated in a script or a function for instance) and if I
> have well understood what you suggest, your proposal is to go through
> a download as a text file on my computer.
>
> Eric.
>
>
> 2012/3/14 Adrien Vogt-Schilb <vogt at centre-cired.fr
> <mailto:vogt at centre-cired.fr>>
>
> On 14/03/2012 21:58, Eric Dubois wrote:
>> Hello
>>
>> Does anyone know how to recover the (text) content of a web page
>> from Scilab (as it is possible with function dowlaod.file in R
>> software)?
>>
>> Thanks for your answer!.
>>
>> Eric.
> hi
>
> if your machine runs on linux, you can use unix("wget -O
> myfile.txt http://www.url.com")
> and then open "myfile.txt"
>
> (you may want to deletefile("myfile.txt") once you are done)
>
> if you are using windows you can always install wget for windows
> (http://gnuwin32.sourceforge.net/packages/wget.htm) and use it the
> same way
>
> on mac i guess you can natively use wget too.
>
>
> hope this helps
>
> Adrien Vogt-Schilb
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20120318/830c6af1/attachment.htm>
More information about the users
mailing list