20 lines
492 B
Python
20 lines
492 B
Python
|
from typing import Any
|
||
|
|
||
|
import requests
|
||
|
|
||
|
from app.terraform.block.bridge import BlockBridgeAutomation
|
||
|
|
||
|
|
||
|
class BlockBridgeRoskomsvobodaAutomation(BlockBridgeAutomation):
|
||
|
short_name = "block_bridge_roskomsvoboda"
|
||
|
description = "Import the RosKomSvoboda IP blocklist"
|
||
|
frequency = 300
|
||
|
|
||
|
_data: Any
|
||
|
|
||
|
def fetch(self) -> None:
|
||
|
self._data = requests.get("https://reestr.rublacklist.net/api/v3/ips/").json()
|
||
|
|
||
|
def parse(self) -> None:
|
||
|
self.ips.extend(self._data)
|