On 28/01/14 20:45, scurvy scott wrote:
import requests from bs4 import BeautifulSoup as beautifulpayload = {'username': 'XXXXX', 'password': 'XXXXXX'} r = requests.post("http://dogehouse.org/index.php?page=login", data=payload) soup = beautiful(r.text) confirmed = str(soup.findAll('span',{'class':'confirmed'})) print "Confirmed account balance" +confirmed[86:98]
I've tested the code in the regular python interpreter and it all executes the way it should. But when I attempt to run it using "python whatever.py" it doesn't give me any output.
Can you clarify what you mean by not giving any output? Does the print statement print "Confirmed account balance" with no further data? Or does it not even do that? Does the OS prompt return? or does it just hang? Are there any error messages, either from Python or from the OS? -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
