<commit_before>require 'mechanize'
require 'logger'

module BankScrap
  class Bank

    WEB_USER_AGENT = 'Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 4 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19'
    attr_accessor :headers, :accounts

    private

    def get(url)
      @http.get(url).body
    end

    def post(url, fields)
      @http.post(url, fields, @headers).body
    end<commit_msg>Defined fetch_accounts method for Bank<commit_after>require 'mechanize'
require 'logger'

module BankScrap
  class Bank

    WEB_USER_AGENT = 'Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 4 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19'
    attr_accessor :headers, :accounts

    def initialize(user, password, log: false, debug: false, extra_args: nil)
      @accounts = fetch_accounts
    end

    # Interface method placeholders
    
    def fetch_accounts
      raise Exception.new "#{self.class} should implement a fetch_account method"
    end

    private

    def get(url)
      @http.get(url).body
    end

    def post(url, fields)
      @http.post(url, fields, @headers).body
    end
{'fraction_non_alphanumeric': 0.10486577181208054, 'fraction_numerical': 0.04697986577181208, 'mean_word_length': 3.230496453900709, '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': '199661', 'n_tokens_mistral': 461, 'n_tokens_neox': 411, 'n_words': 107}