added '/' after addFeed

This commit is contained in:
Dan Dembinski
2020-03-09 14:41:40 -04:00
parent 900084f493
commit 9abe918906
2 changed files with 7 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
import opml
import requests
API_URL = '''localhost:5000'''
API_URL = '''http://podcast-api.caprover.dandev.us'''
def feedImport ():
outline = opml.parse("podcast_republic_podcasts.opml")
@@ -17,10 +17,11 @@ def feedImport ():
desc = outline[y].pr_desc
#checks to see if the podcast URL already exists for logged in user and skips it if it has already been imported.
payload = '''{"userid" : 1, "newURL": "''' + url + '''"}'''
# r = requests.post(API_URL+'/addFeed/', data=payload)
# print(r.text)
print(payload)
# payload = '''{"userid" : 1, "newURL": "''' + str(url) + '''"}'''
r = requests.post(API_URL+'/addFeed', json={"userID" : 1, "newURL" : url})
print(r.text)
# print(payload)
break
y=y+1
feedImport()