C
C
CODER5412018-06-21 10:09:16
JavaScript
CODER541, 2018-06-21 10:09:16

How to get the content of the "id" field in using jqery?

So I want to parse Two.h
and get the number of the Webm thread
And actually this number is here in the id
field how to sort the blockquote I know (where If )
In parallel with this, it tells me that .getElementById()there is no function . What to do?
And here's how to get the id of the found blockquote ?

<blockquote id="m178043663" class="post-message">
                        УНИЖЕНИЯ ТРЕД<strong> WEBM&#47;MP4</strong>
                        
                    </blockquote>

request('https://2ch.hk/b/',(error,response,body)=>{
  const $ = cheerio.load(body)
  const threadfind = $('blockquote').text()


  
  if(threadfind && threadfind.includes('WEBM'))
  { // thread find blockquote 

     const threadid= threadfind.getElementById()
      
     console.log(threadid)
  }
})

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
iBird Rose, 2018-06-21
@CODER541

$('blockquote').attr('id');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question