<commit_before>import os, sys
sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir))

import extract
from patterns import patterns, match_any_pattern
from submit import fill_form

def get_login_form(forms):
	login_patterns = ['login']
	for form in forms:
		if match_any_pattern(form['action'], login_patterns):
			return form
	return None

def login(forms, matched_patterns):
	login_form = get_login_form(forms)
	if login_form == None:
		return None

	matched_patterns, inputs, response, br = fill_form(login_form, matched_patterns)

	return login_form, br<commit_msg>add more patterns for login<commit_after>import os, sys
sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir))

import extract
from patterns import patterns, match_any_pattern
from submit import fill_form

def get_login_form(forms):
	login_patterns = ['login', 'signin', 'sign-in', 'sign_in']
	for form in forms:
		if match_any_pattern(form['action'], login_patterns):
			return form
		if match_any_pattern(form['url'], login_patterns):
			return form
	return None

def login(forms, matched_patterns):
	login_form = get_login_form(forms)
	if login_form == None:
		return None

	matched_patterns, inputs, response, br = fill_form(login_form, matched_patterns)

	return login_form, br
{'fraction_non_alphanumeric': 0.0987460815047022, 'fraction_numerical': 0.0, 'mean_word_length': 6.214689265536723, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2239749', 'n_tokens_mistral': 434, 'n_tokens_neox': 416, 'n_words': 111}