diff --git a/classes/__pycache__/__init__.cpython-38.pyc b/classes/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..b93305c Binary files /dev/null and b/classes/__pycache__/__init__.cpython-38.pyc differ diff --git a/classes/__pycache__/users.cpython-38.pyc b/classes/__pycache__/users.cpython-38.pyc new file mode 100644 index 0000000..a5749bf Binary files /dev/null and b/classes/__pycache__/users.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/certifi/__pycache__/__init__.cpython-38.pyc b/env/lib/python3.7/site-packages/certifi/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..dac19a7 Binary files /dev/null and b/env/lib/python3.7/site-packages/certifi/__pycache__/__init__.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/certifi/__pycache__/core.cpython-38.pyc b/env/lib/python3.7/site-packages/certifi/__pycache__/core.cpython-38.pyc new file mode 100644 index 0000000..5e74942 Binary files /dev/null and b/env/lib/python3.7/site-packages/certifi/__pycache__/core.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/__init__.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..9a7cb21 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/__init__.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/big5freq.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/big5freq.cpython-38.pyc new file mode 100644 index 0000000..37ca5e7 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/big5freq.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/big5prober.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/big5prober.cpython-38.pyc new file mode 100644 index 0000000..261a161 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/big5prober.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/chardistribution.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/chardistribution.cpython-38.pyc new file mode 100644 index 0000000..e2370aa Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/chardistribution.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/charsetgroupprober.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/charsetgroupprober.cpython-38.pyc new file mode 100644 index 0000000..456d1ca Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/charsetgroupprober.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/charsetprober.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/charsetprober.cpython-38.pyc new file mode 100644 index 0000000..cdbc8a6 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/charsetprober.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/codingstatemachine.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/codingstatemachine.cpython-38.pyc new file mode 100644 index 0000000..98a3626 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/codingstatemachine.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/compat.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/compat.cpython-38.pyc new file mode 100644 index 0000000..f67d9c9 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/compat.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/cp949prober.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/cp949prober.cpython-38.pyc new file mode 100644 index 0000000..ef51fbe Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/cp949prober.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/enums.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/enums.cpython-38.pyc new file mode 100644 index 0000000..91bafe5 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/enums.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/escprober.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/escprober.cpython-38.pyc new file mode 100644 index 0000000..d5f6e37 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/escprober.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/escsm.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/escsm.cpython-38.pyc new file mode 100644 index 0000000..3b93a27 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/escsm.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/eucjpprober.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/eucjpprober.cpython-38.pyc new file mode 100644 index 0000000..075345c Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/eucjpprober.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/euckrfreq.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/euckrfreq.cpython-38.pyc new file mode 100644 index 0000000..ff51e50 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/euckrfreq.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/euckrprober.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/euckrprober.cpython-38.pyc new file mode 100644 index 0000000..4744505 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/euckrprober.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/euctwfreq.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/euctwfreq.cpython-38.pyc new file mode 100644 index 0000000..f99df4e Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/euctwfreq.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/euctwprober.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/euctwprober.cpython-38.pyc new file mode 100644 index 0000000..4ca8e96 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/euctwprober.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/gb2312freq.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/gb2312freq.cpython-38.pyc new file mode 100644 index 0000000..16e8927 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/gb2312freq.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/gb2312prober.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/gb2312prober.cpython-38.pyc new file mode 100644 index 0000000..bd3a137 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/gb2312prober.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/hebrewprober.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/hebrewprober.cpython-38.pyc new file mode 100644 index 0000000..594b313 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/hebrewprober.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/jisfreq.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/jisfreq.cpython-38.pyc new file mode 100644 index 0000000..8eb3b51 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/jisfreq.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/jpcntx.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/jpcntx.cpython-38.pyc new file mode 100644 index 0000000..b9f9ee4 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/jpcntx.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/langbulgarianmodel.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/langbulgarianmodel.cpython-38.pyc new file mode 100644 index 0000000..ce1fa43 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/langbulgarianmodel.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/langcyrillicmodel.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/langcyrillicmodel.cpython-38.pyc new file mode 100644 index 0000000..436f4b4 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/langcyrillicmodel.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/langgreekmodel.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/langgreekmodel.cpython-38.pyc new file mode 100644 index 0000000..acfc633 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/langgreekmodel.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/langhebrewmodel.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/langhebrewmodel.cpython-38.pyc new file mode 100644 index 0000000..60ef569 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/langhebrewmodel.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/langthaimodel.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/langthaimodel.cpython-38.pyc new file mode 100644 index 0000000..bd3e93b Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/langthaimodel.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/langturkishmodel.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/langturkishmodel.cpython-38.pyc new file mode 100644 index 0000000..f35375d Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/langturkishmodel.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/latin1prober.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/latin1prober.cpython-38.pyc new file mode 100644 index 0000000..305b647 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/latin1prober.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/mbcharsetprober.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/mbcharsetprober.cpython-38.pyc new file mode 100644 index 0000000..191e4c4 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/mbcharsetprober.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/mbcsgroupprober.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/mbcsgroupprober.cpython-38.pyc new file mode 100644 index 0000000..62dcbaa Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/mbcsgroupprober.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/mbcssm.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/mbcssm.cpython-38.pyc new file mode 100644 index 0000000..d2fec3d Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/mbcssm.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/sbcharsetprober.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/sbcharsetprober.cpython-38.pyc new file mode 100644 index 0000000..0e4c5e0 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/sbcharsetprober.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/sbcsgroupprober.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/sbcsgroupprober.cpython-38.pyc new file mode 100644 index 0000000..0888afd Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/sbcsgroupprober.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/sjisprober.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/sjisprober.cpython-38.pyc new file mode 100644 index 0000000..2f94596 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/sjisprober.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/universaldetector.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/universaldetector.cpython-38.pyc new file mode 100644 index 0000000..40a745c Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/universaldetector.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/utf8prober.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/utf8prober.cpython-38.pyc new file mode 100644 index 0000000..8213908 Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/utf8prober.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/chardet/__pycache__/version.cpython-38.pyc b/env/lib/python3.7/site-packages/chardet/__pycache__/version.cpython-38.pyc new file mode 100644 index 0000000..8fd697b Binary files /dev/null and b/env/lib/python3.7/site-packages/chardet/__pycache__/version.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/idna/__pycache__/__init__.cpython-38.pyc b/env/lib/python3.7/site-packages/idna/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..e363b94 Binary files /dev/null and b/env/lib/python3.7/site-packages/idna/__pycache__/__init__.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/idna/__pycache__/core.cpython-38.pyc b/env/lib/python3.7/site-packages/idna/__pycache__/core.cpython-38.pyc new file mode 100644 index 0000000..eb2dbe7 Binary files /dev/null and b/env/lib/python3.7/site-packages/idna/__pycache__/core.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/idna/__pycache__/idnadata.cpython-38.pyc b/env/lib/python3.7/site-packages/idna/__pycache__/idnadata.cpython-38.pyc new file mode 100644 index 0000000..67cc85c Binary files /dev/null and b/env/lib/python3.7/site-packages/idna/__pycache__/idnadata.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/idna/__pycache__/intranges.cpython-38.pyc b/env/lib/python3.7/site-packages/idna/__pycache__/intranges.cpython-38.pyc new file mode 100644 index 0000000..8779148 Binary files /dev/null and b/env/lib/python3.7/site-packages/idna/__pycache__/intranges.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/idna/__pycache__/package_data.cpython-38.pyc b/env/lib/python3.7/site-packages/idna/__pycache__/package_data.cpython-38.pyc new file mode 100644 index 0000000..f112200 Binary files /dev/null and b/env/lib/python3.7/site-packages/idna/__pycache__/package_data.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/pkg_resources/__pycache__/__init__.cpython-38.pyc b/env/lib/python3.7/site-packages/pkg_resources/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..b26af60 Binary files /dev/null and b/env/lib/python3.7/site-packages/pkg_resources/__pycache__/__init__.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/pkg_resources/__pycache__/py31compat.cpython-38.pyc b/env/lib/python3.7/site-packages/pkg_resources/__pycache__/py31compat.cpython-38.pyc new file mode 100644 index 0000000..1c920ae Binary files /dev/null and b/env/lib/python3.7/site-packages/pkg_resources/__pycache__/py31compat.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/pkg_resources/_vendor/__pycache__/__init__.cpython-38.pyc b/env/lib/python3.7/site-packages/pkg_resources/_vendor/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..72fcb52 Binary files /dev/null and b/env/lib/python3.7/site-packages/pkg_resources/_vendor/__pycache__/__init__.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/pkg_resources/_vendor/__pycache__/appdirs.cpython-38.pyc b/env/lib/python3.7/site-packages/pkg_resources/_vendor/__pycache__/appdirs.cpython-38.pyc new file mode 100644 index 0000000..0f3c4a7 Binary files /dev/null and b/env/lib/python3.7/site-packages/pkg_resources/_vendor/__pycache__/appdirs.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/pkg_resources/_vendor/__pycache__/pyparsing.cpython-38.pyc b/env/lib/python3.7/site-packages/pkg_resources/_vendor/__pycache__/pyparsing.cpython-38.pyc new file mode 100644 index 0000000..f87dabe Binary files /dev/null and b/env/lib/python3.7/site-packages/pkg_resources/_vendor/__pycache__/pyparsing.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/pkg_resources/_vendor/__pycache__/six.cpython-38.pyc b/env/lib/python3.7/site-packages/pkg_resources/_vendor/__pycache__/six.cpython-38.pyc new file mode 100644 index 0000000..39af44c Binary files /dev/null and b/env/lib/python3.7/site-packages/pkg_resources/_vendor/__pycache__/six.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/__about__.cpython-38.pyc b/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/__about__.cpython-38.pyc new file mode 100644 index 0000000..4bd0659 Binary files /dev/null and b/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/__about__.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/__init__.cpython-38.pyc b/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..a0d76f2 Binary files /dev/null and b/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/__init__.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/_compat.cpython-38.pyc b/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/_compat.cpython-38.pyc new file mode 100644 index 0000000..d5a451c Binary files /dev/null and b/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/_compat.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/_structures.cpython-38.pyc b/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/_structures.cpython-38.pyc new file mode 100644 index 0000000..27ec99e Binary files /dev/null and b/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/_structures.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/markers.cpython-38.pyc b/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/markers.cpython-38.pyc new file mode 100644 index 0000000..2b8a71c Binary files /dev/null and b/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/markers.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/requirements.cpython-38.pyc b/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/requirements.cpython-38.pyc new file mode 100644 index 0000000..0afc2bc Binary files /dev/null and b/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/requirements.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/specifiers.cpython-38.pyc b/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/specifiers.cpython-38.pyc new file mode 100644 index 0000000..9ae0818 Binary files /dev/null and b/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/specifiers.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/version.cpython-38.pyc b/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/version.cpython-38.pyc new file mode 100644 index 0000000..b80dd94 Binary files /dev/null and b/env/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__pycache__/version.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/pkg_resources/extern/__pycache__/__init__.cpython-38.pyc b/env/lib/python3.7/site-packages/pkg_resources/extern/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..5badf44 Binary files /dev/null and b/env/lib/python3.7/site-packages/pkg_resources/extern/__pycache__/__init__.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/requests/__pycache__/__init__.cpython-38.pyc b/env/lib/python3.7/site-packages/requests/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..2dc4a44 Binary files /dev/null and b/env/lib/python3.7/site-packages/requests/__pycache__/__init__.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/requests/__pycache__/__version__.cpython-38.pyc b/env/lib/python3.7/site-packages/requests/__pycache__/__version__.cpython-38.pyc new file mode 100644 index 0000000..eb0dee2 Binary files /dev/null and b/env/lib/python3.7/site-packages/requests/__pycache__/__version__.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/requests/__pycache__/_internal_utils.cpython-38.pyc b/env/lib/python3.7/site-packages/requests/__pycache__/_internal_utils.cpython-38.pyc new file mode 100644 index 0000000..8693309 Binary files /dev/null and b/env/lib/python3.7/site-packages/requests/__pycache__/_internal_utils.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/requests/__pycache__/adapters.cpython-38.pyc b/env/lib/python3.7/site-packages/requests/__pycache__/adapters.cpython-38.pyc new file mode 100644 index 0000000..982fc15 Binary files /dev/null and b/env/lib/python3.7/site-packages/requests/__pycache__/adapters.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/requests/__pycache__/api.cpython-38.pyc b/env/lib/python3.7/site-packages/requests/__pycache__/api.cpython-38.pyc new file mode 100644 index 0000000..96cb5bc Binary files /dev/null and b/env/lib/python3.7/site-packages/requests/__pycache__/api.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/requests/__pycache__/auth.cpython-38.pyc b/env/lib/python3.7/site-packages/requests/__pycache__/auth.cpython-38.pyc new file mode 100644 index 0000000..3cb76ff Binary files /dev/null and b/env/lib/python3.7/site-packages/requests/__pycache__/auth.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/requests/__pycache__/certs.cpython-38.pyc b/env/lib/python3.7/site-packages/requests/__pycache__/certs.cpython-38.pyc new file mode 100644 index 0000000..e42be4a Binary files /dev/null and b/env/lib/python3.7/site-packages/requests/__pycache__/certs.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/requests/__pycache__/compat.cpython-38.pyc b/env/lib/python3.7/site-packages/requests/__pycache__/compat.cpython-38.pyc new file mode 100644 index 0000000..0cbb8de Binary files /dev/null and b/env/lib/python3.7/site-packages/requests/__pycache__/compat.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/requests/__pycache__/cookies.cpython-38.pyc b/env/lib/python3.7/site-packages/requests/__pycache__/cookies.cpython-38.pyc new file mode 100644 index 0000000..bafd603 Binary files /dev/null and b/env/lib/python3.7/site-packages/requests/__pycache__/cookies.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/requests/__pycache__/exceptions.cpython-38.pyc b/env/lib/python3.7/site-packages/requests/__pycache__/exceptions.cpython-38.pyc new file mode 100644 index 0000000..7871fc0 Binary files /dev/null and b/env/lib/python3.7/site-packages/requests/__pycache__/exceptions.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/requests/__pycache__/hooks.cpython-38.pyc b/env/lib/python3.7/site-packages/requests/__pycache__/hooks.cpython-38.pyc new file mode 100644 index 0000000..6306570 Binary files /dev/null and b/env/lib/python3.7/site-packages/requests/__pycache__/hooks.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/requests/__pycache__/models.cpython-38.pyc b/env/lib/python3.7/site-packages/requests/__pycache__/models.cpython-38.pyc new file mode 100644 index 0000000..f9c4cdc Binary files /dev/null and b/env/lib/python3.7/site-packages/requests/__pycache__/models.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/requests/__pycache__/packages.cpython-38.pyc b/env/lib/python3.7/site-packages/requests/__pycache__/packages.cpython-38.pyc new file mode 100644 index 0000000..6d3d57c Binary files /dev/null and b/env/lib/python3.7/site-packages/requests/__pycache__/packages.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/requests/__pycache__/sessions.cpython-38.pyc b/env/lib/python3.7/site-packages/requests/__pycache__/sessions.cpython-38.pyc new file mode 100644 index 0000000..d752a21 Binary files /dev/null and b/env/lib/python3.7/site-packages/requests/__pycache__/sessions.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/requests/__pycache__/status_codes.cpython-38.pyc b/env/lib/python3.7/site-packages/requests/__pycache__/status_codes.cpython-38.pyc new file mode 100644 index 0000000..61373ff Binary files /dev/null and b/env/lib/python3.7/site-packages/requests/__pycache__/status_codes.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/requests/__pycache__/structures.cpython-38.pyc b/env/lib/python3.7/site-packages/requests/__pycache__/structures.cpython-38.pyc new file mode 100644 index 0000000..d54e1f0 Binary files /dev/null and b/env/lib/python3.7/site-packages/requests/__pycache__/structures.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/requests/__pycache__/utils.cpython-38.pyc b/env/lib/python3.7/site-packages/requests/__pycache__/utils.cpython-38.pyc new file mode 100644 index 0000000..e03b6b7 Binary files /dev/null and b/env/lib/python3.7/site-packages/requests/__pycache__/utils.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/__pycache__/__init__.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..eaad2d0 Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/__pycache__/__init__.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/__pycache__/_collections.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/__pycache__/_collections.cpython-38.pyc new file mode 100644 index 0000000..8722d25 Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/__pycache__/_collections.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/__pycache__/connection.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/__pycache__/connection.cpython-38.pyc new file mode 100644 index 0000000..921926c Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/__pycache__/connection.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/__pycache__/connectionpool.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/__pycache__/connectionpool.cpython-38.pyc new file mode 100644 index 0000000..8fd10ee Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/__pycache__/connectionpool.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/__pycache__/exceptions.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/__pycache__/exceptions.cpython-38.pyc new file mode 100644 index 0000000..6603ad7 Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/__pycache__/exceptions.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/__pycache__/fields.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/__pycache__/fields.cpython-38.pyc new file mode 100644 index 0000000..e782930 Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/__pycache__/fields.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/__pycache__/filepost.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/__pycache__/filepost.cpython-38.pyc new file mode 100644 index 0000000..27ed9df Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/__pycache__/filepost.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/__pycache__/poolmanager.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/__pycache__/poolmanager.cpython-38.pyc new file mode 100644 index 0000000..8d3318e Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/__pycache__/poolmanager.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/__pycache__/request.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/__pycache__/request.cpython-38.pyc new file mode 100644 index 0000000..9fe1c45 Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/__pycache__/request.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/__pycache__/response.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/__pycache__/response.cpython-38.pyc new file mode 100644 index 0000000..7d7cfdb Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/__pycache__/response.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/contrib/__pycache__/__init__.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/contrib/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..0312a8c Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/contrib/__pycache__/__init__.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/contrib/__pycache__/_appengine_environ.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/contrib/__pycache__/_appengine_environ.cpython-38.pyc new file mode 100644 index 0000000..2394837 Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/contrib/__pycache__/_appengine_environ.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/contrib/__pycache__/pyopenssl.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/contrib/__pycache__/pyopenssl.cpython-38.pyc new file mode 100644 index 0000000..fd116c5 Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/contrib/__pycache__/pyopenssl.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/contrib/__pycache__/socks.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/contrib/__pycache__/socks.cpython-38.pyc new file mode 100644 index 0000000..8db17c8 Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/contrib/__pycache__/socks.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/packages/__pycache__/__init__.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/packages/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..544a84f Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/packages/__pycache__/__init__.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/packages/__pycache__/six.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/packages/__pycache__/six.cpython-38.pyc new file mode 100644 index 0000000..8cdca3c Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/packages/__pycache__/six.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/packages/ssl_match_hostname/__pycache__/__init__.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/packages/ssl_match_hostname/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..884974e Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/packages/ssl_match_hostname/__pycache__/__init__.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/util/__pycache__/__init__.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..4fa9faa Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/__init__.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/util/__pycache__/connection.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/connection.cpython-38.pyc new file mode 100644 index 0000000..5110b05 Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/connection.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/util/__pycache__/queue.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/queue.cpython-38.pyc new file mode 100644 index 0000000..bae24a2 Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/queue.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/util/__pycache__/request.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/request.cpython-38.pyc new file mode 100644 index 0000000..1d73699 Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/request.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/util/__pycache__/response.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/response.cpython-38.pyc new file mode 100644 index 0000000..aa5196b Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/response.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/util/__pycache__/retry.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/retry.cpython-38.pyc new file mode 100644 index 0000000..63cdfc0 Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/retry.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/util/__pycache__/ssl_.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/ssl_.cpython-38.pyc new file mode 100644 index 0000000..43b348c Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/ssl_.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/util/__pycache__/timeout.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/timeout.cpython-38.pyc new file mode 100644 index 0000000..22b5c2e Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/timeout.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/util/__pycache__/url.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/url.cpython-38.pyc new file mode 100644 index 0000000..ea06cf6 Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/url.cpython-38.pyc differ diff --git a/env/lib/python3.7/site-packages/urllib3/util/__pycache__/wait.cpython-38.pyc b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/wait.cpython-38.pyc new file mode 100644 index 0000000..4de1c19 Binary files /dev/null and b/env/lib/python3.7/site-packages/urllib3/util/__pycache__/wait.cpython-38.pyc differ diff --git a/knd_bot.py b/knd_bot.py index adcd159..0a7e37c 100644 --- a/knd_bot.py +++ b/knd_bot.py @@ -10,41 +10,112 @@ from classes.users import Users # anwer_text = '{"question_chains":[{"id":6145,"questions":[{"id":6559,"question_components":[{"id":18850,"answer":[80634165],"answer_status":null,"end_time":1591866979,"start_time":1591866978},{"id":18851,"answer":{"location":[56.439337,36.557897]},"answer_status":null,"start_time":1591866873,"end_time":1591867165},{"id":18852,"answer":"1","answer_status":null,"start_time":1591867063,"end_time":1591867063}]}]},{"id":6147,"questions":[{"id":6561,"question_components":[{"id":18856,"answer":77,"answer_status":null,"end_time":1591867067,"start_time":1591867067},{"id":18857,"answer":[80639138],"answer_status":null,"end_time":1591867186,"start_time":1591867185}]}]},{"id":6147,"questions":[{"id":6561,"question_components":[{"id":18856,"answer":77,"answer_status":null,"end_time":1591867200,"start_time":1591867200},{"id":18857,"answer":[80639640],"answer_status":null,"end_time":1591867206,"start_time":1591867205}]}]},{"id":6147,"questions":[{"id":6561,"question_components":[{"id":18856,"answer":77,"answer_status":null,"end_time":1591867211,"start_time":1591867211},{"id":18857,"answer":[80640010],"answer_status":null,"end_time":1591867220,"start_time":1591867219}]}]},{"id":6147,"questions":[{"id":6561,"question_components":[{"id":18856,"answer":77,"answer_status":null,"end_time":1591867223,"start_time":1591867223},{"id":18857,"answer":[80640333],"answer_status":null,"end_time":1591867233,"start_time":1591867232}]}]}]}' + + + + +# anwer_text = '{"question_chains":[{"id":6145,"questions":[{"id":6559,"question_components":[]}]},{"id":6147,"questions":[{"id":6561,"question_components":[]}]},{"id":6147,"questions":[{"id":6561,"question_components":[]}]},{"id":6147,"questions":[{"id":6561,"question_components":[]}]},{"id":6147,"questions":[{"id":6561,"question_components":[]}]}]}' + # question_text = '' -def get_enterance_and_coord(session, headers, execution_id): - photo_id = send_image(session, headers, execution_id) - pass +#def get_enterance_and_coord(session, headers, execution_id): +# photo_id = send_image(session, headers, execution_id) +# pass def send_execution(task, session, headers): # answers_for_data = [{"id":6145,"questions":[{"id":6559,"question_components":[{"id":18850,"answer":[80634165],"answer_status":null,"end_time":1591866979,"start_time":1591866978},{"id":18851,"answer":{"location":[56.439337,36.557897]},"answer_status":null,"start_time":1591866873,"end_time":1591867165}]}]}] # print(task) # print(time.ctime(1592235230)) - get_questions(task.get('id'), session, headers) + string1 = '{"id":6145,"questions":[{"id":6559,"question_components":[{"id":18850,"answer":[80634165],"answer_status":null,"end_time":1591866979,"start_time":1591866978},{"id":18851,"answer":{"location":[56.439337,36.557897]},"answer_status":null,"start_time":1591866873,"end_time":1591867165},{"id":18852,"answer":"1","answer_status":null,"start_time":1591867063,"end_time":1591867063}]}]}' +# get_questions(task.get('id'), session, headers) + print(json.dumps(json.loads(string1), indent=4)) + def get_questions(id_task, session, headers): url = 'https://knd.mosreg.ru//api/v1/executions/'+str(id_task)+'/questions' questions = session.get(url, headers=headers) json_quest = questions.json() - for q in json_quest['selected_chains']: - print(q['id']) + return json_quest['selected_chains'] -def send_image(session, headers, url): + +def send_image(session, headers, url, photo): """Отправляем фото на сервер. Сервер должен вернуть id и url.""" files = { - 'image': ('1.jpg', open('1.jpg', 'rb')), + 'image': (photo[-5:], open(photo, 'rb')), } - img = session.post('https://knd.mosreg.ru//api/v1/executions/22515485/images', headers=headers, files=files) + img = session.post('https://knd.mosreg.ru//api/v1/executions/'+str(url)+'/images', headers=headers, files=files) return img.json() # print(img.headers) # print(img.text) # print(img.status_code) +def complete_task(session, headers, task, address): + photos = get_photo(address, headers['uid']) + if len(photos) > 0: + photos.sort() + questions = get_questions(task['id'], session, headers) + data = [] + for answers in questions: + answer_chain = { + 'id': answers['id'], + 'questions': []#answers['questions'] + } + if answer_chain['id'] == 6146: # Цепочка без ответов + continue + for components in answers['questions']: + comp = [] + q_c = { + 'id': components['id'], + 'question_components': [] + } + if q_c['id'] == 6560: # Вопрос без ответа + continue + comp.append(q_c) + answer_chain.update({'questions': comp}) + data.append(answer_chain) + if len(data) == len(photos): + print('1') + for chain in data: + for item in chain['questions']: + if len(data) == len(photos): + img = send_image(session, headers, task['id'], photos.pop(0)) + first = {"id": 18850, "answer": [img['id']], 'start_time': int(time.time())} + time.sleep(2) + first.update({'end_time': int(time.time())}) + second = {"id": 18851, "answer": {"location": task['coord']}} + item['question_components'].append(first) + item['question_components'].append(second) + else: + img = send_image(session, headers, task['id'], photos.pop(0)) + first = {"id": 18856, "answer": 77} + second = {"id": 18857, "answer": [img['id']]} + item['question_components'].append(first) + item['question_components'].append(second) + print(data) + else: + print(f"Несоответствие количества вопросов и количества фотографий по адресу: {address}") +# send_execution(task,session, headers) + + +def get_photo(address, email): + photos = [] + month = datetime.datetime.now().month + main_path = os.path.join(os.path.abspath('.'), 'data', email, str(month), address) + if not os.path.exists(main_path): + return photos + else: + for images in os.listdir(main_path): + photos.append(main_path + '/' + images) + return photos + + + + def get_addresses(email): addresses = [] month = datetime.datetime.now().month @@ -58,13 +129,14 @@ def get_addresses(email): return f"Ни одного адреса для пользователя {email} не найдено! Добавьте фото и запустите программу снова!" -def assign_task(session, headers, task): - task = session.put('https://knd.mofsreg.ru//api/v1/executions/'+str(task['id'])+'/assign', headers=headers) - if task.status_code == 200: - pass - else: - print(f"Не смогли получить задание {task['id']}!") - +def assign_task(session, headers, task, address): + complete_task(session, headers, task, address) + # DON'T START PROGRAM!!!! + #task = session.put('https://knd.mofsreg.ru//api/v1/executions/'+str(task['id'])+'/assign', headers=headers) + #if task.status_code == 200: + # pass + #else: + # print(f"Не смогли получить задание {task['id']}!") def get_task(session, headers): @@ -82,18 +154,28 @@ def get_task(session, headers): # Если адреса получили if isinstance(addresses, list): session_t = session - session_t.headers.update({'referer': 'https://knd.mosreg.ru/executions', 'x-platform': 'wb', 'accept': '*/*'}) + session_t.headers.update( + {'referer': 'https://knd.mosreg.ru/executions', + 'x-platform': 'wb', + 'accept': '*/*' + } + ) for address in addresses: - search = address + # need split enterance from address + search = 'Майданово п, Радищева ул, 73'#address[:-4] + print(search) data = {'search': search} - tasks = session_t.post('https://knd.mosreg.ru//api/v1/executions', headers=headers, data=data) + tasks = session_t.post('https://knd.mosreg.ru//api/v1/executions', + headers=headers, + data=data + ) json_tasks = tasks.json() # Если есть доступное задание с таким адресом if len(json_tasks['executions_available']) > 0: for n in json_tasks['executions_available']: coord = n['coord'] - enterance = n['tasks'] - for execution in enterance: + enterances = n['tasks'] + for execution in enterances: task = { 'id': execution['execution_id'], 'address': execution['dimensions'][0].get('entity_value_name'), @@ -101,7 +183,10 @@ def get_task(session, headers): 'coord': coord } # Принимаем задание - assign_task(session, headers, task) + if task['enterance'] == address[-2]: + assign_task(session, headers, task, address) + else: + print(f"Нет доступных заданий для по адресу: {address}!") # Если нет задания с таким адресом else: print(f"Нет доступных заданий для пользователя {headers['uid']} по адресу: {address}") @@ -128,7 +213,16 @@ def main(): 'uid': response.headers.get('uid'), } if response.status_code == 200: - get_task(session, headers) + task = { + 'id': 23607882, + 'address': 'Решетниково рп, ОПМС-1 проезд, 13', + 'enterance': 6, + 'coord': [56.442503, 36.5596493] + } + address = 'Решетниково рп, ОПМС-1 проезд, 13, 6п' + assign_task(session, headers, task, address) + break + # get_task(session, headers) else: print(f"Отказ в авторизации для пользователя {user['email']}!") time.sleep(1) @@ -196,6 +290,3 @@ def random_string(stringLength): # for s in json_question['selected_chains']: # for n in s['questions']: # print(n['question_components']) - - -