added '/' after addFeed
This commit is contained in:
11
helper.py
11
helper.py
@@ -1,7 +1,7 @@
|
|||||||
import opml
|
import opml
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
API_URL = '''localhost:5000'''
|
API_URL = '''http://podcast-api.caprover.dandev.us'''
|
||||||
|
|
||||||
def feedImport ():
|
def feedImport ():
|
||||||
outline = opml.parse("podcast_republic_podcasts.opml")
|
outline = opml.parse("podcast_republic_podcasts.opml")
|
||||||
@@ -17,10 +17,11 @@ def feedImport ():
|
|||||||
desc = outline[y].pr_desc
|
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.
|
#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 + '''"}'''
|
# payload = '''{"userid" : 1, "newURL": "''' + str(url) + '''"}'''
|
||||||
# r = requests.post(API_URL+'/addFeed/', data=payload)
|
r = requests.post(API_URL+'/addFeed', json={"userID" : 1, "newURL" : url})
|
||||||
# print(r.text)
|
print(r.text)
|
||||||
print(payload)
|
# print(payload)
|
||||||
|
break
|
||||||
y=y+1
|
y=y+1
|
||||||
|
|
||||||
feedImport()
|
feedImport()
|
||||||
Reference in New Issue
Block a user