Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Commit

Permalink
no geckodriver log, new goals in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ToasterUwU committed Mar 14, 2021
1 parent 0999073 commit 7e7b161
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Everyone should be able to use it just fine.
- Linux:
- Instead of downloading the installer, you download the linux.zip file
- Unpack the zip
- Open a console in the folder of Anti-Scalp
- Open a console in the new folder of Anti-Scalp
- "sudo apt install firefox-geckodriver"
- "sudo apt install python3-pip"
- "sudo pip3 install -r requirements.txt"
Expand All @@ -82,7 +82,10 @@ If you need any help with using Anti-Scalp, join the [discord server](https://di

## What comes in the future

- [ ] Autoupdate selectors.json
- [ ] Tutorial video for the ones that are not so good with tech
- [ ] Easier way to add links then making a .txt file in a folder
- [ ] Alternative ways of notification from sound and opening (For example: Discord Webhooks, SMS, Email)
- [ ] Auto configuration for new shops


Expand Down
16 changes: 10 additions & 6 deletions anti-scalp.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import time
import webbrowser
from difflib import SequenceMatcher
from itertools import cycle
from typing import Callable, Iterable, List
from typing import Callable, Iterable

import playsound
import requests
Expand Down Expand Up @@ -110,7 +110,7 @@ class Broswer():
self.options.headless = headless
if bin_path:
self.options.binary_location = bin_path
test_driver = webdriver.Firefox(options=self.options)
test_driver = webdriver.Firefox(options=self.options, service_log_path=os.devnull)
except:
if not chrome_failed:
self.browser = "chrome"
Expand Down Expand Up @@ -196,7 +196,7 @@ class Broswer():
profile = webdriver.FirefoxProfile()
profile.set_preference("permissions.default.image", 2)

self.driver = webdriver.Firefox(options=self.options, firefox_profile=profile)
self.driver = webdriver.Firefox(options=self.options, firefox_profile=profile, service_log_path=os.devnull)

elif self.browser == "chrome":
chrome_prefs = {}
Expand Down Expand Up @@ -699,8 +699,11 @@ class GUI():
playsound.playsound("alert.wav", block=False)

def change_sound(self):
filename = QFileDialog().getOpenFileName(filter="*.mp3 *.wav")[0]
shutil.copy2(PATH+filename, PATH+"alert."+filename.rsplit(".", 1)[1])
try:
filename = QFileDialog().getOpenFileName(filter="*.mp3 *.wav")[0]
shutil.copy2(PATH+filename, PATH+"alert."+filename.rsplit(".", 1)[1])
except:
pass

def reset_sound(self):
if os.path.exists(PATH+"alert.mp3"):
Expand Down Expand Up @@ -732,6 +735,7 @@ class GUI():
for name, p_box in self.product_check_boxes.items():
if name not in ap:
p_box.setDisabled(True)
p_box.setChecked(False)
else:
p_box.setDisabled(False)

Expand Down Expand Up @@ -781,7 +785,7 @@ class GUI():
webbrowser.open("https://github.com/ToasterUwU/Anti-Scalp")

def open_links_folder(self):
webbrowser.open(__file__.replace("\\", "/").rsplit("/", 1)[0]+"/links")
webbrowser.open(PATH+"/links")

gui = GUI()
gui.mainloop()

0 comments on commit 7e7b161

Please sign in to comment.