From f56733ca03e46d3bf154b947db53c83f80b8057d Mon Sep 17 00:00:00 2001 From: BobIsMyManager Date: Sat, 9 Apr 2022 09:19:13 +0000 Subject: Automatic send instance fetching (#174) --- src/instances/get_instances.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/instances/get_instances.py') diff --git a/src/instances/get_instances.py b/src/instances/get_instances.py index 4fe3bc9c..790cd25b 100644 --- a/src/instances/get_instances.py +++ b/src/instances/get_instances.py @@ -35,6 +35,16 @@ mightyList['invidious'] = invidiousList print(Fore.GREEN + 'fetched ' + Style.RESET_ALL + 'Invidious') +# Send +r = requests.get('https://gitlab.com/timvisee/send-instances/-/raw/master/README.md') +tmp = re.findall(r"- ([-a-zA-Z0-9@:%_\+.~#?&//=]{2,}\.[a-z0-9]{2,}\b(?:\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?)\)*\|*[A-Z]{0,}", r.text) +sendList = {} +sendList['normal'] = [] +for item in tmp: + sendList['normal'].append(item) +mightyList['send'] = sendList +print('fetched Send') + # Nitter r = requests.get('https://github.com/zedeus/nitter/wiki/Instances') soup = BeautifulSoup(r.text, 'html.parser') -- cgit 1.4.1