none
how can i regex this and have it download image depending on size. RRS feed

  • Question

  • ok i have code like this

    #34;, "createdAt": "2018-08-01T17:50:52.053061"}, {"uid": "67f4b55490574daca23a47342030ad1e", "width": 4096, "options": {"format": "R", "quality": 88}, "updatedAt": "2018-08-01T17:50:52.056717", "height": 4096, "size": 2749401, "url": "https://media.sketchfab.com/urls/ea1adc30399045a2b101e16ba65a856f/dist/textures/e95c39a154fe43e98ee0763d86242493/67f4b55490574daca23a47342030ad1e.jpeg&#34

    the size is 4096 x 4096 

    and i want to download all images to pc that match this size and 2048 x 2048

    but not sure how to accomplish this i know regex is the way think this can be done this is what i have currently

    (https://media.sketchfab.com)\/urls\/[a-zA-Z0-9]+\/dist\/textures\/[a-zA-Z0-9]+\/[a-zA-Z0-9]+.jpg
    and that does the link well not tested it in c# yet but it works on regex help site but trying to get it to download images due to size and not sure how to parse and download image to pc this way. 

    Saturday, May 18, 2019 9:48 AM

All replies

  • That's not code.  Is that supposed to be JSON?  Do you have a list of JSON records like that?  If so, then it's not clear that a regex is the right solution.  You want to select records where "width" and "height" == 4096, and then fetch the resource in the "url" parameter.  Is that it?

    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Sunday, May 19, 2019 5:18 AM