Scrape featured image from second, NOT first, image

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.

Tagged: 

Viewing 3 reply threads
  • Author
    Posts
    • #7603


      AceTrainerK
      Participant
      Post count: 1

      Here is an example of an article that I am scraping content from: https://screenrant.com/american-born-chinese-ben-wang-sydney-taylor-interview/

      My issue is they watermark their thumbnails. The second image in any article is a suitable featured image, so I am trying to get Crawlomatic to use that instead, but I can’t figure out how.

      I tried turning off “auto featured image,” and input the class of that featured image under Featured Image Query String (img-article-item) with Featured Image Query Type set to “class.” Now it doesn’t use ANY image.

      What can I do? Thanks so much.

    • #7604


      Szabi – CodeRevolution
      Keymaster
      Post count: 4192

      Hello,

      First of all, thank you for your purchase.

      For this, an advanced Regex is needed, please use the settings from below:

       

      Featured Image Query Type
      Regex – First Match

      Featured Image Query String
      <div[^>]*?class=”responsive-img image-expandable img-article-item”[^>]*?data-img-url=”([^”]*?)”

       

      Regards, Szabi – CodeRevolution.

    • #7605


      AceTrainerK
      Participant
      Post count: 1

      Hi. Thank you so much for your quick reply.

      I just tried this and it still didn’t work. I did the suggested settings, with auto featured image both on and off. Neither worked. The plugin successfully gets all of the text and images within the article, but fails to make the featured image the first from the article.

      I attached a screenshot of my settings if that’s helpful.

      Thank you again. I sincerely appreciate your assistance.

       

      Attachments:
      You must be logged in to view attached files.
    • #7607


      Szabi – CodeRevolution
      Keymaster
      Post count: 4192

      Hello,

      Can you send me, please, temporary admin login credentials to your WordPress install, so I can check this on your site, as on my test site, this is working well.

      Send it, please, to my email address: [email protected]

      Regards, Szabi – CodeRevolution.

Viewing 3 reply threads

The topic ‘Scrape featured image from second, NOT first, image’ is closed to new replies.