get random ja word

This commit is contained in:
Hiller Liao
2023-07-16 23:10:53 +08:00
parent 5aaba55dbd
commit 4370bc36f0
3 changed files with 44 additions and 12 deletions

View File

@@ -3,10 +3,12 @@ from rsshub.extensions import cache
bp = Blueprint('main', __name__)
@bp.route('/word/<string:category>')
@bp.route('/')
def word():
@cache.cached(timeout=3600)
def word(category=''):
from rsshub.spiders.word.word import ctx
return render_template('main/word.html', **ctx())
return render_template('main/word.html', **ctx(category))
@bp.route('/index')
def index():