Closed joergmlpts closed 2 years ago
It seems this exception occurs when there is an apostrophe in the podcast title or the podast description. In my case podcast https://www.spreaker.com/show/5634537/episodes/feed
has title Crime Pays But Botany Doesn't which contains an apostrophe.
The title and description are inserted into the database with this code:
# Insert podcasts data in the podcasts table
insert = cursor.execute(
"""
INSERT INTO podcasts (
title,
url,
cover,
description,
pageUrl,
coverUrl
)
VALUES (
'{0}',
'{1}',
'{2}',
'{3}',
'{4}',
'{5}')
""".format(
data['title'],
url,
cover_name,
data['description'],
data['link'],
data['cover_url']
)
)
For this podcast, this data is passed to cursor.execute
:
INSERT INTO podcasts (
title,
url,
cover,
description,
pageUrl,
coverUrl
)
VALUES (
'Crime Pays But Botany Doesn't',
'https://www.spreaker.com/show/5634537/episodes/feed',
'35f4fcd771cee1eaf50cb70d643a81f3.jpg',
'An antidote to the nausea caused by life in modern society via explorations of the cast of plant species composing the "living skin" of Planet Earth.',
'https://www.spreaker.com/show/crime-pays-but-botany-doesnt',
'https://d3wo5wojvuv7l.cloudfront.net/t_rss_itunes_square_1400/images.spreaker.com/original/35f4fcd771cee1eaf50cb70d643a81f3.jpg')
The value for title
- 'Crime Pays But Botany Doesn't'
- causes this exception. A single quote in a string delimited with quotes certainly looks wrong. Near "t"
in the error message is likely because "t" is the character that follows the apostrophe.
Nice project!
I managed to add one of my podcasts but could not add all of them. For example, when adding podcast
https://www.spreaker.com/show/5634537/episodes/feed
this exception occurred: