]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 12 Jan 2025 02:10:42 +0000 (03:10 +0100)
committerRoland Häder <roland@mxchange.org>
Sun, 12 Jan 2025 02:10:42 +0000 (03:10 +0100)
- encoding for reading config.json set to UTF-8
- removed unused imports

fba/helpers/config.py
fba/http/csrf.py
fba/http/federation.py
fba/networks/friendica.py
fba/networks/mastodon.py
fba/networks/pleroma.py
fba/utils.py

index 426e9a63451e885aa13b264548d4faf12ebdcfa4..215f0f01de32778bb07b5adc793bb8de7e067eeb 100644 (file)
@@ -30,7 +30,7 @@ logging.basicConfig(level=logging.INFO)
 logger = logging.getLogger(__name__)
 #logger.setLevel(logging.DEBUG)
 
-with open("config.json") as f:
+with open("config.json", 'r', encoding='utf-8') as f:
     logger.debug("Loading configuration file ...")
     _config = json.loads(f.read())
     _config["max_crawl_depth"] = min(_config["max_crawl_depth"], (sys.getrecursionlimit() - 50))
index f3b8c563096982b7fbc6e2aee881254e0ee925f4..e3884cc89b18022351542d6e38c330d1b09c392b 100644 (file)
@@ -21,7 +21,6 @@ import requests
 import validators
 
 from fba.helpers import blacklist
-from fba.helpers import config
 from fba.helpers import cookies
 from fba.helpers import domain as domain_helper
 
index b4b629a4a84a039df34d5727522b07dfde22dae5..7f2ce0d17ee5f1de307f1ed89885d90d832f8eda 100644 (file)
@@ -34,7 +34,6 @@ from fba.http import csrf
 from fba.http import network
 from fba.http import nodeinfo
 
-from fba.models import blocks
 from fba.models import instances
 
 from fba.networks import lemmy
index 9329fe1718680d1714a52f042c5e210344dd112a..11ec4980c768c5ecee5ba12875c6921f8c106bb6 100644 (file)
@@ -19,7 +19,6 @@ import logging
 import bs4
 
 from fba.helpers import blacklist
-from fba.helpers import config
 from fba.helpers import domain as domain_helper
 from fba.helpers import tidyup
 
index d748db43af580e61df60caea5485070f6b3fa4ab..ca24687b3a929604b54beb35192f82f67c0b3fe7 100644 (file)
@@ -21,13 +21,11 @@ import bs4
 
 from fba.helpers import blacklist
 from fba.helpers import blocks as blocks_helper
-from fba.helpers import config
 from fba.helpers import domain as domain_helper
 from fba.helpers import tidyup
 
 from fba.http import network
 
-from fba.models import blocks
 from fba.models import instances
 
 logging.basicConfig(level=logging.INFO)
index 8abb90df045ece7e8fd15b9dbd1d2d46e3660005..181c1785397fc8a4dc5b38864b8468bf2b6ea332 100644 (file)
@@ -23,14 +23,12 @@ from fba import database
 
 from fba.helpers import blacklist
 from fba.helpers import blocks as blocks_helper
-from fba.helpers import config
 from fba.helpers import domain as domain_helper
 from fba.helpers import tidyup
 
 from fba.http import network
 from fba.http import nodeinfo
 
-from fba.models import blocks
 from fba.models import instances
 
 logging.basicConfig(level=logging.INFO)
index b0702da93ddfd5c0a4f0ae67e25af240241a8b59..aa58a754f425b73125f6cd61b92f11f81e4f5eb9 100644 (file)
 import hashlib
 import logging
 
-from urllib.parse import urlparse
-
 import bs4
-import requests
 import validators
 
 from fba.helpers import blacklist
@@ -27,8 +24,6 @@ from fba.helpers import config
 from fba.helpers import domain as domain_helper
 from fba.helpers import tidyup
 
-from fba.http import network
-
 from fba.models import instances
 
 logging.basicConfig(level=logging.INFO)