summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wikibot/inthemedia.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/wikibot/inthemedia.py b/wikibot/inthemedia.py
index aa9e0cc..d5a14f9 100644
--- a/wikibot/inthemedia.py
+++ b/wikibot/inthemedia.py
@@ -1,12 +1,14 @@
import pywikibot
+firstXentries = 20
+
def main():
site = pywikibot.Site('en', 'ArchiveTeam')
# Retrieve full "In The Media" page
mediaPage = pywikibot.Page(site, 'In The Media')
- # Parse contents and extract first 10 entries
+ # Parse contents and extract first n entries
entries = []
for line in mediaPage.text.split('\n'):
if not line:
@@ -15,7 +17,7 @@ def main():
entries.append([line])
elif line[0] == ':':
entries[-1].append(line)
- topEntries = entries[:10]
+ topEntries = entries[:firstXentries]
# Construct contents of "Main Page/In The Media"
contents = []