Skip to content

Commit 30bd0b1

Browse files
committed
Change AnonymousOverflow source to JSON
1 parent e6f7bb7 commit 30bd0b1

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
- LibreTranslate: [https://github.com/LibreTranslate/LibreTranslate#mirrors](https://github.com/LibreTranslate/LibreTranslate#mirrors)
2929
- Send: [https://github.com/timvisee/send-instances](https://github.com/timvisee/send-instances)
3030
- Dumb: [https://raw.githubusercontent.com/rramiachraf/dumb/main/instances.json](https://raw.githubusercontent.com/rramiachraf/dumb/main/instances.json)
31-
- AnonymousOverflow: [https://github.com/httpjamesm/AnonymousOverflow#clearnet-instances](https://github.com/httpjamesm/AnonymousOverflow#clearnet-instances)
31+
- AnonymousOverflow: [https://raw.githubusercontent.com/httpjamesm/AnonymousOverflow/main/instances.json](https://raw.githubusercontent.com/httpjamesm/AnonymousOverflow/main/instances.json)
3232
- 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)
3333
- BiblioReads: [https://github.com/nesaku/BiblioReads/blob/main/instances.json](https://github.com/nesaku/BiblioReads/blob/main/instances.json)
3434
- Suds: [https://git.vern.cc/cobra/Suds/src/branch/main/instances.json](https://git.vern.cc/cobra/Suds/src/branch/main/instances.json)

services/other.py

+16-6
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,22 @@ def jiti(mightyList):
182182

183183

184184
def anonymousOverflow(mightyList):
185-
fetchRegexList(
186-
'anonymousOverflow',
187-
'https://raw.githubusercontent.com/httpjamesm/AnonymousOverflow/main/README.md',
188-
r"\| \[(?:[^\s\/]+\.)+[a-zA-Z0-9]+\]\((https?:\/{2}(?:[^\s\/]+\.)+[a-zA-Z0-9]+)\/?\) +\|",
189-
mightyList
190-
)
185+
try:
186+
r = requests.get('https://raw.githubusercontent.com/httpjamesm/AnonymousOverflow/main/instances.json')
187+
rJson: dict = r.json()
188+
all_instances = dict()
189+
for net_type, x_instances in rJson.items():
190+
x_res = [x['url'].strip("/") for x in x_instances]
191+
all_instances[{
192+
'clearnet': 'clearnet',
193+
'onion': 'tor',
194+
'i2p': 'i2p',
195+
'loki': 'loki'
196+
}[net_type]] = x_res
197+
mightyList['anonymousOverflow'] = all_instances
198+
except Exception:
199+
fetchCache('anonymousOverflow', mightyList)
200+
logging.error(traceback.format_exc())
191201

192202

193203
def proxitok(mightyList):

0 commit comments

Comments
 (0)