from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from bs4 import BeautifulSoup
def parse_content(html_doc):
soup = BeautifulSoup(html_doc, 'html.parser')
print (soup.title.text)
driver = webdriver.Chrome()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
html_doc = driver.page_source
driver.close()
parse_content(html_doc)
Code Example |
---|
Html :: ckeditor 5 example codepen |
Html :: twig array keys and values |
Html :: how to download file html button |
Html :: how to convert html to text in angular |
Html :: html video fallback |
Html :: print view fields in unformatted.html.twig drupal |
Html :: path in html |
Html :: mvc pass model to partial view |
Html :: html definition list |
Html :: px in react |
Html :: html how to play gifs |
Html :: html chart |
Html :: youtube downloader api |
Html :: html select color |
Html :: bootrsrap |
Html :: how to import jquery modular |
Html :: github see commits by user |
Html :: how to add bg html |
Html :: modal pop up html css |
Html :: subscript html |
Html :: html button with href |
Html :: make text bold with html |
Html :: lazy load |
Html :: react select, option |
Html :: vue 3 emits |
Html :: html <nav element |
Html :: html button |
Html :: bulma css lighter buttons |
Html :: align items in li |
Html :: html <mark |