title: Cannot press button
body: <p>I'm trying to code a bot for a game, and need some help to do it. Being a complete noob, I googled how to do it with python and started reading a bit about mechanize.</p>
  
  <pre><code>&lt;div class="clearfix"&gt;
                      &lt;a href="#" onclick="return Index.submit_login('server_br73');"&gt;
              &lt;span class="world_button_active"&gt;Mundo 73&lt;/span&gt;
          &lt;/a&gt;
                      &lt;/div&gt;
  </code></pre>
  
  <p>My problem is in logging in, where i have this raw code for now:</p>
  
  <pre><code>import requests
  import requesocks
  import xlrd
  import socks
  import socket
  import mechanize
  import selenium
  from bs4 import BeautifulSoup
  
  # EXCEL
  file_location = "/home/luis/Dropbox/Projetos/TW/multisbr.xlsx"
  wb = xlrd.open_workbook(file_location)
  sheetname = wb.sheet_names ()
  sh1 = wb.sheet_by_index(0)
  
  def nickNm():
      lista = [sh1.col_values(0, x) for x in range (sh1.ncols)]
      listaNomes = lista [1]
      x &lt; 1
      print listaNomes
  def passwd():
      lista = [sh1.col_values(1, x) for x in range (sh1.ncols)]
      listaPasswd = lista [1]
      x &lt; 1
      print listaPasswd
  
  # TOR
  
  def create_connection(address, timeout=None, source_address=None):
      sock = socks.socksocket()
      sock.connect(address)
      return sock
  
  socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050)
  
  # patch the socket module
  socket.socket = socks.socksocket
  socket.create_connection = create_connection
  
  #BeautifulSoup
  
  def get_source ():
      url = 'https://www.tribalwars.com.br'
      source_code = requests.get(url)
      plain_text = source_code.text
      soup = BeautifulSoup(plain_text, 'lxml')
  
  # ALFA
  br = mechanize.Browser ()
  twbr = 'https://www.tribalwars.com.br/index.php'
  
  def alfa ():
      br.open(link)
  
      br.select_form(nr=0)
      br["user"] = "something"
      br["password"] = "pword"
  
      result = br.submit()
  
      br.geturl()
  
  
  nickNm()
  passwd()
  alfa()
  </code></pre>