page_view.main()   A
last analyzed

Complexity

Conditions 3

Size

Total Lines 8
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 3
nop 0
1
#!/usr/bin/env python3
2
"""
3
Phishing Blocker Project - Analytics
4
5
(c)2020 Star Inc.(https://starinc.xyz).
6
===
7
    This Source Code Form is subject to the terms of the Mozilla Public
8
    License, v. 2.0. If a copy of the MPL was not distributed with this
9
    file, You can obtain one at http://mozilla.org/MPL/2.0/.
10
===
11
"""
12
13
import asyncio
14
import sys
15
16
sys.path.append("..")
17
from libs import Analytics
18
19
20
async def main():
21
    config = "../config.ini"
22
    handle = Analytics(config)
23
    if len(sys.argv) != 2:
24
        handle.stop()
25
        sys.exit()
26
    async for x in handle.view_survey.analyze(sys.argv[1]):
27
        print(x)
28
29
30
if __name__ == "__main__":
31
    asyncio.run(main())
32