Unable to scrape image gallery

This topic is: resolved

 

Thank you for contacting me. Please note that I live in the GMT+3 time zone - responses might be delayed by this.

This topic has 3 replies, 2 voices, and was last updated 4 hours, 54 minutes ago by Szabi – CodeRevolution.

Viewing 3 reply threads
  • Author
    Posts
    • #11748


      Blob
      Participant
      Post count: 4

      Hi Szabi,

      I hope you are fine.

      I’m trying to scrape the image gallery on this site.
      But I can’t. I’ve succeeded with all the other sites (12) at the moment, but this one is impossible.
      The html structure is quite complex, which would explain the current impossibility.

      -https://robe-avenue.com/products/robe-midi-moulante-soiree-chic

      Can you help me? Is there a technical solution?

      Thank you
      Regards,
      Blob

    • #11751


      Szabi – CodeRevolution
      Keymaster
      Post count: 4719

      Hello,

      First of all, thank you for your purchase.

      Please use the following config in the plugin to scrape product galleries from this site:

      Product Gallery Query Type
      Regex – All Matches

      Product Gallery Query String
      #data-gallery-thumb=”[\s\n]*([^\s\n]*?)[\s\n]*”#

      Regards,
      Szabi – CodeRevolution.

    • #11757


      Blob
      Participant
      Post count: 4

      Hello,

      You’ve taught me that attributes are considered an id, meaning that to search for them you have to start with the “#” character. That’s going to be a great help.

      I had finally found via chatgpt a regex that also works, but still required a bit of work :
      <a[^>]*data-fancybox=[“‘][^”’]*product-gallery-9768587166039[^“’]*[”’][^>]*>\s*<picture[^>]*>\s*<img[^>]*src=[“‘]([^”’]+)[“’]

      Yours is much simpler and to the point 😉
      I’ve combined it with a regex to retrieve large images instead of thumbs : \?[^?]*
      And bim, I’ve got everything I need 😉

      Thank you very much!

    • #11759


      Szabi – CodeRevolution
      Keymaster
      Post count: 4719

      I am glad to help!

Viewing 3 reply threads

You must be logged in to reply to this topic.