Skip to content

Instantly share code, notes, and snippets.

Created March 3, 2021 16:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
from selenium import webdriver
browser = webdriver.Firefox()
title = browser.find_element_by_css_selector('h1').text
questions = browser.find_elements_by_css_selector('.question-summary')
for question in questions:
question_title = question.find_element_by_css_selector('.summary h3 a').text
question_excerpt = question.find_element_by_css_selector('.summary .excerpt').text
question_vote = question.find_element_by_css_selector('.stats .vote .votes .vote-countpost').text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment