Skip to content

Create a separate program/process to scrape election status on all network sites #60

@samliew

Description

@samliew

Currently, the setting up of this bot is done manually by changing environment vars in Heroku:

  • Set CHAT_DOMAIN, if election is on another site on the Stack Exchange network
  • Find election chat room, or default chat room for that site, set CHAT_ROOM_ID to that
  • Set ELECTION_PAGE_URL to the active election page
  • Set ELECTION_QA_URL, to override if the bot couldn't detect the correct site meta question link

If we can create a program to scrape all network sites' election pages, and store the status in a persistent database, we could potentially use this to automatically spin up a new instance for that site if a scheduled election is detected (usually the announcement on per-site meta comes later, although they are automating the election process - so look out for changes).

Maybe we don't need to find/scrape default chatroom urls for each site, since that is unlikely to change. The list can be fetched from https://api.stackexchange.com/docs/sites#filter=default&run=true, and the room with the most users & messages should be the default (e.g.: https://chat.stackexchange.com/?tab=site&sort=people&host=serverfault.com).

But it would be nice for the bot to detect the election chat room if there is one, using the following methods (in order):

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeatures and enhancements

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions