[PD] Using netclient to get weather data from weather.com

Martin Peach martinrp at vax2.concordia.ca
Tue Sep 6 16:26:17 CEST 2005

Rune Lain Knudsen wrote:

>I'm trying to get netclient to download an xml file from my subscription at weather.com but a strange thing happened. I try to send a fairly long GET message (containing a search string, a few parameters and ID+password), and it seems to work on a regular browser but not in PD. When I connect the message box containing the GET message to a print object it doesn't print the whole string in the console, it seems like there's a limit on either the message box(how many characters it can send) or the print object(in which case I'm probably chasing the wrong problem altogether). I've attached the test patch but the user ID and the password is false so if anyone tries it out they will probably get an error page sent back(but then at least the query works). I hope I'm explaining this clearly enough... Is there a workaround to this problem, or have I just done something wrong?
It seemed to me that using pd to parse xml is like using a screwdriver 
to hammer nails so I did it using awk, since awk is very simple and 
efficient at parsing and can also communicate via tcp/ip. Here I access 
a weather site and extract the relevant data in an awk script which it 
sends to a [netreceive] in pd whenever the pd patch requests it. I'm 
running awk in a Cygwin terminal in WinXP and pd 0.37.1.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pd_server_awk_tester.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20050906/f35a9cf0/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: get_weather.awk
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20050906/f35a9cf0/attachment.txt>

More information about the Pd-list mailing list