commented out the results output to txt file

This commit is contained in:
Gamotiv
2021-08-14 16:18:33 +02:00
parent 0869f9d017
commit 691f31fbe3

View File

@@ -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)