我得到了AttributeError:'unicode'对象没有在这个问题的标题中指定的属性'sleep',我无法弄清楚为什么它会抛出该错误消息.这是自动发布facebook的自动脚本.如果有人知道我的代码有什么问题,我告诉我.代码在这里
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
import traceback
import string
import xlrd
#taking inputs from user-----------------------------------
delay=input('Set Time: ')
limit=input('Set Post Limit: ')
valuee=limit
count=0
start=0
end=valuee
#----------------------------------------------------------
#open file for taking multiple accounts-------------------
f=open('Accounts.csv')
data=f.readlines()
i=0
for value in data:
values=value.split(',')
password=values[1]
user_name=values[0]
#Condition for next URLs--------------------------
if count>=1:
start=limit
end=start + valuee
limit=end
count+=1
#-----------------------------------------------
chrome_options = webdriver.ChromeOptions() #going to chrome options
chrome_options.add_argument("--start-maximized")
prefs = {"profile.default_content_setting_values.notifications" : 2 #turn off all notifications
,"profile.managed_default_content_settings.images": …Run Code Online (Sandbox Code Playgroud)