soup = BeautifulSoup(html,"html.parser")
	var = soup.title.string
	print(var)
	print(type(var))Hello World! Site Title
<class 'bs4.element.NavigableString'>@eel.expose
def get_weather(place):
  observation = owm.weather_at_place(place)
  w = observation.get_weather()
  temp = w.get_temperature('celsius') ['temp']
  return "В городе " + place + " сейчас " + str(temp) + " градусов."<div class="info"></div> замените class на id, или в js ищите по названию класса.      header("Location: tel:787770099"); и в InlineKeyboardButton в параметр url передать ссылку на данный файл. Разумеется, web-сервер должен быть запущен.      <form>
        <input ip='location' class="enter" type="text" placeholder="Введите название города" value="москва">
    </form>mgr = owm.weather_maneger()script = soup.find('script',id='requirejs.config').string<script type="application/json" id="requirejs.config"></script>import json
from bs4 import BeautifulSoup
html = '''
<!DOCTYPE html>
  <body>
<script type="application/json" id="requirejs.config">
{
  "name": "John",
  "age": 30,
  "isAdmin": false,
  "courses": ["html", "css", "js"],
  "wife": null
}
  </script>
  </body>
</html>
'''
soup = BeautifulSoup(html,"html.parser")
script = soup.find('script',type="application/json")
my_json = str(script)[55:-12]
print(json.loads(my_json)['name'])John<script type="application/json" id="requirejs.config"></script>if трататататаможете предоставить оба примера.
для каких ситуаций используются оба варианта и от чего зависит их написание?Это написано в книгах по Python. Например, поищите "Марк Лутц - Изучаем Python".
def read (filename):
        base = open(filename, 'r')
        base_r = base.readlines()
        base.close()
        dict_r = {}
        tx=0
        while tx <len(base_r)  :
           base_re = base_r[tx]
           st1 = base_re.split (':')
           print ('st - ',st1)
           # print(str(st1[0]),str(st1[1][:-1]))
           dict_r [st1[0]] = str(st1[1])[:-1]
           tx+=1
        print('*'*20)
        print(dict_r)
read('1.txt')st -  ['hello', 'hello2\n']
st -  ['hello9', 'hello235345\n']
st -  ['hello8', 'hello275\n']
st -  ['hello7', 'hello2432\n']
st -  ['hello6', 'hello2873']
********************
{'hello': 'hello2', 'hello9': 'hello235345', 'hello8': 'hello275', 'hello7': 'hello2432', 'hello6': 'hello287'}