forbidden_list
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| forbidden_list [2025/07/27 08:49] – created 194.180.179.165 | forbidden_list [2025/09/04 16:45] (current) – 109.154.205.96 | ||
|---|---|---|---|
| Line 62: | Line 62: | ||
| https:// | https:// | ||
| + | Full list: https:// | ||
| + | **Script to check itch takedowns** | ||
| + | * Working as of Thu Sep 4 17:35:03 | ||
| + | * | ||
| + | * You need a csvs folder containing lists from " | ||
| + | * | ||
| + | * You can find an itch csv export at https:// | ||
| + | * | ||
| + | * You can find the folder of csvs used for this at {{ :csvs.zip }} | ||
| + | * No extra takedowns from 2025/07/27 to 2025/09/04 | ||
| - | Full list: https://files.catbox.moe/3wnkvk.json | + | < |
| + | # | ||
| + | import csv | ||
| + | import datetime | ||
| + | import json | ||
| + | import os | ||
| + | import os.path | ||
| + | import urllib | ||
| + | import urllib.request | ||
| + | import urllib.error | ||
| + | from pprint import pp | ||
| + | |||
| + | OUT_FILE = " | ||
| + | RESUME = True | ||
| + | Return = {} | ||
| + | if RESUME: | ||
| + | if os.path.exists(OUT_FILE): | ||
| + | with open(OUT_FILE) as fp: | ||
| + | Return = json.load(fp) | ||
| + | |||
| + | total = 0 | ||
| + | for file in os.listdir(" | ||
| + | with open(os.path.join(" | ||
| + | spamreader = csv.reader(csvfile, | ||
| + | for row in spamreader: | ||
| + | total += 1 | ||
| + | if row[0] not in Return: | ||
| + | Return[row[0]] = {" | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | print(total, | ||
| + | for i, k in enumerate(Return): | ||
| + | if (i % 100) == 0 and i != 0: | ||
| + | print(" | ||
| + | with open(OUT_FILE, | ||
| + | json.dump(Return, | ||
| + | try: | ||
| + | if Return[k][" | ||
| + | TakedownLink = "https://itch.io/takedowns/" | ||
| + | req = urllib.request.Request(TakedownLink, | ||
| + | resp = urllib.request.urlopen(req) | ||
| + | #response = requests.head(TakedownLink, | ||
| + | #if response.status_code == 200: | ||
| + | #if resp.getcode() == 200: | ||
| + | Return[k][" | ||
| + | Return[k][" | ||
| + | Return[k][" | ||
| + | ISOTime = datetime.datetime.now().isoformat() | ||
| + | Return[k][" | ||
| + | print(" | ||
| + | pp(Return[k]) | ||
| + | print() | ||
| + | else: | ||
| + | print(" | ||
| + | except urllib.error.HTTPError as e: | ||
| + | if e.getcode() == 404: | ||
| + | Return[k][" | ||
| + | print(" | ||
| + | else: | ||
| + | raise Exception(" | ||
| + | except Exception as e: | ||
| + | print(" | ||
| + | Return[k][" | ||
| + | continue | ||
| + | json.dump(Return, | ||
| + | </ | ||
forbidden_list.1753606191.txt.gz · Last modified: 2025/07/27 08:49 by 194.180.179.165
