print(dict1.get('365flamingo'))
#dict1["365flamingo"] = int(dict1.get('365flamingo')) + 1
dict1["365flamingo"] = 1
print(dict1.get('365flamingo'))
dict1["365flamingo"] = int(dict1.get('365flamingo')) + 1
print(dict1.get('365flamingo'))
# -*- coding: utf-8 -*-
import win32com.client as win32
import os
excel = win32.Dispatch("Excel.Application")
workbook = excel.Workbooks.Add()
print('test')
print(os.path.dirname(__file__))
new_file_path = os.path.dirname(__file__) + "/UpdatedSheet.xls"
print(new_file_path)
CURR_DIR = os.path.dirname(os.path.realpath(__file__)) + "/UpdatedSheet.xls"
print(CURR_DIR)
#workbook.SaveAs("D:\\Мои документы\\PyCharm\\Project_1\\Excel\\UpdatedSheet.xls")
workbook.SaveAs(CURR_DIR)
workbook.close
from bs4 import BeautifulSoup
soup = BeautifulSoup("""
<ul class="k59kT">
<li class="gElp9 " role="menuitem">
<div class="P9YgZ">
<div class="C7I1f X7jCj">
<div class="C4VMK">
<h3 class="_6lAjh">
</spoiler> <a class="FPmhX notranslate TlrDj" title="ХОЗЯИН_ТЕКСТА_ОДИН" href="/ХОЗЯИН_ТЕКСТА_ОДИН/">ХОЗЯИН_ТЕКСТА_ОДИН</a>
</h3>
<span>НУЖНЫЙ_ТЕКСТ1</span>
</div>
</div>
</div>
</li>
<li class="gElp9 " role="menuitem">
<div class="P9YgZ">
<div class="C7I1f X7jCj">
<div class="C4VMK">
<h3 class="_6lAjh">
<a class="FPmhX notranslate TlrDj" title="ХОЗЯИН_ТЕКСТА_ДВА" href="/ХОЗЯИН_ТЕКСТА_ДВА/">ХОЗЯИН_ТЕКСТА_ДВА</a>
</h3>
<span>НУЖНЫЙ_ТЕКСТ2</span>
</div>
</div>
</div>
</li>
<li class="gElp9 " role="menuitem">
<div class="P9YgZ">
<div class="C7I1f X7jCj">
<div class="C4VMK">
<h3 class="_6lAjh">
<a class="FPmhX notranslate TlrDj" title="ХОЗЯИН_ТЕКСТА_ТРИ" href="/ХОЗЯИН_ТЕКСТА_ТРИ/">ХОЗЯИН_ТЕКСТА_ТРИ</a>
</h3>
<span>НУЖНЫЙ_ТЕКСТ3</span>
</div>
</div>
</div>
</li>
</ul>
""", "html.parser")
span_data = soup.find_all("div", {"class": "C4VMK"})
for x in span_data:
span_text = x.find("span")
name_text = x.find("a")
# print(x.text)
print(name_text.text)
print(span_text.text)