Trying to import podcasts with no artworkURL
This commit is contained in:
@@ -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.
|
#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})
|
r = requests.post(API_URL+'/addFeed/', json={"userID" : 1, "newURL" : url})
|
||||||
# print(r.text)
|
print(r.text)
|
||||||
print(url)
|
# print(url)
|
||||||
|
|
||||||
y=y+1
|
y=y+1
|
||||||
|
|
||||||
|
|||||||
4
main.py
4
main.py
@@ -38,7 +38,7 @@ class podcasts(db.Model):
|
|||||||
userID = db.Column(db.Integer)
|
userID = db.Column(db.Integer)
|
||||||
title = db.Column(db.Text)
|
title = db.Column(db.Text)
|
||||||
URL = 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'])
|
@app.route('/', methods=['GET'])
|
||||||
@@ -132,7 +132,7 @@ def addFeed():
|
|||||||
if not parsed.feed.title:
|
if not parsed.feed.title:
|
||||||
artwork = str(parsed.feed.image)
|
artwork = str(parsed.feed.image)
|
||||||
else:
|
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.
|
# 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
|
# if the show doesn't already exist for the logged in user it gets added
|
||||||
|
|||||||
Reference in New Issue
Block a user