[PD] Help parsing HTML with [httpget]

Philip Cunningham pcunningham.uk at googlemail.com
Sat Mar 5 19:50:14 CET 2011


Hello all,

Strangely I cannot replicate the problems I'm having in Ubuntu
Maverick on Windows Vista. Martin Peach also says that he is able to
parse information without any errors on XP. This leads me to believe
that the problem doesn't lie with my patch but elsewhere. A bit
stumped on this one for sure as I would much rather run this on
Ubuntu.

Best,
Philip

On Sat, Mar 5, 2011 at 6:15 PM, Martin Peach <martin.peach at sympatico.ca> wrote:
> Yes I'm using 0.42.5 extended on WinXP at the moment.
> You could try a [dump 1{ message to the [tcpclient] inside [httpget] to get
> it to print everything, maybe you're getting partial packets or something.
> Otherwise I would strip the patch down to isolate the problem, i.e. which
> [unpack] is causing the trouble.
>
> Martin
>
>
>
> On 2011-03-05 12:53, Philip Cunningham wrote:
>>
>> Martin,
>>
>> I get unpack type errors but can't seem to figure out why they're
>> sometimes happening and sometimes not. I'm using 0.42.5 extended. Is
>> there perhaps a newer version of objects that you might be using? Hm,
>> I'm stumped.
>>
>> Philip
>> PS - Thanks for writing so many awesome externals!
>>
>> On Sat, Mar 5, 2011 at 5:41 PM, Martin Peach<martin.peach at sympatico.ca>
>>  wrote:
>>>
>>> No errors at all unless I click really fast and get:
>>>
>>> error: tcpclient_connect: already connected to weather.elec.york.ac.uk:80
>>> on
>>> socket 1848
>>>
>>> Martin
>>>
>>> On 2011-03-05 12:14, Philip Cunningham wrote:
>>>>
>>>> Martin,
>>>>
>>>> Are you getting any errors at all? I get an error ever few attempts to
>>>> retrieve the data. Hmm. I will also look into these new http objects.
>>>>
>>>> Philip
>>>>
>>>> On Sat, Mar 5, 2011 at 5:03 PM, Martin Peach<martin.peach at sympatico.ca>
>>>>  wrote:
>>>>>
>>>>> It works fine for me.
>>>>> I recently added [httpreq] and [httpreceive] to the mrpeach stuff in
>>>>> svn,
>>>>> they make it easier to do http stuff. [httpreceive] outputs the status
>>>>> on
>>>>> a
>>>>> separate outlet so you could scan for the "expires" keyword to know
>>>>> when
>>>>> to
>>>>> make another request.
>>>>>
>>>>> Martin
>>>>>
>>>>> On 2011-03-05 04:34, Philip Cunningham wrote:
>>>>>>
>>>>>> Hello all,
>>>>>>
>>>>>> I was working on a patch that visualises and sonifies weather data
>>>>>> posted online in an HTML document. I was using [httpget] to grab the
>>>>>> document and using [listsplit] and [symbol2list] to parse the
>>>>>> necessary data. However, using this method, I will often get the error
>>>>>> "error: unpack: type mismatch". I was wondering if someone could look
>>>>>> at the patch and advise me of a cleaner way of doing this or showing
>>>>>> me what I might be doing wrong? It works 70% the time. Initially, I
>>>>>> was just increasing the frequency of the [httpget] to ensure that the
>>>>>> data changes are captured but this method isn't very clean and would
>>>>>> appreciate any corrections or feedback.
>>>>>>
>>>>>> Patch: http://uiu.me/6.pd
>>>>>> This Weather: http://vimeo.com/16472933
>>>>>> [httpget]: http://puredata.info/docs/tutorials/SimpleWebclient
>>>>>>
>>>>>> Best wishes,
>>>>>> Philip Cunningham
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Pd-list at iem.at mailing list
>>>>>> UNSUBSCRIBE and account-management ->
>>>>>>  http://lists.puredata.info/listinfo/pd-list
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>



-- 
Portfolio: http://philipcunningham.org
BrightonPD: http://unsymbol.users.anapnea.net/brightonpd/
Chipmusic: http://firebrandboy.org



More information about the Pd-list mailing list