From 278f268716fe6383afc4a45d129fb152917361fa Mon Sep 17 00:00:00 2001 From: NoPlagiarism <37241775+NoPlagiarism@users.noreply.github.com> Date: Fri, 12 Jul 2024 03:08:27 +0500 Subject: [PATCH] Fix Quetre --- parser/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parser/main.py b/parser/main.py index db88607..ce9236c 100644 --- a/parser/main.py +++ b/parser/main.py @@ -564,9 +564,9 @@ def get_clearnet_base(path): RegexCroppedFromUrlInstance(relative_filepath_without_ext=Network.ONION, regex_group="onion", url="https://git.sr.ht/~edwardloveall/scribe/blob/HEAD/docs/instances.md", crop_from="# Instances", crop_to="## ", regex_pattern=fr"[\<\(]https?:\/\/(?:(?P{Regex.DOMAIN_ONION})|(?P{Regex.DOMAIN_I2P})|(?P{Regex.DOMAIN}))[\>\)]"), RegexCroppedFromUrlInstance(relative_filepath_without_ext=Network.I2P, regex_group="i2p", url="https://git.sr.ht/~edwardloveall/scribe/blob/HEAD/docs/instances.md", crop_from="# Instances", crop_to="## ", regex_pattern=fr"[\<\(]https?:\/\/(?:(?P{Regex.DOMAIN_ONION})|(?P{Regex.DOMAIN_I2P})|(?P{Regex.DOMAIN}))[\>\)]"))), InstancesGroupData(name="Quetre", home_url="https://github.com/zyachel/quetre#readme", relative_filepath_without_ext="quora/quetre", - instances=(RegexCroppedFromUrlInstance(relative_filepath_without_ext=Network.CLEARNET, crop_from="1. Clearnet", crop_to="2. Onion", url="https://raw.githubusercontent.com/zyachel/quetre/main/README.md", regex_pattern=fr"\|\s+\[(https?:\/\/)?(?P{Regex.DOMAIN})]\(https?:\/\/{Regex.DOMAIN}\)\s+\|\s+(?P[^\|]+)\|\s+(?P[^\|]+)\s+\|\s+(?P[^\|]+)\s+\|"), - RegexCroppedFromUrlInstance(relative_filepath_without_ext=Network.ONION, crop_from="2. Onion", crop_to="3. I2P", url="https://raw.githubusercontent.com/zyachel/quetre/main/README.md", regex_pattern=fr"\|\s+\[(https?:\/\/)?(?P{Regex.DOMAIN_ONION})]\(https?:\/\/{Regex.DOMAIN_ONION}\)\s+\|\s+(?P[^\|]+)\|\s+(?P[^\|]+)\s+\|\s+(?P[^\|]+)\s+\|"), - RegexCroppedFromUrlInstance(relative_filepath_without_ext=Network.I2P, crop_from="3. I2P", crop_to="---", url="https://raw.githubusercontent.com/zyachel/quetre/main/README.md", regex_pattern=fr"\|\s+\[(https?:\/\/)?(?P[^\]]+)]\(https?:\/\/{Regex.DOMAIN_I2P}\)\s+\|\s+(?P[^\|]+)\|\s+(?P[^\|]+)\s+\|\s+(?P[^\|]+)\s+\|"))), + instances=(JSONUsingCallableInstance(relative_filepath_without_ext=Network.CLEARNET, url="https://raw.githubusercontent.com/zyachel/quetre/main/instances.json", json_handle=lambda raw: tuple(map(get_domain_from_url, [x['clearnet'] for x in raw if 'clearnet' in x]))), + JSONUsingCallableInstance(relative_filepath_without_ext=Network.ONION, url="https://raw.githubusercontent.com/zyachel/quetre/main/instances.json", json_handle=lambda raw: tuple(map(get_domain_from_url, [x['tor'] for x in raw if 'tor' in x]))), + JSONUsingCallableInstance(relative_filepath_without_ext=Network.I2P, url="https://raw.githubusercontent.com/zyachel/quetre/main/instances.json", json_handle=lambda raw: tuple(map(get_domain_from_url, [x['i2p'] for x in raw if 'i2p' in x]))))), InstancesGroupData(name="rimgo", home_url="https://codeberg.org/video-prize-ranch/rimgo#rimgo", relative_filepath_without_ext="imgur/rimgo", instances=(RegexFromUrlInstance(relative_filepath_without_ext=Network.CLEARNET, url="https://codeberg.org/rimgo/instances/raw/branch/main/README.md", regex_pattern=fr"\|\s+\[(?P{Regex.DOMAIN}+)\]\((?Phttps?:\/\/{Regex.DOMAIN})\)+(?:\s+\(official\))?\s+\|\s+(?P\W+)\s+(?P\w+)\s+\|\s+(?P(?:[^\|])+)\s*\|\s+(?P(?:[^\|])+)\s+\|(?P(?:[^\|])+)\|"), RegexCroppedFromUrlInstance(relative_filepath_without_ext=Network.ONION, url="https://codeberg.org/rimgo/instances/raw/branch/main/README.md", crop_from="### Tor", crop_to="###", regex_pattern=fr"\|\s+\[(?P{Regex.DOMAIN_ONION})\]\((?Phttps?:\/\/{Regex.DOMAIN_ONION})\)+(?:\s+\(official\))?\s+\|\s+(?P(?:[^\|])+)\s+\|(?P(?:[^\|])+)\|"),