2
0

func_title_random.py 280 B

1234567891011
  1. from .tool.func import *
  2. def func_title_random_2(conn):
  3. curs = conn.cursor()
  4. curs.execute("select title from data order by random() limit 1")
  5. data = curs.fetchall()
  6. if data:
  7. return redirect('/w/' + url_pas(data[0][0]))
  8. else:
  9. return redirect()