From eaefe029884a99abd0739d5eade67629f3f190df Mon Sep 17 00:00:00 2001 From: Dan Dembinski Date: Mon, 9 Mar 2020 16:42:52 -0400 Subject: [PATCH] Trying to import podcasts with no artworkURL --- helper.py | 4 ++-- main.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/helper.py b/helper.py index 7a523de..3f2dc8d 100644 --- a/helper.py +++ b/helper.py @@ -19,8 +19,8 @@ def feedImport (): #checks to see if the podcast URL already exists for logged in user and skips it if it has already been imported. r = requests.post(API_URL+'/addFeed/', json={"userID" : 1, "newURL" : url}) - # print(r.text) - print(url) + print(r.text) + # print(url) y=y+1 diff --git a/main.py b/main.py index 6e682ac..642b507 100644 --- a/main.py +++ b/main.py @@ -38,7 +38,7 @@ class podcasts(db.Model): userID = db.Column(db.Integer) title = db.Column(db.Text) URL = db.Column(db.Text) - artworkURL = db.Column(db.Text) + artworkURL = db.Column(db.Text, default=None) @app.route('/', methods=['GET']) @@ -132,7 +132,7 @@ def addFeed(): if not parsed.feed.title: artwork = str(parsed.feed.image) else: - artwork = None + artwork = '' # checks to see if the podcast URL already exists for logged in user and skips it if it has already been imported. # if the show doesn't already exist for the logged in user it gets added