|
@@ -5,12 +5,14 @@ import urllib
|
|
|
import sys
|
|
|
import os
|
|
|
import codecs
|
|
|
+import html
|
|
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.post("/items")
|
|
|
async def read_item(search_query: str = Form(...)):
|
|
|
- unq=search_query.decode("utf-8")
|
|
|
+ unq=html.unescape(search_query)
|
|
|
+# unq=search_query.decode("utf-8")
|
|
|
print(unq)
|
|
|
fw=codecs.open('/tmp/script.txt','w','utf-8')
|
|
|
fw.write(unq)
|