Parsing an HTML file using selectorgadget.com

How can I use beautiful soup and selectorgadget to clean a website. For example, I have a website (newegg product) , and I would like my script to return all the specifications of this product (click "TECHNICAL SPECIFICATIONS"), I mean - Intel, Desktop, ......, 2.4GHz, 1066Mhz, ......, 3 years.

After using selectorgadget, I get the string .desc

How to use it?

Thanks:)

+3
source share
2 answers

, , div pcraSpecs:

<div id="pcraSpecs">
  <script type="text/javascript">...</script>
  <TABLE cellpadding="0" cellspacing="0" class="specification">
    <TR>
      <TD colspan="2" class="title">Model</TD>
    </TR>
    <TR>
      <TD class="name">Brand</TD>
      <TD class="desc"><script type="text/javascript">document.write(neg_specification_newline('Intel'));</script></TD>
    </TR>
    <TR>
      <TD class="name">Processors Type</TD>
      <TD class="desc"><script type="text/javascript">document.write(neg_specification_newline('Desktop'));</script></TD>    
    </TR>
    ...
  </TABLE>
</div>

desc - .

, .

soup.find(id="pcraSpecs").findAll("td") .

+1

Feedity - http://feedity.com RSS -.

0

Source: https://habr.com/ru/post/1703930/


All Articles