import mechanize,cookielib
br=mechanize.Browser()
cookie_jar=cookielib.CookieJar()
br.set_cookiejar(cookie_jar)
br.addheaders = [('User-agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1')]
br.set_handle_referer(True)
br.set_handle_robots(False)
br.open("http://facebook.com/login.php")
br.select_form(nr=0)
br.form['email']=raw_input("Email please: ")
br.form['pass']=raw_input("Password please: ")
br.submit()
if "Logout" in br.response().read():
print "Successfuly Logged in...May the Spam Process Begin ;) "
else:
print "Something is wrong with logging in.Sorry :( "
link_to_spam=raw_input("Enter the messages link for the one you want to spam\n\
Example: https://www.facebook.com/messages/someone: ")
br.open(link_to_spam)
for f in br.forms():
print f
So this code isn't showing the messages form in facebook.And don't comment on the purpose of the code.I'm only coding this for fun and won't use it actually except on my friends who accept that but even so I won't use it much. Does anyone have any idea about why it isn't showing?