From 892f9595d27001cb98643ea8fbaa990178f08fd9 Mon Sep 17 00:00:00 2001 From: BobIsMyManager Date: Thu, 14 Jul 2022 10:00:58 +0100 Subject: data and blacklist only handled by ci --- .github/workflows/main.yml | 3 +-- .gitignore | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5d746e28..4ff79267 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,8 +29,7 @@ jobs: run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git add -A - git commit -m "update instances" -a || : + git commit -Am "update instances" || : - name: push changes uses: ad-m/github-push-action@v0.6.0 with: diff --git a/.gitignore b/.gitignore index a50c6bde..76962127 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ web-ext-artifacts/ .DS_Store nod node_modules -package-lock.json \ No newline at end of file +package-lock.json +src/instances/blacklist.json +src/instances/data.json -- cgit 1.4.1 From 981662fa4b6b888d212197972459ae64b34228d1 Mon Sep 17 00:00:00 2001 From: BobIsMyManager Date: Mon, 18 Jul 2022 10:28:03 +0100 Subject: No more trailing slashes --- src/instances/get_instances.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/instances/get_instances.py b/src/instances/get_instances.py index 098bc38b..2227a39b 100644 --- a/src/instances/get_instances.py +++ b/src/instances/get_instances.py @@ -14,13 +14,17 @@ mightyList = {} def filterLastSlash(urlList): - tmp = [] - for i in urlList: - if i.endswith('/'): - tmp.append(i[:-1]) - print(Fore.YELLOW + "Fixed " + Style.RESET_ALL + i) - else: - tmp.append(i) + tmp = {} + for x in urlList: + tmp[x] = {} + for y in urlList[x]: + tmp[x][y] = [] + for z in urlList[x][y]: + if z.endswith('/'): + tmp[x][y].append(z[:-1]) + print(Fore.YELLOW + "Fixed " + Style.RESET_ALL + z) + else: + tmp[x][y].append(z) return tmp @@ -177,7 +181,6 @@ def libreddit(): tmp = re.findall( r"\| \[.*\]\(([-a-zA-Z0-9@:%_\+.~#?&//=]{2,}\.[a-z]{2,}\b(?:\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?)\)*\|*[A-Z]{0,}.*\|.*\|", r.text) - tmp = filterLastSlash(tmp) for item in tmp: if item.endswith('.onion'): @@ -249,7 +252,6 @@ def quetre(): tmp = re.findall( r"\| \[.*\]\(([-a-zA-Z0-9@:%_\+.~#?&//=]{2,}\.[a-z]{2,}\b(?:\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?)\)*\|*[A-Z]{0,}.*\|.*\|", r.text) - tmp = filterLastSlash(tmp) for item in tmp: if item.endswith('.onion'): @@ -270,7 +272,6 @@ def libremdb(): tmp = re.findall( r"\| ([-a-zA-Z0-9@:%_\+.~#?&//=]{2,}\.[a-z]{2,}\b(?:\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?)*\|*[A-Z]{0,}.*\|.*\|", r.text) - tmp = filterLastSlash(tmp) for item in tmp: if item.strip() == "": @@ -433,6 +434,7 @@ linvgatranslate() searx_searxng() whoogle() rimgo() +mightyList = filterLastSlash(mightyList) cloudflare = [] authenticate = [] -- cgit 1.4.1