0

While iterating over a list that contains links to youtube videos and trying to insert it into SQL I got this error

    for video_link,video_title,views,post_date,likes in full_link_dup[:5],title[:5],views[:5],time1[:5],likes_per_video:
        cursor.execute("insert into youtube_data values(%s,%s,%s,%s,%s,%s,%s);",(str(channel_name),"https://www.youtube.com/"+video_link[1:],str(video_title),str(views),str(post_date),int(likes),len(comment_per_videos)))
    connection.commit()```

  [1]: https://i.stack.imgur.com/tHNwf.png
  • your code is trying to convert something to an integer which cannot be converted to an integer. – Psytho Sep 08 '22 at 17:28

0 Answers0