Fixed issues with / and added manual entry of EAN

This commit is contained in:
2021-04-18 16:40:15 +02:00
parent 647301068f
commit 162923becf
3 changed files with 76 additions and 7 deletions

View File

@@ -23,19 +23,28 @@ class MyServer(BaseHTTPRequestHandler):
tme = tme.split('<div data-nx-container="inread"><!-- INREAD --></div>')[1]
tme = tme.split('img src="https://ssl.ofdb.de/images/shim.gif" width="1" height="10" border="0" alt=""></td>')[0]
tme = tme.split('<i>Vorab-Eintr&auml;ge:</i>')[1]
tme = tme.split(",SHADOW,true)\"><b>")[1]
tme = tme.split("</b></a><br>")[0]
print(tme)
if("Keine Ergebnisse" in tme):
print("Non vorab")
tme = x.text
tme = tme.split('<div data-nx-container="inread"><!-- INREAD --></div>')[1]
tme = tme.split('img src="https://ssl.ofdb.de/images/shim.gif" width="1" height="10" border="0" alt=""></td>')[0]
tme = tme.split(",SHADOW,true)\"><b>")[1]
tme = tme.split("</b></a><br>")[0]
print(tme)
else:
tme = tme.split(",SHADOW,true)\"><b>")[1]
tme = tme.split("</b></a><br>")[0]
#tme = tme.split('</b></a><br>')[0]
tme = tme[:len(tme)-7]
except IndexError:
except IndexError as ex:
self.send_response(500)
self.send_header("Content-type", "text/html")
self.end_headers()
self.wfile.write(bytes("Invalid EAN", "utf-8"))
print(ex)
else:
self.send_response(200)
self.send_header("Content-type", "text/html")
self.send_header("Content-type", "text/plain")
self.end_headers()
self.wfile.write(bytes(tme, "utf-8"))
elif(self.path.startswith("/?eanMulti=")):