26 lines
524 B
Python
Executable File
26 lines
524 B
Python
Executable File
#!/bin/python3
|
|
import requests
|
|
import bs4
|
|
import re
|
|
from config import *
|
|
|
|
c = []
|
|
page = bs4.BeautifulSoup(requests.get(URL).text, 'html.parser')
|
|
|
|
# Keys
|
|
for i in page.find_all('dl'):
|
|
i = i.find('strong')
|
|
if i != None:
|
|
c.append(i.get_text())
|
|
|
|
VIM_KEY_HL_STR = VIM_KEY_HL_STR.replace("%s", ' '.join(c))
|
|
print(VIM_KEY_HL_STR)
|
|
|
|
# Values
|
|
c = set()
|
|
for i in re.finditer(r'\(in configuration: (\w+)\)', page.get_text()):
|
|
c.update([i.group(1)])
|
|
|
|
VIM_VAL_HL_STR = VIM_VAL_HL_STR.replace("%s", ' '.join(c))
|
|
print(VIM_VAL_HL_STR)
|