added config folder to git

This commit is contained in:
2024-05-30 12:13:40 +01:00
parent a3cbc3df63
commit a2c3fabfe9
15 changed files with 556 additions and 3 deletions

View File

@@ -0,0 +1,18 @@
from lxml import html
import requests
# Request the page
try:
page = requests.get('https://wiki.limbosolutions.com/index.php/P%C3%A1gina_principal', timeout=2)
# Parsing the page
# (We need to use page.content rather than
# page.text because html.fromstring implicitly
# expects bytes as input.)
tree = html.fromstring(page.content)
# Get element using XPath
buyers = tree.xpath('string(//html//head//meta//@content)')
print("{\"status\":\"On\",\"version\":\"" + buyers + "\"}")
except:
print("{\"status\":\"error\"}")