-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAttentionSeekers.py
executable file
·69 lines (61 loc) · 1.63 KB
/
AttentionSeekers.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
username = str(input("What is your Instagram Username?"))
password = str(input("What is your Instagram Password?"))
from kivy.app import App
from kivy.uix.gridlayout import GridLayout
from kivy.uix.label import Label
from kivy.uix.camera import Camera
from kivy.lang import Builder
from kivy.uix.button import Button
from InstagramAPI import InstagramAPI
import pyrebase
import time
import math
import datetime
Builder.load_string('''
<ScannerScreen>:
rows: 2
Label:
id: current_user
text: ''
font_size: 78
halign: 'left'
valign: 'top'
padding: (15, 15)
size: self.texture_size
Label:
id: best_time
text: ''
font_size: 78
halign: 'left'
valign: 'top'
padding: (15, 15)
size: self.texture_size
Camera:
id: camera
resolution: (640, 480)
play: True
Button:
text: 'Calculate Best Time to Post'
bold: True
font_name: 'Montserrat-Light.otf'
font_size: 55
on_press: root.scan()
''')
class ScannerScreen(GridLayout):
def __init__(self, **kwargs):
super(ScannerScreen, self).__init__(**kwargs)
api.getProfileData()
g = api.LastJson()
name = g['user']['full_name']
loggedin_user = self.ids['current_user']
loggedin_user.text = name
pass
def scan(self):
pass
class MyApp(App):
def build(self):
return ScannerScreen()
if __name__ == '__main__':
api = InstagramAPI(username, password)
api.login()
MyApp().run()