added note to main about resetting autoincrement. Added podcast.opml file back in. wrote small console helper app to load in opml files for testing

This commit is contained in:
Dan Dembinski
2020-03-09 14:30:43 -04:00
parent f5d66e8c0b
commit 900084f493
3 changed files with 52 additions and 1 deletions

26
helper.py Normal file
View File

@@ -0,0 +1,26 @@
import opml
import requests
API_URL = '''localhost:5000'''
def feedImport ():
outline = opml.parse("podcast_republic_podcasts.opml")
#get the number of shows from the OPML file
x = len(outline)
y=0
#loops through each podcast and parses out relevant information
while y < x:
title = outline[y].title
url = outline[y].xmlUrl
artwork = outline[y].pr_artwork
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)
y=y+1
feedImport()