Re: [Tutor] automate add-to-cart with python

2013-01-30 Thread Walter Prins
Hi, Now I just have to figure out how to write the code with the selenium > module. > > Install the Firefox extension/add-on "Selenium IDE" which will help with that too: http://seleniumhq.org/download/ http://seleniumhq.org/docs/02_selenium_ide.jsp# It's effectively a browser macro recorder w

Re: [Tutor] automate add-to-cart with python

2013-01-30 Thread Benjamin Fishbein
On Jan 29, 2013, at 11:49 PM, Marc Tompkins wrote: > > I'm pretty sure that's a typo. It should say: > python virtualenv.py > Woohoo!!! It works. You're right. It worked this way and I was able to install pip. And I got selenium to work. Apparently the problem is that selenium isn't compatible

Re: [Tutor] automate add-to-cart with python

2013-01-29 Thread Marc Tompkins
On Tue, Jan 29, 2013 at 9:19 PM, Benjamin Fishbein wrote:Then it said: > > You can also use easy_install, or if you have no Python package manager > available at all, you can just grab the single file > virtualenv.py and > run it with py

Re: [Tutor] automate add-to-cart with python

2013-01-29 Thread Benjamin Fishbein
> > >http://www.pip-installer.org/en/latest/installing.html > I went to this pip site. It told me to install virtualenv. http://www.virtualenv.org/en/latest/#installation The virtualenv site told me: You can install virtualenv with pip install virtualenv, or the latest development version w

Re: [Tutor] automate add-to-cart with python

2013-01-29 Thread Francois Dion
On Mon, Jan 28, 2013 at 6:32 PM, Alan Gauld wrote: > On 28/01/13 22:51, Benjamin Fishbein wrote: >> In general, despite scouring the Internet, I haven't been able to figure >> out how to get Python to cause javascripts I find in the html to be run. > > > That's because Javascript is run in the bro

Re: [Tutor] automate add-to-cart with python

2013-01-29 Thread Prasad, Ramit
Benjamin Fishbein wrote: > >> > > > > A direct approach would probably use the webdriver API to automate the > > browser. Selenium has one: > > > I decided to use Selenium. It may be overkill for this particular problem, > but I'll want to use it for other > things. > This is my first time trying

Re: [Tutor] automate add-to-cart with python

2013-01-29 Thread Danny Yoo
> After downloading pip, I tried to install it: > cd /Applications/pip-1.2.1 > install pip > > I got this strange message: > usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] >[-o owner] file1 file2 >install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-

Re: [Tutor] automate add-to-cart with python

2013-01-29 Thread Benjamin Fishbein
>> > > A direct approach would probably use the webdriver API to automate the > browser. Selenium has one: > I decided to use Selenium. It may be overkill for this particular problem, but I'll want to use it for other things. This is my first time trying to install a new module to Python. I've

Re: [Tutor] automate add-to-cart with python

2013-01-28 Thread ALAN GAULD
>> Or maybe, just maybe, somebody has written a javascript interpreter in >> Python as a module that you can import. It sounds just about crazy enough >> that it might even exist! But as I said, that's probably the wrong thing to >> do... > >A direct approach would probably use the webdriver API

Re: [Tutor] automate add-to-cart with python

2013-01-28 Thread Danny Yoo
> Or maybe, just maybe, somebody has written a javascript interpreter in > Python as a module that you can import. It sounds just about crazy enough > that it might even exist! But as I said, that's probably the wrong thing to > do... A direct approach would probably use the webdriver API to autom

Re: [Tutor] automate add-to-cart with python

2013-01-28 Thread Alan Gauld
On 28/01/13 22:51, Benjamin Fishbein wrote: In general, despite scouring the Internet, I haven't been able to figure out how to get Python to cause javascripts I find in the html to be run. That's because Javascript is run in the browser which has a Javascript interpreter built in. Python does

[Tutor] automate add-to-cart with python

2013-01-28 Thread Benjamin Fishbein
Hello, I'm trying to automate putting a series of items into my cart. Here's the html for the add-to-cart button on the website: http://cart.half.ebay.com/ws/eBayISAPI.dll?HalfAddItemToCart&ap=additem&itemid=343343950913&pr=57017296&fromshop=1";>Add to cart Using the cookielib and urllib2 module,