Extracting particular data with BeautifulSoup with span tags
<p>I have this structure.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="one" class="tab-pane active"&gt;
 &lt;div class="item-content"&gt;
     &lt;a href="/mobilni-uredjaji.4403.html"&gt;
         &lt;div class="item-primary"&gt;
                 &lt;div class="sticker-small"&gt;
                       &lt;span class=""&gt;&lt;/span&gt;
                  &lt;/div&gt;
                  &lt;div class="sticker-small-lte"&gt;
                      &lt;span class="lte"&gt;&lt;/span&gt;
                  &lt;/div&gt;

                 &lt;div class="item-photo"&gt;
                          &lt;img src="/upload/images/thumbs/devices/SAMG935F/SAMG935F_image001_220x230.png" alt="Samsung Galaxy S7 edge"&gt;
                 &lt;/div&gt;


                &lt;div class="item-labels"&gt;
                   &lt;span class="item-manufacturer"&gt;Samsung&lt;/span&gt;
                   &lt;span class="item-title"&gt;Galaxy S7 edge&lt;/span&gt;
                &lt;/div&gt;
      &lt;/div&gt;

       &lt;div class="item-secondary"&gt;
                &lt;span class="item-price"&gt;94.000&lt;span class="currency"&gt;currency!&lt;/span&gt;&lt;/span&gt;
                &lt;span class="item-package"&gt; uz! Sigurica 1500&lt;/span&gt;
                &lt;span class="item-installments"&gt;na! 24 rate_po!&lt;/span&gt;
                &lt;span class="value"&gt;100 currency!&lt;/span&gt;
               &lt;span class="item-available"&gt;device_is_available_on_webshop_list!&lt;/span&gt;
      &lt;/div&gt;

    &lt;/a&gt;
 &lt;/div&gt;
 &lt;div class="item-content"&gt;
     &lt;a href="/mobilni-uredjaji.4403.html"&gt;
         &lt;div class="item-primary"&gt;
                 &lt;div class="sticker-small"&gt;
                       &lt;span class=""&gt;&lt;/span&gt;
                  &lt;/div&gt;
                  &lt;div class="sticker-small-lte"&gt;
                      &lt;span class="lte"&gt;&lt;/span&gt;
                  &lt;/div&gt;

                 &lt;div class="item-photo"&gt;
                          &lt;img src="/upload/images/thumbs/devices/SAMG935F/SAMG935F_image001_220x230.png" alt="Samsung Galaxy S7 edge"&gt;
                 &lt;/div&gt;


                &lt;div class="item-labels"&gt;
                   &lt;span class="item-manufacturer"&gt;Samsung&lt;/span&gt;
                   &lt;span class="item-title"&gt;Galaxy S7 edge&lt;/span&gt;
                &lt;/div&gt;
      &lt;/div&gt;

       &lt;div class="item-secondary"&gt;
                &lt;span class="item-price"&gt;94.000&lt;span class="currency"&gt;currency!&lt;/span&gt;&lt;/span&gt;
                &lt;span class="item-package"&gt; uz! Sigurica 1500&lt;/span&gt;
                &lt;span class="item-installments"&gt;na! 24 rate_po!&lt;/span&gt;
                &lt;span class="value"&gt;100 currency!&lt;/span&gt;
               &lt;span class="item-available"&gt;device_is_available_on_webshop_list!&lt;/span&gt;
      &lt;/div&gt;

    &lt;/a&gt;
 &lt;/div&gt;
 
 -----same structure ----
 
&lt;/div&gt; </code></pre>
</div>
</div>
</p>

<p>My target is div with class="item-labels" with corresponding data:</p>

<ul>
<li>Samsung</li>
<li>Galaxy S7 edge</li>
</ul>

<p>and div with class "item-secondary" with data under the span tag with class="item-price", 94.000.</p>

<p>I need my output to be exactly:</p>

<ul>
<li>Samsung</li>
<li>Galaxy S7 edge</li>
<li>94000</li>
</ul>

<p>So far with this code i am getting first two data without price under the span. I am kinda stuck here because i haven't done scraping quite a while.
Please hint?
Code is: </p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>from bs4 import BeautifulSoup
import re
import pymysql
import MySQLdb
import urllib

#rl = "http://www.vipmobile.rs/mobilni-uredjaji.2631.html#tarifgroup-1|devicetype-1|minprice-0|maxprice-124800|brand-0|model-0"
url = "file:///C:/Users/zika/Desktop/one.html"



html = urllib.urlopen(url)
page = html.read()
#print(page)
# db = MySQLdb.connect(host = 'localhost',
                     # user = 'root',
                     # passwd = '123456',
                     # db = 'lyrics')
soup = BeautifulSoup(page, 'html.parser')

#mobData = soup.find("div", {"class": "bxslider items"}).find_all("div", {"class": "item-content"})
#for mobMan in soup.find("div", {"class": "tab-pane active"}).findAll("span")

labelData =  soup.find("div", {"class": "tab-pane active"}).find_all("div", {"class": "item-content"})
labelPrice = soup.find("div", {"class": "tab-pane active"}).find_all("span", class_="item-price")

 
for label in labelData:
print(label.contents[1].find("div", {"class": "item-labels"}).getText())
	
for price in labelPrice:
    print(price.getText())


	
	
	


 
    	

    






		
		
		

input("\n\nPress the enter key to exit!")		</code></pre>
</div>
</div>
</p>

<p>You could try that:</p>

<pre><code>from bs4 import BeautifulSoup

soup = BeautifulSoup(source, "html.parser")
div1 = soup.find("div", { "class" : "item-labels" }).findAll('span', { "class" : "item-manufacturer" })
div2 = soup.find("div", { "class" : "item-labels" }).findAll('span', { "class" : "item-title" })
div3 = soup.find("div", { "class" : "item-secondary" }).findAll('span', { "class" : "item-price" })
for i,j,k in zip(div1,div2,div3):
    print i.text
    print j.text
    print k.text.replace("currency!",'')
</code></pre>

<p>Note: as <code>source</code> in the above code I used the structure you provided in your post.</p>

<p>This will give the following output:</p>

<pre><code>Samsung
Galaxy S7 edge
94.000
</code></pre>

python html web-scraping beautifulsoup