Interact with a webpage containing dynamic list using Python
Question: I am trying to write a Python program to automatically add tasks to todoist. I
am currently trying to use mechanize but not sure if this is what I need
because it is set up to interact with forms and I'm not sure if todoist is
using HTML forms for input. This is my code so far:

    
    
    import mechanize;
    import re;
    
    br = mechanize.Browser();
    br.open("http://todoist.com/");
    assert br.viewing_html();
    print br.title();
    print br.forms();
    

Which prints

    
    
    To-do list and task manager. Free, easy, online and mobile: Todoist
    <generator object __call__ at 0x02D69288>
    

So it is successfully connecting to todoist but I am not sure how to access
the input forms to actually have it put tasks in? Also not sure why br.forms()
prints the reference rather than the value (which is an empty list)?


Answer: There are a few modules already available that allow me to interface with the
todoist API. This one seems to be working well in case anyone comes searching
with the same question: <https://github.com/Garee/pytodoist>

