-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgui.py
36 lines (30 loc) · 927 Bytes
/
gui.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
import webview
import re
import time
from collections import defaultdict
from datetime import datetime
import praw
import requests
from praw.models import MoreComments
from redditParser import RedditParser
import passwords
import polygonWrapper
reddit = praw.Reddit(
client_id=passwords.client_id,
client_secret=passwords.client_secret,
user_agent=passwords.user_agent
)
rparser = RedditParser(reddit)
subreddits = ["stocks", "SPACs", "wallstreetbets", "options"]
window = None
#API that we expose to javascript
class Api:
def __init__(self):
''''''
def startParser(self):
rparser.getRedditStockData(subreddits, printMe="all",
limit=10000, time_filter="day", window=window)
print("parsing complete")
api = Api()
window = webview.create_window('Meme Stock', './webResources/index.html',js_api=api)
webview.start(debug=True,http_server=False,gui="cef")