I forgot to reply to the list as well:
On 2011-09-20 15:25, Alvin Google wrote:
On 2011-09-20 14:58, Martin Peach wrote:
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
Thanks for your reply Martin. I am not sure how to go about this yet, but it sounds like one has to look through data line by line. Can you look for specific strings on a webpage like the contents of a specific table tag?
[mrpeach/tabfind] can be used to find a string in a table.
Maybe there is another way to approach this?
There are probably many ways to do it. They are all a bit tedious with Pd though. I attach a copy of a patch I use. Maybe it will help.
Martin