|
@@ -1,9 +1,27 @@
|
1
|
1
|
import curses
|
|
2
|
+from html.parser import HTMLParser
|
|
3
|
+from mastodon import Mastodon
|
|
4
|
+
|
|
5
|
+class PostParser(HTMLParser):
|
|
6
|
+ def handle_starttag(self, tag, attrs):
|
|
7
|
+ print(tag)
|
|
8
|
+
|
|
9
|
+mastodon = Mastodon(
|
|
10
|
+ access_token = 'd100.club_usercred.secret',
|
|
11
|
+ api_base_url = 'd100.club'
|
|
12
|
+)
|
|
13
|
+
|
|
14
|
+print(mastodon.timeline()[0]["content"])
|
|
15
|
+
|
2
|
16
|
|
3
|
17
|
def main(stdscr):
|
4
|
18
|
stdscr.clear()
|
|
19
|
+ curses.halfdelay(10)
|
5
|
20
|
i = 'c'
|
6
|
|
- while i != 'q':
|
7
|
|
- i = stdscr.getkey()
|
|
21
|
+ q = 0
|
|
22
|
+ con = True
|
|
23
|
+ while con:
|
|
24
|
+ i = stdscr.getch()
|
|
25
|
+ con = (i != ord('q'))
|
8
|
26
|
|
9
|
|
-curses.wrapper(main)
|
|
27
|
+#curses.wrapper(main)
|