BeautifulSoup: get some tag from the page
<p>I have html-code</p>

<pre><code>&lt;div class="b-media-cont b-media-cont_relative" data-triggers-container="true"&gt;&lt;span class="label"&gt;ÐÐ²Ð¸Ð³Ð°ÑÐµÐ»Ñ:&lt;/span&gt; Ð±ÐµÐ½Ð·Ð¸Ð½, 1.6 Ð»&lt;br/&gt;
&lt;div class="b-triggers b-triggers_theme_dashed-buttons b-triggers_size_s b-triggers_text-notif"&gt;&lt;div class="b-triggers__text"&gt;110 Ð».Ñ.&lt;/div&gt;&lt;div class="b-triggers__item b-triggers__item_notif" data-target="cost" data-target-container="[data-triggers-container]" data-toggle="tax_dropdown"&gt;&lt;div class="b-link b-link_dashed"&gt;110 Ð».Ñ.&lt;/div&gt;&lt;/div&gt;&lt;div class="b-triggers-hidden-area b-triggers-hidden-area_width_240 b-triggers-hidden-area_close" data-target-bind="cost" style="left: 0px; top: 39px; width: 241px;"&gt;ÐÐ°Ð»Ð¾Ð³ Ð½Ð°&amp;nbsp;2016&amp;nbsp;Ð³Ð¾Ð´ &lt;b&gt;2&amp;nbsp;750&amp;nbsp;ÑÑÐ±.&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;&lt;span class="gray"&gt;Ð Ð°ÑÑÐµÑ Ð¿ÑÐ¾Ð¸Ð·Ð²ÐµÐ´ÐµÐ½ Ð½Ð° Ð»ÐµÐ³ÐºÐ¾Ð²Ð¾Ð¹ Ð°Ð²ÑÐ¾Ð¼Ð¾Ð±Ð¸Ð»Ñ Ð¿Ð¾ &lt;a href="http://law.drom.ru/calc/region77/skoda/rapid/2016/110/"&gt;ÐºÐ°Ð»ÑÐºÑÐ»ÑÑÐ¾ÑÑ ÑÑÐ°Ð½ÑÐ¿Ð¾ÑÑÐ½Ð¾Ð³Ð¾ Ð½Ð°Ð»Ð¾Ð³Ð°&lt;/a&gt; Ð´Ð»Ñ ÐÐ¾ÑÐºÐ²Ñ (&lt;a href="http://www.drom.ru/my_region/"&gt;Ð¸Ð·Ð¼ÐµÐ½Ð¸ÑÑ ÑÐµÐ³Ð¸Ð¾Ð½&lt;/a&gt;).&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br/&gt;
&lt;span class="label"&gt;Ð¢Ð¸Ð¿ ÐºÑÐ·Ð¾Ð²Ð°:&lt;/span&gt; ÑÑÑÑÐ±ÐµÐº&lt;br/&gt;
&lt;span class="label"&gt;Ð¦Ð²ÐµÑ:&lt;/span&gt; Ð·Ð¾Ð»Ð¾ÑÐ¸ÑÑÑÐ¹&lt;br/&gt;
&lt;span class="label"&gt;ÐÑÐ¾Ð±ÐµÐ³:&lt;/span&gt; &lt;b&gt;ÐÐ¾Ð²ÑÐ¹ Ð°Ð²ÑÐ¾Ð¼Ð¾Ð±Ð¸Ð»Ñ Ð¾Ñ Ð¾ÑÐ¸ÑÐ¸Ð°Ð»ÑÐ½Ð¾Ð³Ð¾ Ð´Ð¸Ð»ÐµÑÐ°&lt;/b&gt;&lt;br/&gt;
&lt;span class="label"&gt;Ð ÑÐ»Ñ:&lt;/span&gt; Ð»ÐµÐ²ÑÐ¹&lt;br/&gt;
&lt;span class="label"&gt;VIN:&lt;/span&gt; XW8AC1NH7HK****32&lt;br/&gt;
&lt;/div&gt;&lt;p&gt;&lt;span class="label"&gt;ÐÐ°Ð½Ð½ÑÐµ Ð¿Ð¾ Ð¼Ð¾Ð´ÐµÐ»Ð¸ Ð¸Ð· ÐºÐ°ÑÐ°Ð»Ð¾Ð³Ð°:&lt;/span&gt; 
&lt;b&gt;ÑÐ¾Ð»ÑÐ½&lt;/b&gt;
&lt;b&gt;4Â 515Â ÑÑÐ±.&lt;/b&gt;
&lt;b&gt;ÐÑÐ¾Ð´Ð°Ð¶Ð° Ð¢Ð¾Ð¹Ð¾ÑÐ° ÐÐ²ÐµÐ½ÑÐ¸Ñ.&lt;/b&gt;
</code></pre>

<p>And I need to get </p>

<pre><code>&lt;b&gt;ÐÐ¾Ð²ÑÐ¹ Ð°Ð²ÑÐ¾Ð¼Ð¾Ð±Ð¸Ð»Ñ Ð¾Ñ Ð¾ÑÐ¸ÑÐ¸Ð°Ð»ÑÐ½Ð¾Ð³Ð¾ Ð´Ð¸Ð»ÐµÑÐ°&lt;/b&gt;
</code></pre>

<p>I try </p>

<pre><code>mileages = soup.find_all('span', class_='label').next_subling
</code></pre>

<p>But it returns <code>AttributeError: 'ResultSet' object has no attribute 'next_subling'</code>
How can I fix that?</p>

<p>Try this code:</p>

<pre><code>b = None
spans = soup.find_all("span", {"class":"label"})
for span in spans:
    b = span.find("b")
    if b is not None:
        break
</code></pre>

<p>Then you can get access to text of "b" using:</p>

<pre><code>b.text
</code></pre>

python html beautifulsoup