Skip to content

A toy project for automating interaction with websites like mechanize

Notifications You must be signed in to change notification settings

zeuxisoo/python-motorise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Status

Build Status

Installation

Create virtualenv

python3 -m venv venv3

Activate virtuleenv

source venv3/bin/activate

Install the motorise

pip install motorise

Usage

Sample 1

from motorise import Agent

agent = Agent()
page  = agent.get("http://www.google.com/")

print(page.title())

Sample 2

from motorise import Agent

agent = Agent()
page  = agent.get("http://www.google.com/")
form  = page.form("form[name=f]")
form.set_field('q', 'github')
submit = agent.submit(form)

print([(link.href(), link.text()) for link in submit.links()])

About

A toy project for automating interaction with websites like mechanize

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published