commented out the results output to txt file
This commit is contained in:
28
twintgui.py
28
twintgui.py
@@ -3,32 +3,30 @@
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
from PySide6 import *
|
from PySide6 import *
|
||||||
|
from PySide6 import QtWidgets
|
||||||
from PySide6.QtUiTools import QUiLoader
|
from PySide6.QtUiTools import QUiLoader
|
||||||
import twint
|
import twint
|
||||||
from PySide6.QtWidgets import QApplication, QPushButton
|
from PySide6.QtWidgets import QApplication, QPushButton
|
||||||
from PySide6.QtCore import Slot
|
from PySide6.QtCore import Slot
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
#Ggsya made this :D
|
#Ggsya made this :D
|
||||||
def backslash():
|
def backslash():
|
||||||
return('\ '[0])
|
return('\ '[0])
|
||||||
|
|
||||||
def check_and_create_dir(path):
|
#def check_and_create_dir(path):
|
||||||
if os.path.exists(path):
|
# if os.path.exists(path):
|
||||||
print('Dir already exists')
|
# print('Dir already exists')
|
||||||
print('Exiting')
|
# print('Exiting')
|
||||||
|
# else:
|
||||||
|
# os.mkdir(path)
|
||||||
else:
|
|
||||||
os.mkdir(path)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def tweet_search():
|
def tweet_search():
|
||||||
print(window.Keyword)
|
|
||||||
#checking if output folder exists
|
#checking if output folder exists
|
||||||
check_and_create_dir(os.getcwd() + '/output')
|
# check_and_create_dir(os.getcwd() + '\output')
|
||||||
|
|
||||||
search = window.Keyword.toPlainText()
|
search = window.Keyword.toPlainText()
|
||||||
city = window.City.toPlainText()
|
city = window.City.toPlainText()
|
||||||
@@ -50,8 +48,8 @@ def tweet_search():
|
|||||||
#c.Username =
|
#c.Username =
|
||||||
|
|
||||||
#filename becomes the file path
|
#filename becomes the file path
|
||||||
filename = os.getcwd() + '/output' + '/' + window.Filename.toPlainText() + '.txt'
|
#filename = os.getcwd() + '\output' + backslash() + window.Filename.toPlainText() + '.txt'
|
||||||
c.Output = filename
|
#c.Output = filename
|
||||||
|
|
||||||
twint.run.Search(c)
|
twint.run.Search(c)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user