When using the XPath HTML parser to scrape a webpage and attempting to create multiple nodes, a sql error is generated as follows:
SQLSTATE[42000]: Syntax error or access violation: 1064 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 ' 'The Paramedic', 'PALISADES', 'AKRIS ', 'KARAOKE', 'AT WAR\'S END', 'MOTIVES CD' at line 1
I've simplified the issue as much as possible by creating a content type that consists of only a title and I use the following as Context and title.
Context: /html/body/table/tr[2]/td/table/tr[1]/td[2]
title: div[@id]/center/table/tr[1]/td/font/b/text()
The webpage I'm scraping is http://www.downtownmusichall.arkansaslivemusic.com and the data returned in debug for xpathparser:0 appears to be correct.
I've attached an export of the importer. One thing I've noted is that if I reduce the import to a single item by changing the title to div[@id][1]/center/table/tr[1]/td/font/b/text()
it works correctly to import that single node. Any ideas as to what I'm doing wrong here?
Comment | File | Size | Author |
---|---|---|---|
downtown_export.txt | 1.77 KB | phizone |
Comments
Comment #1
Mizpah CreditAttribution: Mizpah commentedApologies for resurrecting this issue from the dead - but it appears to be similar to one I am currently experiencing - Did you ever find a solution?
https://gist.github.com/Mizpah/e9ff7eb258260d375dda
Comment #2
Mizpah CreditAttribution: Mizpah commentedUpdating this again, to make sure that the information is up to date.
After refining things a few times I am now in the situation where I am using AM using a precise context, have Xpath expressions that return data (debug shows all of the data now, no more 'No New Nodes', but still get the SQL error.
Wildstar Item Import 4 has been created.
context :
xpathparser:0 :
V="Mutagen Shoulder Plates"
V="Schematic: Thirsty Creek Hand Spikes"
V="The Desipient Collection"
V="Flaming Smoothie"
V="Granok Portrait (Draped)"
V="Banana"
V="Serviceable Platinum Shredder"
V="Galactium Isomodular Psystar"
V="Geometric Combat Assist Module"
V="Stormcrush Bladed Psybomb"
xpathparser:1 :
F="37671"
F="35979"
F="30406"
F="36491"
F="30662"
F="30790"
F="30918"
F="31046"
F="31174"
F="31302"
×Error message SQLSTATE[42000]: Syntax error or access violation: 1064 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 ' 'Schematic: Thirsty Creek Hand Spikes', 'The Desipient Collection', 'Flaming Sm' at line 1
Everything is detailed in this updated GIST, https://gist.github.com/Mizpah/029b40e0ea6e00ad3c69
I am really not sure what else I can adjust now, please help!
Comment #3
Mizpah CreditAttribution: Mizpah commentedand I have just realised I have been updating the wrong isse - apologies, please ignore/delete - will repost mu original issue.
Comment #4
twistor CreditAttribution: twistor as a volunteer commented