Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from bs4 import BeautifulSoup as BS
- #Прсинг инвестинга "Вся Россия" название акции и текущая (последняя) цена
- r = requests.get('https://ru.investing.com/equities/russia',
- headers = {'user-agent' : 'Chrome'})
- html = BS(r.text, 'html.parser')
- for el in html.find_all('div', attrs={"class": "buttonLine"}):#
- options = el.find_all('option')
- for option in options:
- print(option['id'], option.get('selected'), option.text)
Add Comment
Please, Sign In to add comment