[PD] Targeting specific content with HttpGet
Martin Peach
martin.peach at sympatico.ca
Tue Sep 20 14:58:11 CEST 2011
On 2011-09-20 01:22, Alvin Google wrote:
> I have been interested in using streaming information in a pd patch. I
> have taken a look at the simplewebclient and httpget patches listed here
> in the thread, but I can not figure out how to target specific tables or
> div class information from a web page.
>
> I assume that you have to download the entire page.
> Can you parse for specific information : name of content and it's value?
>
Yes you get the whole content-length.
You can either operate on a list or a table. I prefer to load everything
into a large table and parse that.
I think pdlua would be ideal for parsing text, but so far I made my own
abstractions from Pd objects to extract numbers from particular
locations in lists. The problem with converting things to symbols is
that the symbol table can get filled with mostly junk symbols.
You can go line by line by scanning for 10, the ASCII line feed character.
Martin
More information about the Pd-list
mailing list