Skip to content

Commit 4954b71

Browse files
author
Kyran
committed
updated how toast notifications work
now uses release from this pull request of win10toast: jithurjacob/Windows-10-Toast-Notifications#38
1 parent 1d4273c commit 4954b71

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

app/WebScraper.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import requests
44
from bs4 import BeautifulSoup
55
from app import toaster
6+
import webbrowser
67

78

89
class WebScraper:
@@ -31,11 +32,17 @@ def getSite(self):
3132
temp = listing.find_all('span')
3233
job_employer = temp[7].span.a.string
3334

34-
winToastDisplay(job_name, job_employer)
35+
job_link = 'http://seek.co.nz' + temp[0].div.get('href')
36+
print(job_link)
37+
38+
winToastDisplay(job_name, job_employer, job_link)
3539
break
3640
else:
3741
break
3842

3943

40-
def winToastDisplay(job_name, job_employer):
41-
toaster.show_toast(job_name, job_employer)
44+
def winToastDisplay(job_name, job_employer, job_link):
45+
toaster.show_toast(job_name, job_employer, callback_on_click=lambda: open_link(job_link))
46+
47+
def open_link(job_link):
48+
webbrowser.open(job_link, new=2)

main.ico

260 KB
Binary file not shown.

run - console.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from app import webscraperInstance
22
from infi.systray import SysTrayIcon
3-
hover_text = "SysTrayIcon Demo"
3+
hover_text = "Seek Job Postings"
44

55

66
def close(sysTrayIcon):

run.pyw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from app import webscraperInstance
22
from infi.systray import SysTrayIcon
3-
hover_text = "SysTrayIcon Demo"
3+
hover_text = "Seek Job Postings"
44

55

66
def close(sysTrayIcon):

0 commit comments

Comments
 (0)