This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def extract_form_fields(self, soup): | |
"Turn a BeautifulSoup form in to a dict of fields and default values" | |
fields = {} | |
for input in soup.findAll('input'): | |
# ignore submit/image with no name attribute | |
if input['type'] in ('submit', 'image') and not input.has_key('name'): | |
continue | |
# single element nome/value fields | |
if input['type'] in ('text', 'hidden', 'password', 'submit', 'image'): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"kind": "discovery#restDescription", | |
"discoveryVersion": "v1", | |
"id": "drive:v2internal", | |
"name": "drive", | |
"version": "v2internal", | |
"revision": "20180702", | |
"title": "Drive API", | |
"description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.", | |
"ownerDomain": "google.com", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Drive Mime Types", | |
"types": [ | |
{".323": "text/h323"}, | |
{".3g2": "video/3gpp2"}, | |
{".3gp": "video/3gpp"}, | |
{".3gp2": "video/3gpp2"}, | |
{".3gpp": "video/3gpp"}, | |
{".7z": "application/x-7z-compressed"}, | |
{".aa": "audio/audible"}, |