Roland Häder [Tue, 8 Aug 2023 12:57:25 +0000 (14:57 +0200)]
WIP:
- added i18n support
- I still get an exception of missing tag 'trans' and I don't know how to hook
i18n properly into Jinja2
- I found tutorials but they had their Python-based language files while this
here follows: https://svn.python.org/projects/external/Jinja-2.1.1/docs/_build/html/extensions.html
- if someone knows how to make this correctly, please tell me
Roland Häder [Tue, 21 Jan 2025 11:43:44 +0000 (12:43 +0100)]
Continued:
- added more exceptions to catch and handle
- split long 2-statements lines into single lines for better error handling
and debugging (if fedilist is one day back -> https://fedilist.com )
Roland Häder [Wed, 15 Jan 2025 02:12:11 +0000 (03:12 +0100)]
Continued:
- need to skip invalid table headers, they should be introduced with <thead>
and then each column <th> but some website may use <tr> instead of <thead>
- strip (trim) strings
Roland Häder [Mon, 13 Jan 2025 23:40:06 +0000 (00:40 +0100)]
Continued:
- avoided dangerous (=mutable) argument to functions/methods (thanks to pylint)
- reduced invocation count of find_all("foo") by using local variable
- added more checks in "quarantined" branch
Roland Häder [Mon, 13 Jan 2025 22:33:37 +0000 (23:33 +0100)]
Continued:
- check if required key 'url' is in dict 'row'
- avoided superflous else + indenting
- simplier check before complex checks (`if domain in domains` is lesser
intensive than invoking "expensive" is_wanted())
Roland Häder [Sun, 12 Jan 2025 03:03:52 +0000 (04:03 +0100)]
Continued:
- logging whole tag isn't a good idea
- yes, the HTML is sometimes broken, e.g. <meta> and not <meta /> (self-closing)
- the open tag causes the warning
Roland Häder [Fri, 10 Jan 2025 08:41:22 +0000 (09:41 +0100)]
Continued:
- blacklisted pinggy.link, this floods instances table. Please register yourself
a proper domain and not use "free" hosters' server names as "domain name"
Roland Häder [Sat, 4 Jan 2025 00:49:52 +0000 (01:49 +0100)]
Continued:
- some variables fixed (e.g. no row[domain] but source_domain does exist
- added some random sleep for fetch_observer() as they seem to block to quick
responses on automatic requests
Roland Häder [Tue, 1 Oct 2024 16:52:05 +0000 (18:52 +0200)]
Continued:
- added function update() for "model" obfuscation (module name and table name
must match as this is naming convention)
- added column 'last_used' to table 'obfuscation'
Roland Häder [Sat, 21 Sep 2024 23:13:57 +0000 (01:13 +0200)]
Continued:
- some parked domains return "200 OK" for all requests. This is understandable
in their view on things but it isn't standard-conform as 200 means document
found and not some fake content being returned
Roland Häder [Thu, 19 Sep 2024 17:24:02 +0000 (19:24 +0200)]
Continued:
- an empty string is not the same as None, that's correct. So both need to be
checked
- yes, first I check on false (missing keys, etc.) then true (positive outcome)
Roland Häder [Sun, 15 Sep 2024 10:35:19 +0000 (12:35 +0200)]
Continued:
- instances.delete() now has an optional parameter 'column' which
also needs validation on type and non-empty string
- some functions in same module didn't log optional/extra parameter 'column'
Roland Häder [Wed, 11 Sep 2024 23:29:52 +0000 (01:29 +0200)]
Continued:
- 'typeecho' sometimes provide a block list which has same API path as Fediverse
instances provide, so let's add it as a source
- removed nodeinfo_url from SQL query when searching for software during
fetch_blocks() command
Roland Häder [Tue, 3 Sep 2024 23:07:37 +0000 (01:07 +0200)]
Continued:
- don't log an info after a "filter function"
- initialize variable 'search' as both if() blocks use the same code
- check variable 'domain' before 'char' as 'char' needs to be in a supported
'domain' string
Roland Häder [Sat, 24 Aug 2024 17:53:18 +0000 (19:53 +0200)]
Continued:
- Diaspora seem to provide an API for more peers, so let's add it for command
fetch_instances()
- ... and yes, that long query isn't a good idea
Roland Häder [Tue, 13 Aug 2024 21:22:01 +0000 (23:22 +0200)]
Continued:
- script is rejecting "reject" now in favor of "rejected" as there is
"suspended" and "silenced" (past) already around
- Please run `$ sqlite3 blocks.db "UPDATE blocks SET block_level = 'rejected' WHERE block_level = 'reject';"`