Re: Iterate through a list and try log in to a website with urllib and re

2014-03-03 Thread Roy Smith
In article , Marcus wrote: > I'm trying to use urllib and urllib2 to open an url + login_data in a for > loop. Step 1: Ignore all that crap and get http://www.python-requests.org/ > How can I display when successfully logged in and how to show when the > login is denied? > > I've tried us

Re: Iterate through a list and try log in to a website with urllib and re

2014-03-03 Thread Marcus
It's not that hard to find a program that does this already. But I'm trying to learn how to use these modules to create this. I've started it and now i want to complete it so I can create another program and learn more about other stuff, maybe a Twitter script or something. How do I learn when n

Re: Iterate through a list and try log in to a website with urllib and re

2014-03-03 Thread Chris Angelico
On Mon, Mar 3, 2014 at 11:51 PM, Marcus wrote: > Yes, it's only for my own use on my local WordPress installation. Only > educational use. What are you trying to learn, exactly? How to break into a WP site? Still dubious. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Iterate through a list and try log in to a website with urllib and re

2014-03-03 Thread Marcus
Yes, it's only for my own use on my local WordPress installation. Only educational use. -- https://mail.python.org/mailman/listinfo/python-list

Re: Iterate through a list and try log in to a website with urllib and re

2014-03-03 Thread Chris Angelico
On Mon, Mar 3, 2014 at 11:35 PM, Marcus wrote: > This is the code right now: http://pastebin.com/pE1YZX2K That looks short enough to include in-line, no need to point us to an external site :) So basically, you're doing a dictionary attack. May I ask why you're doing this, exactly? ChrisA -- h

Re: Iterate through a list and try log in to a website with urllib and re

2014-03-03 Thread Chris Angelico
On Mon, Mar 3, 2014 at 11:44 PM, Chris Angelico wrote: > So basically, you're doing a dictionary attack. May I ask why you're > doing this, exactly? oops, misclicked. I note that the user name 'alex' does not appear to match your name. I'm going to want a good reason for this code to be written,

Re: Iterate through a list and try log in to a website with urllib and re

2014-03-03 Thread Chris Angelico
On Mon, Mar 3, 2014 at 11:44 PM, Chris Angelico wrote: > So basically, you're doing a dictionary attack. May I ask why you're > doing this, exactly? -- https://mail.python.org/mailman/listinfo/python-list

Re: Iterate through a list and try log in to a website with urllib and re

2014-03-03 Thread Marcus
This is the code right now: http://pastebin.com/pE1YZX2K -- https://mail.python.org/mailman/listinfo/python-list

Iterate through a list and try log in to a website with urllib and re

2014-03-03 Thread Marcus
Hello, I'm trying to use urllib and urllib2 to open an url + login_data in a for loop. How can I display when successfully logged in and how to show when the login is denied? I've tried use this: html_content = urllib2.urlopen(url).read() re.findall('ERROR: The password you entered for the us

Re: log in to a website

2005-06-20 Thread passion_to_be_free
Works like a gem! Thanks a ton. ClientForm and ClientCookie are great! -- http://mail.python.org/mailman/listinfo/python-list

Re: log in to a website

2005-06-17 Thread Fuzzyman
[EMAIL PROTECTED] wrote: > I'm learning python, and my goal is to write a script that will log > into a website for me. The site uses HTTPS, the form uses the "POST" > method. > > >From what I've been able to find so far, it looks like i need to use > the urllib2 module...does anyone know where I

Re: log in to a website

2005-06-16 Thread Jeff Epler
You may find the third-party modules "ClientForm" and "ClientCookie" to be useful. Using ClientForm, the following code uploads a file to a particular web form: forms = ClientForm.ParseResponse(urllib2.urlopen(url)) f = forms[0] f.add_file(open(local, "rb"), filename=remote, name="file

log in to a website

2005-06-16 Thread passion_to_be_free
I'm learning python, and my goal is to write a script that will log into a website for me. The site uses HTTPS, the form uses the "POST" method. >From what I've been able to find so far, it looks like i need to use the urllib2 module...does anyone know where I can find some good sample code to rea