I want to add comments to a text file using Selenium with Python but No matter how hard I tried I couldn't find and couldn't do.
I tried so many code but not works.
One of the codes I've tried:
yorumlar = browser.find_elements_by_class_name('Mr508')
yorumlars = []
for element in elements:
yorumlars.append(element.text)
yorumlarCount = 1
with open("commends.txt","w",encoding = "UTF-8") as file:
for yorumlar in yorumlars:
file.write(str(yorumlarCount) + ".
" + yorumlar + "
")
file.write("**********
")
yorumlarCount += 1
I'm trying to pull the comments on all posts of one of the Instagram pages.
If you know please answer my question I have to do this code because I will get points from this code.
Thanks, come easy.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…