Skip to content

Commit

Permalink
Fix Quetre
Browse files Browse the repository at this point in the history
  • Loading branch information
NoPlagiarism committed Jul 11, 2024
1 parent c93c5af commit 278f268
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions parser/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<onion>{Regex.DOMAIN_ONION})|(?P<i2p>{Regex.DOMAIN_I2P})|(?P<domain>{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<onion>{Regex.DOMAIN_ONION})|(?P<i2p>{Regex.DOMAIN_I2P})|(?P<domain>{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<domain>{Regex.DOMAIN})]\(https?:\/\/{Regex.DOMAIN}\)\s+\|\s+(?P<region>[^\|]+)\|\s+(?P<provider>[^\|]+)\s+\|\s+(?P<note>[^\|]+)\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<domain>{Regex.DOMAIN_ONION})]\(https?:\/\/{Regex.DOMAIN_ONION}\)\s+\|\s+(?P<region>[^\|]+)\|\s+(?P<provider>[^\|]+)\s+\|\s+(?P<note>[^\|]+)\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<domain>[^\]]+)]\(https?:\/\/{Regex.DOMAIN_I2P}\)\s+\|\s+(?P<region>[^\|]+)\|\s+(?P<provider>[^\|]+)\s+\|\s+(?P<note>[^\|]+)\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<domain>{Regex.DOMAIN}+)\]\((?P<url>https?:\/\/{Regex.DOMAIN})\)+(?:\s+\(official\))?\s+\|\s+(?P<flagemoji>\W+)\s+(?P<country>\w+)\s+\|\s+(?P<provider>(?:[^\|])+)\s*\|\s+(?P<data>(?:[^\|])+)\s+\|(?P<notes>(?:[^\|])+)\|"),
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<domain>{Regex.DOMAIN_ONION})\]\((?P<url>https?:\/\/{Regex.DOMAIN_ONION})\)+(?:\s+\(official\))?\s+\|\s+(?P<data>(?:[^\|])+)\s+\|(?P<notes>(?:[^\|])+)\|"),
Expand Down

0 comments on commit 278f268

Please sign in to comment.