Started remote docker setup. Should update list of shows hourly.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import sqlalchemy as sql
|
import sqlalchemy as sql
|
||||||
|
|
||||||
db_URI = 'mysql+pymysql://pc:pc@192.168.86.198/Podcast'
|
#db_URI = 'mysql+pymysql://pc:pc@192.168.86.198/Podcast'
|
||||||
|
db_URI = 'mysql+pymysql://pc:pc@dandydb.duckdns.org/Podcast'
|
||||||
# db_URI = 'mysql+pymysql://pc:pc@dandembinski.duckdns.org:80/Podcast'
|
# db_URI = 'mysql+pymysql://pc:pc@dandembinski.duckdns.org:80/Podcast'
|
||||||
|
|
||||||
engine = sql.create_engine(db_URI)
|
engine = sql.create_engine(db_URI)
|
||||||
|
|||||||
29
main.py
29
main.py
@@ -1,5 +1,6 @@
|
|||||||
import database as db
|
import database as db
|
||||||
import Feed
|
import Feed
|
||||||
|
import time
|
||||||
|
|
||||||
userID = None
|
userID = None
|
||||||
|
|
||||||
@@ -17,30 +18,8 @@ def login():
|
|||||||
return result[0]
|
return result[0]
|
||||||
|
|
||||||
|
|
||||||
|
userID = login()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
print("1. Login\n2. Upload\n3. Update feeds\n4. Add Feed\n9. Exit\n")
|
|
||||||
val = input(">>>")
|
|
||||||
if val == "1":
|
|
||||||
userID = login()
|
|
||||||
elif val == "2":
|
|
||||||
if userID is None or userID == '':
|
|
||||||
print("Please login first")
|
|
||||||
else:
|
|
||||||
Feed.feedImport(userID)
|
|
||||||
elif val == "3":
|
|
||||||
if userID is None or userID == '':
|
|
||||||
print("Please login first")
|
|
||||||
else:
|
|
||||||
Feed.updateFeeds(userID)
|
Feed.updateFeeds(userID)
|
||||||
elif val == "4":
|
time.sleep(3600)
|
||||||
if userID is None or userID == '':
|
|
||||||
print("Please login first")
|
|
||||||
else:
|
|
||||||
Feed.addFeed(userID)
|
|
||||||
elif val == "5":
|
|
||||||
if userID is None or userID == '':
|
|
||||||
print("Please login first")
|
|
||||||
else:
|
|
||||||
Feed.deleteFeed(userID)
|
|
||||||
elif val == "9":
|
|
||||||
exit()
|
|
||||||
|
|||||||
Reference in New Issue
Block a user