feat(block): adds bridge_block_scriptzteam module
This commit is contained in:
parent
64d74c0a57
commit
c34dab7b9a
3 changed files with 46 additions and 0 deletions
20
app/terraform/block/block_scriptzteam.py
Normal file
20
app/terraform/block/block_scriptzteam.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
import requests
|
||||
|
||||
from app.terraform.block.bridge_bridgelines import BlockBridgelinesAutomation
|
||||
|
||||
|
||||
class BlockBridgeScriptzteamAutomation(BlockBridgelinesAutomation):
|
||||
"""
|
||||
Automation task to rotate bridges discovered by scriptzteam.
|
||||
"""
|
||||
|
||||
short_name = "block_bridge_scriptzteam"
|
||||
description = "Import bridges discovered by scriptzteam from GitHub"
|
||||
frequency = 300 # They only update every couple of days as of February 2023
|
||||
|
||||
def fetch(self) -> None:
|
||||
r = requests.get(
|
||||
"https://raw.githubusercontent.com/scriptzteam/Tor-Bridges-Collector/main/bridges-obfs4")
|
||||
r.encoding = "utf-8"
|
||||
contents = r.text
|
||||
self._lines = contents.splitlines()
|
Loading…
Add table
Add a link
Reference in a new issue