1

Hi. I usually don't ask, because I find or solve everything myself. But in this trouble I'm tormented for many hours, even if that is really easy task.

In Python, I need to log in to some social network, add new post, copy link of that new post and fill Google Docs form with that link + some personal info.

I tried Mechanize, Spynner and Selenium, but still no way. Spynner looks like best variant, I have done login into social network and filling Google Docs form. But after I log into social network, I don't know how to add new post. (Currently I'm trying to do it on VK.com.) Maybe I'm typing bad name of form...

My current code:

# -*- coding: cp1250 -*-
import spynner
b = spynner.Browser()
b.show()
b.load('http://vk.com')
b.wk_fill('input[name=email]', 'my@email.tld')
b.wk_fill('input[name=pass]', 'mypassword')
b.click("#quick_login_button")
b.wait_load()
# ▼ This is not working ▼
b.wk_fill('input[name=post_field]', 'This is the new post.')
b.click("#send_post")
b.browse() # To see the result
4d4c
  • 8,049
  • 4
  • 24
  • 29
user32967
  • 141
  • 1
  • 1
  • 4

0 Answers0