Update slixfeed.py
This commit is contained in:
parent
1d31992842
commit
6093148621
1 changed files with 5 additions and 4 deletions
|
@ -684,10 +684,11 @@ def last_entries(conn, num):
|
||||||
:param num: integer
|
:param num: integer
|
||||||
:return: rows (string)
|
:return: rows (string)
|
||||||
"""
|
"""
|
||||||
if int(num) > 50:
|
num = int(num)
|
||||||
num = str(50)
|
if num > 50:
|
||||||
elif int(num) < 1:
|
num = 50
|
||||||
num = str(1)
|
elif num < 1:
|
||||||
|
num = 1
|
||||||
cur = conn.cursor()
|
cur = conn.cursor()
|
||||||
sql = "SELECT title, link FROM entries ORDER BY ROWID DESC LIMIT {}".format(num)
|
sql = "SELECT title, link FROM entries ORDER BY ROWID DESC LIMIT {}".format(num)
|
||||||
results = cur.execute(sql)
|
results = cur.execute(sql)
|
||||||
|
|
Loading…
Reference in a new issue