10

Can I know the previous Elections for Moderators Nominated and Elected as a list?

For Example:

enter image description here.. 2012, 2013 & upto latest elections..

And once elected as a Moderator.. what is the period of the Moderator position? 1year 2years? life time?

| |
10

As we're on a tech site here, why not automate this task with a little script that scrapes the election pages you want and lists the candidates in your desired format, e.g. using my trusty friend Python.

You may save the script at the end of this answer to any file and run it with the election number(s) you want as arguments. Python 3 (3.5+) and the beautifulsoup4 library are required at least.

Output right now:

$ python3 mod-scraper.py {1..7}

(1) 2011 Moderator Election: https://askubuntu.com/election/1
User ID | Name            | Elected?
--------+-----------------+---------
    333 | myusuf3         | 
    866 | 8128            | 
     41 | Marco Ceppi     | elected
      4 | txwikinger      | 
    449 | Oli             | elected
   1067 | Stefano Palazzo | elected
      5 | Nathan Osman    | 

(2) 2012 Moderator Election: https://askubuntu.com/election/2
User ID | Name                | Elected?
--------+---------------------+---------
   2732 | Octavian A. Damiean | 
   8436 | UAdapter            | 
  30405 | William             | 
  25798 | jokerdino           | 
  14356 | fossfreedom         | elected
  40445 | gajdipajti          | 
  17722 | Amith KK            | 
   1992 | RolandiXor          | 
  25863 | Bruno Pereira       | elected
   6005 | jrg                 | elected

(3) 2013 Moderator Election: https://askubuntu.com/election/3
User ID | Name            | Elected?
--------+-----------------+---------
  46312 | Ringtail        | 
   5691 | karthick87      | 
  17722 | Amith KK        | 
   1992 | RolandiXor      | elected
  33833 | rɑːdʒɑ          | 
  25798 | jokerdino       | elected
  17681 | Journeyman Geek | 
   7035 | Luis Alvarado   | elected
  54037 | Jared Burrows   | 
  47291 | Mateo           | 
   3550 | hhlp            | 
  98085 | user98085       | 
   3889 | TheXed          | 
  54298 | nanofarad       | 

(4) 2014 Moderator Election: https://askubuntu.com/election/4
User ID | Name        | Elected?
--------+-------------+---------
  62483 | Lucio       | 
  17722 | Amith KK    | 
  44179 | Seth        | elected
 197910 | K7AAY       | 
 169736 | Braiam      | 
  47291 | Mateo       | 
  98085 | user98085   | 
 150504 | Maythux     | 
  15598 | NaN         | 
  59676 | Mitch       | elected
  72576 | jobin       | 
  10616 | Thomas Ward | 
  38094 | Richard     | 
  36315 | blade19899  | 

(5) 2016 Moderator Election: https://askubuntu.com/election/5
User ID | Name                | Elected?
--------+---------------------+---------
 295286 | Sergiy Kolodyazhnyy | 
 367990 | Byte Commander      | 
 278703 | Faizan Akram Dar    | 
  85695 | terdon              | elected
 153297 | Wild Man            | 
  10616 | Thomas Ward         | elected
  72216 | Jacob Vlijm         | 
 167850 | Pilot6              | 
  26252 | maniat1k            | 
 399217 | Rumesh              | 
  57576 | andrew.46           | 
 332494 | snoop               | 
 186134 | Tim                 | 
    271 | Andrea Lazzarotto   | 
 522934 | Videonauth          | 

(6) 2019 Moderator Election: https://askubuntu.com/election/6
User ID | Name           | Elected?
--------+----------------+---------
 531149 | ThunderBird    | 
 522934 | Videonauth     | 
 367990 | Byte Commander | elected
 527764 | Zanna          | 
 653515 | vidarlo        | 
 459561 | George Udosen  | 
 127308 | LifeBoy        | 
  68186 | user68186      | 

(7) 2020 Moderator Election: https://askubuntu.com/election/7
User ID | Name              | Elected?
--------+-------------------+---------
 890892 | Tejas Lotlikar    | 
 527764 | Zanna             | elected
 531149 | ThunderBird       | 
 367882 | Ashu              | 
 253579 | Akiva             | 
 992730 | political science | 
 816190 | Kulfy             | 
 264781 | Ravexina          | elected

Script source code:

#!/usr/bin/env python3

"""
Scraper for Ask Ubuntu election pages to create a tabular history summary

Specify one or more election numbers to examine as arguments.
If you use Bash or a compatible shell, you can use Brace expansions for this:
>    python3 mod-scraper.py {1..6}

Dependencies:
- Python 3  (tested with version 3.5 - 3.8)
- required:  BeautifulSoup  (python3 -m pip install --user beautifulsoup4)
- optional:  requests       (python3 -m pip install --user requests)
"""

import sys
from bs4 import BeautifulSoup

# Optional dependency: prefer requests, fall back to urllib if not installed
try:
    import requests
    fetch = lambda url: requests.get(url).text
except ImportError:
    import urllib.request
    fetch = lambda url: urllib.request.open(url).read()

# Change to try other sites? Might convert this to an arg at some point anyway.
url_template = "https://askubuntu.com/election/{}"

# Argument checking
args = sys.argv[1:]
if not args or any(not arg.isdigit() for arg in args):
    print("One or more election number(s) required as arguments!")
    sys.exit(1)


for num in args:
    # Download URL and parse its HTML structure
    url = url_template.format(num)
    soup = BeautifulSoup(fetch(url), "html.parser")

    # Find and process the interesting information in the document
    try:
        title = soup.find("h1").text.strip()
        winners = [
            img.get("src").split("/")[-1].rstrip(".png")
            for img in soup.find(class_="question-status").find_all("img")
        ]
        candidates = [
            (div.a.get("href").split("/")[2], div.a.text.strip())
            for div in soup.find_all(class_="user-details")
        ]
    except Exception:
        print(
            "({}) {}: {}".format(num, "Error", url),
            "Failed parsing the page - invalid link or changed layout maybe?",
            sep="\n", end="\n\n"
        )
        continue

    # Output table and headline formatting
    template = "{:>7} | {:%d} | {}" % max(len(name) for _, name in candidates)
    header = template.format("User ID", "Name", "Elected?")
    print(
        "({}) {}: {}".format(num, title, url),
        header,
        "".join("+" if c == "|" else "-" for c in header),
        *[
            template.format(uid, name, "elected" if uid in winners else "")
            for uid, name in candidates
        ],
        sep="\n", end="\n\n"
    )

About the time period, as already covered in @Glorfindel's answer, moderators on SE are elected for life time, unless they decide to resign voluntarily at some point, or the company decides to terminate their moderator privilege for any reason, e.g. violation of the Code of Conduct or Privacy Policy.

| |
  • @PRATAP true, missed that part. Added a paragraph about it now, although Glorfindel's other answer here correctly covers it already. – Byte Commander Jun 28 at 13:29
7

election table image

| |
  • @PRATAP elections are held as requested by the mods, not annually or anything. There were no elections in those years because there were enough mods, it seems:) – Zanna Jun 16 at 0:55
  • Thank you thats clear.. – UnKNOWn Jun 16 at 3:10
6

There is an overview of the elected moderators normally visible at the following URL: https://askubuntu.com/election, but not right now because there's an election going on. I originally had a fix for this: How to show the election history page when there is an ongoing election? but it doesn't work anymore. The Wayback Machine saved a copy in 2017 which logically doesn't have the last finished election in 2019. Anyway, this page doesn't show all the candidates, just the winners.

You'd have to generate such an overview yourself; you can still visit e.g. https://askubuntu.com/election/1 to view the first election, and increase the number all the way up to 6.

As for your final question, moderators are elected for life, though they may step down voluntarily and (in rare cases) be removed by the company.

| |
  • seems need to do a lot of workout to know the result.. anyhow what is the period of position? – UnKNOWn Jun 15 at 16:02
  • 1
    True, I'd love to help out further but I have something on the stove needing my immediate attention... – Glorfindel Jun 15 at 16:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .