Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Use selenium to grab the page source (so you get the real content after all the js/ajax stuff) and something like <a href="http://www.crummy.com/software/BeautifulSoup/" rel="nofollow">BeautifulSoup</a> to parse it.</p> <pre><code>from bs4 import BeautifulSoup soup = BeautifulSoup("""&lt;div class="general_table"&gt; &lt;div class="general_s"&gt; &lt;div class="general_text1"&gt;Name&lt;/div&gt; &lt;div class="general_text2"&gt;Abhishek&lt;/div&gt; &lt;/div&gt; &lt;div class="general_m"&gt; &lt;div class="general_text1"&gt;Last Name&lt;/div&gt; &lt;div class="general_text2"&gt;Kulkarni&lt;/div&gt; &lt;/div&gt; &lt;div class="general_s"&gt; &lt;div class="general_text1"&gt;Phone&lt;/div&gt; &lt;div class="general_text2"&gt; 13613123&lt;/div&gt; &lt;/div&gt; &lt;div class="general_m"&gt; &lt;div class="general_text1"&gt;Cell Phone&lt;/div&gt; &lt;div class="general_text2"&gt;82928091&lt;/div&gt; &lt;/div&gt; &lt;div class="general_s"&gt; &lt;div class="general_text1"&gt;City&lt;/div&gt; &lt;div class="general_text2"&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="general_m"&gt; &lt;div class="general_text1"&gt;Model&lt;/div&gt; &lt;div class="general_text2"&gt; DELL PERC H700&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;""") def tags(iterable): return filter(lambda x: not isinstance(x, basestring), iterable) for table in soup.find_all('div', {'class': 'general_table'}): for line in tags(table.contents): for i, column in enumerate(tags(line.contents)): if column.string: print column.string.strip(), if i: print ',', else: print ':', print '' </code></pre> <p>Result:</p> <pre><code>Name : Abhishek , Last Name : Kulkarni , Phone : 13613123 , Cell Phone : 82928091 , City : Model : DELL PERC H700 , </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload