"no control matching name" in mechanize for python
Question: I am using mechanize for python and I am trying to search for an item in
kijiji. Eventually my goal is for my program to search for an item, and using
beautifulsoup, check whether or not someone has posted a new ad for my search
term by scraping through the html source that comes from inputting a search
term and e-mailing me if any new ads show up so that I can be the first one to
respond. Below is my code, but I get an error:"no control matching name
'keywords". I am not sure what I am doing wrong.

    
    
    import mechanize
    br = mechanize.Browser()  # allow everything to be written to
    br.set_handle_robots(False)   # ignore robots
    br.open("http://www.kijiji.ca/h-kitchener-waterloo")
    br.select_form(nr=0)
    br["keywords"] = "Nvidia"
    


Answer: Your code is OK but there is no form named 'keywords' in the page. You can
look into page source info to verify that.

