Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

122
Views
How to get element with tag name '<ht:picture_source>' using JQuery?

I trying to scrape google trends using this RSS feed link

However I couldn't able to get the element with tag name <ht:picture_source>..</ht:picture_source>.

I tried the below code :

$(".trigger").on("click",function() {
    $.ajax({
         url: "https://trends.google.co.in/trends/trendingsearches/daily/rss?geo=US",
         dataType: 'text',
         success: function(data) {

              let post_count = $(data).find('title').length;

              for(let counter = 1; counter < post_count; counter++) {
                  let image = $(data).find('ht:picture').eq(counter).text();
                  console.log(image);
              }
    
          
         }
    });
});

I get undefined or empty on the console.

Someone already checked this up on GigHub 2 years ago.

Any help is greatly appreciated.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Special characters like : need to be escaped in jQuery selectors.

let image = $('body').find('ht\\:picture_source').eq(0).text();
console.log(image);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<ht:picture_source>Text</ht:picture_source>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!