#coding:utf-8
from selenium import webdriver
import time
#先进行微博账号登录
driver = webdriver.Firefox()
driver.get("http://weibo.com/?topnav=1&mod=logo")
driver.implicitly_wait(5)
time.sleep(5)
driver.find_element_by_xpath('//*[@id="loginname"]').clear()
driver.find_element_by_xpath('//*[@id="loginname"]').send_keys('自己的微博账号')
driver.find_element_by_xpath('//*[@id="pl_login_form"]/div/div[3]/div[2]/div/input').clear()
driver.find_element_by_xpath('//*[@id="pl_login_form"]/div/div[3]/div[2]/div/input').send_keys('自己的微博密码')
driver.find_element_by_xpath('//*[@id="pl_login_form"]/div/div[3]/div[6]/a').click()
time.sleep(5)
#打开需要转发的微博进行转发
driver.get("http://weibo.com/17