Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Python - get all input fields of a login page
from bs4 import BeautifulSoup
import requests
r = requests.get("")
soup = BeautifulSoup(r.content, 'html.parser')
data = {inputfield.attrs['name']: inputfield.attrs['value'] for inputfield in soup.find_all("input")}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment