init commit

This commit is contained in:
prod-tech
2024-11-17 02:31:42 +03:00
commit cf933c770c
217 changed files with 19340 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
import logging
from aiohttp import ClientSession
async def get_nalog_data(ofd_string: str) -> dict:
async with ClientSession() as session:
url = 'https://proverkacheka.com/api/v1/check/get'
data = {'qrraw': ofd_string, 'token': '{{sensitive_data}}'}
response = await session.post(
url=url,
data=data,
headers={
'Content-Type': (
'application/x-www-form-urlencoded;' ' charset=UTF-8'
)
},
)
if response.status != 200:
logging.error('Received non-200 status on ofd check')
return
data = await response.json()
if data['code'] == 1:
return data
logging.error(
f'Received non-success status on ofd request with data: {data}'
)
return