added '/' after addFeed
This commit is contained in:
11
helper.py
11
helper.py
@@ -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()
|
||||
Reference in New Issue
Block a user