repo created

This commit is contained in:
2024-08-31 03:05:08 +01:00
commit 31241c00ee
12 changed files with 562 additions and 0 deletions

18
scripts/limbowiki_get_info.py Executable file
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\"}")