diff --git a/twintgui.py b/twintgui.py index ea1a4b6..aaa6863 100644 --- a/twintgui.py +++ b/twintgui.py @@ -3,32 +3,30 @@ import sys from PySide6 import * +from PySide6 import QtWidgets from PySide6.QtUiTools import QUiLoader import twint from PySide6.QtWidgets import QApplication, QPushButton from PySide6.QtCore import Slot -import os +import os + #Ggsya made this :D def backslash(): return('\ '[0]) -def check_and_create_dir(path): - if os.path.exists(path): - print('Dir already exists') - print('Exiting') - - - else: - os.mkdir(path) - - +#def check_and_create_dir(path): + # if os.path.exists(path): + # print('Dir already exists') + # print('Exiting') + # else: + # os.mkdir(path) def tweet_search(): - print(window.Keyword) + #checking if output folder exists - check_and_create_dir(os.getcwd() + '/output') + # check_and_create_dir(os.getcwd() + '\output') search = window.Keyword.toPlainText() city = window.City.toPlainText() @@ -50,8 +48,8 @@ def tweet_search(): #c.Username = #filename becomes the file path - filename = os.getcwd() + '/output' + '/' + window.Filename.toPlainText() + '.txt' - c.Output = filename + #filename = os.getcwd() + '\output' + backslash() + window.Filename.toPlainText() + '.txt' + #c.Output = filename twint.run.Search(c)