From 8432632aae9a6b9f52e5d10fced24d94f4c4725c Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 17 Aug 2022 13:34:55 +0100 Subject: [PATCH] Show more articles on index page --- web_view.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web_view.py b/web_view.py index 61ba0d1..03f1ccb 100755 --- a/web_view.py +++ b/web_view.py @@ -23,6 +23,8 @@ wiki_hostname = "en.wikipedia.org" wiki_api_php = f"https://{wiki_hostname}/w/api.php" wiki_index_php = f"https://{wiki_hostname}/w/index.php" +awdl_url = "https://dplbot.toolforge.org/articles_with_dab_links.php" + @app.before_request def global_user(): @@ -78,8 +80,7 @@ def parse_articles_with_dab_links(root: lxml.html.Element) -> list[tuple[str, in @app.route("/") def index(): - - r = requests.get("https://dplbot.toolforge.org/articles_with_dab_links.php") + r = requests.get(awdl_url, params={"limit": 100}) root = lxml.html.fromstring(r.content) articles = parse_articles_with_dab_links(root)