Forums > Jitter

Pulling an image from a website

June 7, 2010 | 12:47 pm

Hi all,

I’d like to create a patch that gets the picture of the day from Wikipedia: I know that the general format of the url is

I’m not familiar with the scripting necessary to fill in the rest of the details. First, I’d like Max to get ‘today’s date,’ which I’m not sure how to do. Then I would stick the date in yyyy-mm-dd format on the end of the url message, which is not difficult. However, this leads to the page itself, and not the specific image. Is there a way to direct Max to the .jpg featured on the page without knowing its exact url location?

Any suggestions are appreciated.

June 7, 2010 | 2:19 pm

How much have you tried yourself?

For the current date, there is the [date] object (as searching in the Max help told me in 2 minutes).

For crawling websites, there is jit.uldl (as searching on this forum told me in 4 minutes:

But you will need a bit of intelligent parsing of the page contents to find out what the picture is called.

June 7, 2010 | 5:55 pm

jit.uldl helpfile, in the subpatch. But you could probably do it with [regexp]. Here’s today’s file (and is a cool pic too)

so… use [regexp] to find
then take the whole URL and load that page, or use jit.uldl to grab the .jpg.

June 7, 2010 | 6:34 pm

Thanks guys… Will get started on this right away!

Viewing 4 posts - 1 through 4 (of 4 total)

Forums > Jitter