Skip to content

Instantly share code, notes, and snippets.

View allatambov's full-sized avatar

Alla Tambovtseva allatambov

View GitHub Profile
import requests
from bs4 import BeautifulSoup
page = requests.get("https://cash.rbc.ru/")
soup = BeautifulSoup(page.text)
divs = soup.find_all("div", {"class" : "quote__office__one js-one-office"})
d = divs[0]
link = d.find("a", {"class" : "quote__office__one__name"})
name = link.text
def get_info(my_link):
my_page = requests.get(my_link)
my_soup = BeautifulSoup(my_page.text)
author = my_soup.find("meta",
{"name" : "mediator_author"})["content"]
date = my_soup.find("meta",
{"itemprop" : "datePublished"})["content"]
title = my_soup.find("title").text
desc = my_soup.find("meta",
{"name" : "description"})["content"]
def get_info(my_link):
my_page = requests.get(my_link)
my_soup = BeautifulSoup(my_page.text)
author = my_soup.find("meta",
{"name" : "mediator_author"})["content"]
date = my_soup.find("meta",
{"itemprop" : "datePublished"})["content"]
title = my_soup.find("title").text
desc = my_soup.find("meta",
{"name" : "description"})["content"]
def get_info(my_link):
my_page = requests.get(my_link)
my_soup = BeautifulSoup(my_page.text)
author = my_soup.find("meta",
{"name" : "mediator_author"})["content"]
date = my_soup.find("meta",
{"itemprop" : "datePublished"})["content"]
title = my_soup.find("title").text
desc = my_soup.find("meta",
{"name" : "description"})["content"]
def get_info(my_link):
my_page = requests.get(my_link)
my_soup = BeautifulSoup(my_page.text)
author = my_soup.find("meta",
{"name" : "mediator_author"})["content"]
date = my_soup.find("meta",
{"itemprop" : "datePublished"})["content"]
title = my_soup.find("title").text
desc = my_soup.find("meta",
{"name" : "description"})["content"]
city = br.find_element_by_id("cCity")
city_inp = city.find_element_by_tag_name("input")
city_inp.send_keys("Москва")
br.implicitly_wait(1.5)
city_inp.send_keys(Keys.RETURN)
sex = br.find_element_by_id("cSex")
values = sex.find_elements_by_tag_name("div")
values
br = wd.Chrome("/Users/allat/Downloads/chromedriver")
br.get("https://vk.com/")
login = br.find_element_by_id("index_email")
login.send_keys("allatambov@mail.ru")
password = br.find_element_by_id("index_pass")
# enter your password here
password.send_keys("")
from selenium import webdriver as wd
br = wd.Chrome("/Users/allat/Desktop/chromedriver")
# br = wd.Chrome("C://Users/allat/Desktop/chromedriver.exe")
br.get("http://www.biblio-globus.ru/")
search = br.find_element_by_id("search_string")
search.clear()
search.send_keys("Python")
button = br.find_element_by_id("search_submit")
from selenium import webdriver as wd
# enter your path here
br = wd.Chrome("/Users/allat/Downloads/chromedriver")
br.get("https://vk.com/")
login = br.find_element_by_id("index_email")
login.send_keys("allatambov@mail.ru")
password = br.find_element_by_id("index_pass")