From 691f31fbe3b5a0970b6d6a163883701e15dd602b Mon Sep 17 00:00:00 2001 From: Gamotiv <49294700+Gamotiv@users.noreply.github.com> Date: Sat, 14 Aug 2021 16:18:33 +0200 Subject: [PATCH] commented out the results output to txt file --- twintgui.py | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) 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)