Message from Python discussions
December 2018
— Other class names can also include item_name. So i cant separate it with rexp
You want get all div which include class name in the next manner [A-Za-z0-9]+_item_name-[A-Za-z0-9]+ ????
— Yes, but how separate “right” divs from others?
— Create a list of divs
— First create list of divs like suggest david
— Next loop by checking with regular class name
— Help please.
this is my code:
sql = "INSERT INTO tb_ligacoes (tipo, data, data_hora, agente, ramal, fone, duracao) VALUES (%s, %s, %s, %s, %s, %s, %s )"
dados = ("'"+subitem.find("tipo").text +"', '"+subitem.find("data").text+"', '"+subitem.find("data_hora").text+"', '"+subitem.find("agente").text+"', '"+subitem.find("ramal").text+"', '"+subitem.find("fone").text+"', '"+subitem.find("duracao").text+"'")
mycursor.execute(sql, dados)
#Commitando dados
mydb.commit()
after execute, the mysql show this error:
mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%s, %s, %s, %s, %s, %s, %s )' at line 1
— Hey guys i have a problem with writing a code that should run on passwords from dictionary and open Zip file
— Show your code and the problem you're having
— Hi everybody!! Some have a list of exercises to solve from beginner to expert?
— I am trying to learn codes from python documentation but can't remember them i forget the codes in 2-3 days 😭
— Just continue practicing