[PD] https get in Pd
danomatika at gmail.com
Wed May 22 16:46:13 CEST 2019
This is the kind of thing I'd do with a separate worker process. You could easily write a python script that listens on an OSC port and grabs a given URL and saves it to a file. It might be something like 10-20 lines of code scraped from myriad examples online. Then send an OSC message back to Pd with the file path or read the file and send a formatted OSC message with the data you want.
A tool like Python is great for this kind of use case as opposed to pure Pd. You can then write a simple shell script to launch the Pd patch and the Python script together to start the project.
> On May 22, 2019, at 4:23 PM, pd-list-request at lists.iem.at wrote:
> From: Nicolas Montgermont <list at nimon.org <mailto:list at nimon.org>>
> To: pd-list at mail.iem.at <mailto:pd-list at mail.iem.at>
> Subject: [PD] https get in Pd
> Message-ID: <050bca9a-a35f-d540-f87c-57b61f92712c at nimon.org <mailto:050bca9a-a35f-d540-f87c-57b61f92712c at nimon.org>>
> Content-Type: text/plain; charset=utf-8
> Hello everyone,
> What is the easiest way to get the content of a https webpage in pd,
> for example this one:
> https://tgftp.nws.noaa.gov/data/observations/metar/stations/CYDA.TXT <https://tgftp.nws.noaa.gov/data/observations/metar/stations/CYDA.TXT>
> Is there any patch that can do this around?
> It doesn't seem to work when using [httpget] wrapper based on
> [mrpeach/tcpclient] changed to connect on port 443 instead of 80:
> tcpclient: recv: Connection reset by peer (54)
> Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pd-list