Questions tagged [twill]

twill is an open source language written in Python that allows browsing the Web from a command line interface. twill supports most standard Web features (like forms and cookies) and automated Web testing. With its latest release in 2007, twill is considered outdated today.

Twill is a web browsing language for automating web browsing from a command line interface.

The latest release of twill is twill 0.9, released Thursday, December 27th, 2007.

The tool is outdated. There are several alternatives, like selenium or mechanize.

83 questions
1
vote
1 answer

Does twill run javascript correctly/at all?

If I run a twill script to download a web page, will the twill script run any javascript (inline or otherwise) on the page? Will it do it correctly? The official twill site doesn't seem to indicate whether or not twill supports js (which makes me…
shelman
  • 2,689
  • 15
  • 17
1
vote
0 answers

ImportError: No module named 'shell' when importing twill

i was trying to import from twill module but this error happens to me what should i do ? from twill.commands import * go("http://www.python.org/") this is the error : File…
1
vote
0 answers

Twill and Self-Signed Certificates

I've been using Twill under Python for a long time now, and somehow, I never managed to run into this before. If you point Twill at a page using a Self-Signed certificate, it errors out, like this: BrowserStateError: can't fetch relative reference:…
Jesse Dyer
  • 11
  • 4
1
vote
0 answers

transfer cookies from twill to zope

I'm trying to figure out a way to transfer cookies from a Twill browser instance to a Zope browser instance. They both are built on Mechanize, so this should be possible. I have tried: zopeBrowser = zope.testbrowser.browser.Browser() twillBrowser =…
Tyler
  • 4,679
  • 12
  • 41
  • 60
1
vote
0 answers

python twill module submit a form

Hello I am currently trying to make a bot that registers itself on a website. My Code is following: from twill.commands import fv, code, follow, go, submit, browser from time import sleep import random emailProviders = ["@yahoo.com", "@web.de",…
1
vote
3 answers

Using Twill from Python to open a link: " 'module' object has no attribute 'Popen' " What is it?

I have downloaded and installed Python 2.5.4 on my computer (my OS is Windows XP), downloaded “Goggle App Engine Software Development Kit” and created my first application in Python, which was a directory named helloworld that contained a small…
brilliant
  • 2,805
  • 11
  • 39
  • 57
1
vote
0 answers

Twill has correct form number but failed

I have this code to access the router's config. class Peplink_login(threading.Thread): twill_browser = twill.browser.TwillBrowser() def login_sso(self): login_url = "http://" + ROUTER_IP + "cgi-bin/MANGA/index.cgi" st =…
Mix Austria
  • 925
  • 2
  • 15
  • 35
1
vote
2 answers

Python requests module : Post and go to next page

I'm filling a form on a web page using python's request module. I'm submitting the form as a POST request, which works fine. I get the expected response from the POST. However, it's a multistep form; after the first "submit" the site loads another…
sanjeev mk
  • 4,276
  • 6
  • 44
  • 69
1
vote
2 answers

Environment variables

I use the module mechanize in order to log in a site. When I import twill.commands without any other apparent use, some debug messages [0] are displayed [1]. When I delete it, these messages disappear. How can I see what is changed in the…
Dimitris Leventeas
  • 1,622
  • 2
  • 16
  • 29
1
vote
2 answers

Using show() with twill spams the console with HTML

I've been using the fuction twill.commands.show() to get the raw HTML from a page. I run this about every 5 seconds. Every time the function is ran, It spams the console with the mentioned webpages raw HTML. I need to use the console for debugging,…
Ben Morris
  • 606
  • 5
  • 24
1
vote
0 answers

Why doesn't twill show a form?

I am trying to access a website using twill: https://cuentas.itesm.mx/IDMProv/portal/cn/GuestContainerPage/ITESMPageForgotPassword On the website code there is this field that I need to fill personID, inside the form frmChRIndex
1
vote
1 answer

Twill doesn't show forms

I'm trying to login in https://accounts.coursera.org/ using twill for python I tried this sheet of code import twill b = get_browser() b.go("https://accounts.coursera.org/") b.showforms() twill doesn't detect the form in the page and…
aouakki
  • 310
  • 5
  • 16
1
vote
4 answers

How can I put all twill commands together into one piece of code in a .py file?

I have just started exploring TWILL. Twill is an amazing scripting language for Web browsing and it does all I want!!! So far I've been using twill from a Python shell (IDLE (Python GUI) to be precise) and I do things there in the way of executing…
brilliant
  • 2,805
  • 11
  • 39
  • 57
1
vote
1 answer

Submit web form with Twill is not applied?

I am trying to automate the sending of a message on a shoutbox : http://www.i-tchat.com/shoutbox/shoutbox.php?idShoutbox=116303 When i'm using this code every thing work fine (without error) but the message is not send (submited) from twill.commands…
SachaDee
  • 9,245
  • 3
  • 23
  • 33
1
vote
1 answer

Logging into a website and retrieving HTML with Python

I need to log into a website to access its html on a login-protected page for a project I'm doing. I'm using this person's answer with the values I need: from twill.commands import * go('https://example.com/login') fv("3", "email",…
doxyl
  • 49
  • 5