Skip to content

Commit

Permalink
Merge pull request #32 from NoPlagiarism/fix_ao
Browse files Browse the repository at this point in the history
Change AnonymousOverflow source to JSON
  • Loading branch information
ManeraKai authored Aug 25, 2024
2 parents e6f7bb7 + 30bd0b1 commit cb17cdb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
- LibreTranslate: [https://github.com/LibreTranslate/LibreTranslate#mirrors](https://github.com/LibreTranslate/LibreTranslate#mirrors)
- Send: [https://github.com/timvisee/send-instances](https://github.com/timvisee/send-instances)
- Dumb: [https://raw.githubusercontent.com/rramiachraf/dumb/main/instances.json](https://raw.githubusercontent.com/rramiachraf/dumb/main/instances.json)
- AnonymousOverflow: [https://github.com/httpjamesm/AnonymousOverflow#clearnet-instances](https://github.com/httpjamesm/AnonymousOverflow#clearnet-instances)
- AnonymousOverflow: [https://raw.githubusercontent.com/httpjamesm/AnonymousOverflow/main/instances.json](https://raw.githubusercontent.com/httpjamesm/AnonymousOverflow/main/instances.json)
- Wikiless: [https://web.archive.org/web/20220929180821/https://codeberg.org/orenom/wikiless](https://web.archive.org/web/20220929180821/https://codeberg.org/orenom/wikiless) + [https://github.com/Metastem/wikiless/wiki/Instances](https://github.com/Metastem/wikiless/wiki/Instances)
- BiblioReads: [https://github.com/nesaku/BiblioReads/blob/main/instances.json](https://github.com/nesaku/BiblioReads/blob/main/instances.json)
- Suds: [https://git.vern.cc/cobra/Suds/src/branch/main/instances.json](https://git.vern.cc/cobra/Suds/src/branch/main/instances.json)
Expand Down
22 changes: 16 additions & 6 deletions services/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,22 @@ def jiti(mightyList):


def anonymousOverflow(mightyList):
fetchRegexList(
'anonymousOverflow',
'https://raw.githubusercontent.com/httpjamesm/AnonymousOverflow/main/README.md',
r"\| \[(?:[^\s\/]+\.)+[a-zA-Z0-9]+\]\((https?:\/{2}(?:[^\s\/]+\.)+[a-zA-Z0-9]+)\/?\) +\|",
mightyList
)
try:
r = requests.get('https://raw.githubusercontent.com/httpjamesm/AnonymousOverflow/main/instances.json')
rJson: dict = r.json()
all_instances = dict()
for net_type, x_instances in rJson.items():
x_res = [x['url'].strip("/") for x in x_instances]
all_instances[{
'clearnet': 'clearnet',
'onion': 'tor',
'i2p': 'i2p',
'loki': 'loki'
}[net_type]] = x_res
mightyList['anonymousOverflow'] = all_instances
except Exception:
fetchCache('anonymousOverflow', mightyList)
logging.error(traceback.format_exc())


def proxitok(mightyList):
Expand Down

0 comments on commit cb17cdb

Please sign in to comment.