Python Forum
Python3 + BeautifulSoup4 + lxml (HTML -> CSV) - How to write 3 Columns to MariaDB?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python3 + BeautifulSoup4 + lxml (HTML -> CSV) - How to write 3 Columns to MariaDB?
#12
(Mar-22-2020, 09:19 AM)BrandonKastning Wrote:
insertVariablesIntoTable('allTitle[0]', 'allOpinion[0]', 'allURL')

Why the quotes? That's not how you refer to variables, is it?


Quote:Adding the above code as the bottom line in my .py I receive the following error:

Quote:Traceback (most recent call last):
File "HTML2CSV-NoWrite3Variables-to-MySQL.Python.Variable.Passoff.MySQL.INSERT.py", line 61, in <module>
insertVariablesIntoTable('allTitle[0]', 'allOpinion[0]', 'allURL')
NameError: name 'insertVariablesIntoTable' is not defined

Do you have any suggestions as to how to remedy this?

Does the function live in another file? You need to import it if so.
Reply


Messages In This Thread
RE: Python3 + BeautifulSoup4 + lxml (HTML -> CSV) - How to write 3 Columns to MariaDB? - by ndc85430 - Mar-22-2020, 09:23 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question Python Obstacles | Jeet-Kune-Do | BS4 (Tags > MariaDB) [URL/Local HTML] BrandonKastning 0 1,485 Feb-08-2022, 08:55 PM
Last Post: BrandonKastning
  Beautifulsoup4 help samuelbachorik 1 1,433 Feb-05-2022, 10:44 PM
Last Post: snippsat
Question Securing State Constitutions (USA) from University of Maryland > MariaDB .sql BrandonKastning 1 1,615 Jan-21-2022, 06:34 PM
Last Post: BrandonKastning
Question Scraping Columns with Pandas (Column Entries w/ more than 1 word writes two columns) BrandonKastning 7 3,408 Jan-13-2022, 10:52 PM
Last Post: BrandonKastning
Exclamation Debian 10 Buster Environment - Python 3.x (MariaDB 10.4.21) | Working Connector? BrandonKastning 9 4,574 Jan-04-2022, 08:27 PM
Last Post: BrandonKastning
Lightbulb Python Obstacles | Kung-Fu | Full File HTML Document Scrape and Store it in MariaDB BrandonKastning 5 3,101 Dec-29-2021, 02:26 AM
Last Post: BrandonKastning
  Python Obstacles | Karate | HTML/Scrape Specific Tag and Store it in MariaDB BrandonKastning 8 3,364 Nov-22-2021, 01:38 AM
Last Post: BrandonKastning
  cleaning HTML pages using lxml and XPath wenkos 2 2,651 Aug-25-2021, 10:54 AM
Last Post: wenkos
  HTML multi select HTML listbox with Flask/Python rfeyer 0 4,892 Mar-14-2021, 12:23 PM
Last Post: rfeyer
  Build a simple Webapp with Python Flask and mariaDB newbie1 3 3,545 Jun-04-2020, 09:34 PM
Last Post: lmolter54

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020