Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from requests import get
- from bs4 import BeautifulSoup as Bs
- header = {
- 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0',
- 'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
- 'Accept-Encoding':'gzip, deflate, br',
- 'Accept-Language':'ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3'
- }
- soup = Bs(get('https://finance.yahoo.com/quote/AFLT.ME?p=AFLT.ME&.tsrc=fin-srch', headers = header).text, 'lxml')
- print(soup.find('span', {'data-reactid':'134'}).text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement