Roland Häder [Mon, 12 Jun 2023 09:22:57 +0000 (11:22 +0200)]
Continued:
- introduced instances.deobsure() for simple deobscuring attempts, e.g. when
they use * or ? when they don't want to show the domain, you can still
deobsfucate it with the hash (some provide it) or obscured domain itself
Roland Häder [Mon, 12 Jun 2023 02:48:04 +0000 (04:48 +0200)]
WIP:
- rewrote from out-dated federater blocklist to multiple up-to-date oliphant
blocklists
- also prepared for local file support (documentation prepared)
Roland Häder [Sun, 11 Jun 2023 17:59:08 +0000 (19:59 +0200)]
Continued:
- also cut off trailing double-dot (some people cannot format their data in
tables properly)
- a wildcat might be at the start of the string, so start checking there for it
Roland Häder [Sun, 11 Jun 2023 17:09:53 +0000 (19:09 +0200)]
Continued:
- reason['reason'] had been handled to tidyup.reason() which caused an error
- it needed to be flexible "detected": str, dict are only supported types for now
Roland Häder [Sun, 11 Jun 2023 16:31:22 +0000 (18:31 +0200)]
Continued:
- fixed handling of 404 (no exception) case when nodeinfo wasn't found
- copied (WIP!) fetching /about page to pleroma
- also added /about to /about/more as possible pages for misskey
Roland Häder [Sun, 11 Jun 2023 15:57:51 +0000 (17:57 +0200)]
Continued:
- .arpa domains are reverse-ip-address domains and should not be used generally
- please choose a proper domain name, e.g. lemmy.myhomepage.tld
Roland Häder [Sun, 11 Jun 2023 13:20:43 +0000 (15:20 +0200)]
Continued:
- removed another broad except block
- added missing variable initialization
- there is no 'domain', aka. instance here
- fixed bare-except, you can use 'if foo in bar' instead
Roland Häder [Sun, 11 Jun 2023 12:49:07 +0000 (14:49 +0200)]
Continued:
- handle typical network exceptions here, too
- don't sys.exit() here anymore, exit function properly
- don't 'break' here, there was no loop, better return proper error code
- fixed a few problems, found by pylint
Roland Häder [Sat, 10 Jun 2023 16:50:26 +0000 (18:50 +0200)]
Continued:
- caught more specific exception and not broad BaseException (still some are
left)
- renamed variable blocks -> blocking to avoid confusion with imported
fba.blocks
Roland Häder [Sat, 10 Jun 2023 14:29:43 +0000 (16:29 +0200)]
WIP:
- introduced network.fetch_api_url() which takes a whole URL (not domain/path
separated) and returns it's reply in a json_reply dictionary as both other
API functions are handling it
Roland Häder [Fri, 9 Jun 2023 21:29:18 +0000 (23:29 +0200)]
Continued:
- removed remains of code around pending_errors dictionary
- rewrote it towards instances.update_last_error()
- also rewrote/removed some try/except blocks
Roland Häder [Fri, 9 Jun 2023 17:52:11 +0000 (19:52 +0200)]
Continued:
- renamed fba/federation/ -> fba/networks/ to make room for ...
- added fba.federation.py module which has generic functions for federation
- introduced fba/locking.py module
- renamed aqcuire_lock() -> aqcuire()
- added locking.release()
- introduced fba/helpers/dict.py and tidyup.py
- renamed tidyu_*() to tidyup.*()
- this all-in-all was an attempt to fix cyclic imports, still some are left
Roland Häder [Fri, 9 Jun 2023 09:57:40 +0000 (11:57 +0200)]
Continued:
- renaming 'exception' to 'exc' didn't fix the problem, I thought here about
overlapping/overwriting definitions
- but pylint3 would have it shown anyway
Roland Häder [Fri, 9 Jun 2023 08:21:38 +0000 (10:21 +0200)]
Continued:
- ignored more files (tracing, coverage)
- rewrote towards fba.csrf.determine() so it will always be determined, causes
another request unfortunately
- or can we somehow save the cookie jar ?
- logging of errors can now be disabled for debug purposes
Roland Häder [Fri, 9 Jun 2023 03:32:23 +0000 (05:32 +0200)]
Continued:
- the repository is more up-to-date, let's fetch this instead
- had to parse the markdown code back to HTML to be able to traverse with
existing code over it
Roland Häder [Fri, 9 Jun 2023 00:50:37 +0000 (02:50 +0200)]
Fixed some issues found by pylint:
- added pylint.rc file (all checks are enabled)
- '!= None' should be 'is not None'
- '== None' should be 'is None'
- '!= type' should be 'not isinstance(var, type)'
- fixed some 'unused variable'
- fixed 'duplicate definition'
- fixed 'invalid name'
- fixed f"foo" with no {var} in it
- renamed more variables
Roland Häder [Thu, 8 Jun 2023 23:58:53 +0000 (01:58 +0200)]
Continued:
- added command 'fetch_federater' which fetches a CSV file from github
- if software is null, attempt to determine it
- renamed get_url() to fetch_url()
Roland Häder [Thu, 8 Jun 2023 18:03:43 +0000 (20:03 +0200)]
Continued:
- some block reasons have a long domain list (which can be taken as
instance names, too) with no space after a comma
- this causes the web page to be very(!) wide
- added missing "import inspect"
- improved some debug messages
Roland Häder [Thu, 8 Jun 2023 16:50:52 +0000 (18:50 +0200)]
Continued:
- also tidyup reason after fetching from instance
- moved validating domain to upper if/elif blocks
- re-color website to more friendlier colors
- rewrote some debug lines