Code and data for arewedecentralizedyet.online and related projects
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Change these to use relative output files

+12 -3
+5 -1
data-fetchers/fetch-bsky.py
··· 1 - #!/usr/bin/ env python3 1 + #!/usr/bin/env python3 2 2 3 3 import requests 4 4 import csv 5 5 import sys 6 6 7 + from pathlib import Path 8 + 7 9 URLS = ["https://relay1.us-east.bsky.network/xrpc/com.atproto.sync.listHosts", "https://atproto.africa/xrpc/com.atproto.sync.listHosts"] 8 10 OUTPUT_FILE = "atproto-bsky-relay.csv" 11 + OUTPUT_FILE = (Path(__file__).parent / "../data-static/atproto-bsky-relay.csv").resolve() 12 + 9 13 10 14 def fetch_all(url): 11 15 print(f"Fetching from {url}")
+4 -1
data-fetchers/fetch-fedilist.py
··· 4 4 import csv 5 5 import sys 6 6 from bs4 import BeautifulSoup 7 + from pathlib import Path 7 8 8 9 URL = "https://fedilist.com/instance" 9 - OUTPUT_FILE = "fedilist-fromhtml.csv" 10 + 11 + OUTPUT_FILE = (Path(__file__).parent / "../data-static/fedilist-fromhtml.csv").resolve() 12 + 10 13 USERAGENT = "curl/7.54.1" 11 14 12 15 if __name__ == "__main__":
+3 -1
data-fetchers/fetch-sh.py
··· 4 4 import csv 5 5 import sys 6 6 from bs4 import BeautifulSoup 7 + from pathlib import Path 7 8 8 9 URL = "https://archive.softwareheritage.org/coverage/" 9 - OUTPUT_FILE = "sh-fromhtml.csv" 10 + OUTPUT_FILE = (Path(__file__).parent / "../data-static/sh-fromhtml.csv").resolve() 11 + 10 12 11 13 if __name__ == "__main__": 12 14 outfile = outfile = sys.argv[1] if len(sys.argv) == 2 else OUTPUT_FILE