0

So I making a Tumblr bot in python with twill (yea I know I could use API, but i want to use multiple accounts (50+) and I don't want to create an API for every account))

And how can I make the uploading procedure through twill? I succesfully log in.

My Code:

site = ("http://tumblr.com/login")

def PhotoUpload():
    twill.commands.go("http://www.tumblr.com/new/photo")
    twill.commands.submit()

def ShowInfo():
    print twill.commands.info()
    print twill.commands.showforms()
    print twill.commands.showlinks()

def Login():
    twill.commands.go(site)
    twill.commands.fv("1","signup_email","[email protected]")
    twill.commands.fv("1","signup_password",password)
    twill.commands.submit()

def Main():  
    Login()
    PhotoUpload()

Main()
2
  • The documentation for twill says that there's a formfile command. Does that do what you need to do? twill.idyll.org/commands.html Commented Sep 18, 2015 at 14:39
  • Sadly, the tumblr's photo upload isn't working that way, as I found :\ I checked the forms at the tumblr.com/new/photo page, and there isn't any form for files. Commented Sep 18, 2015 at 14:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.