這是一個簡單的問題,但有人可以幫我讓我的代碼工作?錯誤發生在第9行,出現AttributeError錯誤:'str'對象沒有屬性'write'。如果有人能夠幫助我解決這個小問題,我將非常感激。 myFile = ("cat2numbers.txt")
with open("cat2numbers.txt", "wt") as f:
print("Writing to the file:
class EceA:
def __init__(s,name,age):
s.name = name
s.age = age
def disp():
return("the student name is" + s.name +"and the age is"+str(s.age))
reg1=("sam",21)
Traceba
有人可以幫我解決這個AttributeError嗎?我試圖獲取無限滾動網頁的page_source。在獲取目標網頁之前,我需要登錄到目標網站。 謝謝。 from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
class Login:
def __init