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","test@test.com")
    twill.commands.fv("1","signup_password",password)
    twill.commands.submit()

def Main():  
    Login()
    PhotoUpload()

Main()
ArtOfWarfare
  • 20,617
  • 19
  • 137
  • 193
Attila Kis
  • 521
  • 2
  • 13
  • The documentation for twill says that there's a `formfile` command. Does that do what you need to do? http://twill.idyll.org/commands.html – ArtOfWarfare Sep 18 '15 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. – Attila Kis Sep 18 '15 at 14:49

0 Answers0