python - How to automate interaction for a website with POST method -


i need input text text box on website:

http://www.link.cs.cmu.edu/link/submit-sentence-4.html 

i need return page's html returned. have looked @ other solutions. aware there no solution all. have seen selenium, im not understand documentation , how can apply it. please me out thanks.

btw have experience beautifulsoup, if helps.i had asked before requests solution.i don't know how use though

pulled straight docs , changed example.

from selenium import webdriver  # create new instance of firefox driver driver = webdriver.firefox()  # go page driver.get("http://www.link.cs.cmu.edu/link/submit-sentence-4.html")  # page ajaxy title this: print driver.title  # find element that's name attribute sentence inputelement = driver.find_element_by_name("sentence")  # type in search inputelement.send_keys("you're welcome, accept answer!")  # submit form  inputelement.submit() 

this @ least input text. then, take @ this example retrieve html.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -