jobs.ch changed, so changed scrap implementation
This commit is contained in:
parent
45899d44e3
commit
5b78e29242
9
lib/conf
9
lib/conf
@ -1,8 +1,15 @@
|
|||||||
|
[python_qt_indeed]
|
||||||
|
USER = NONE
|
||||||
|
PW = NONE
|
||||||
|
LOGINURL = NONE
|
||||||
|
SCRAPURL = https://ch.indeed.com/jobs?q=python+qt&
|
||||||
|
TAG = Informatiker, Python, qt
|
||||||
|
|
||||||
[quereinsteiger_indeed]
|
[quereinsteiger_indeed]
|
||||||
USER = NONE
|
USER = NONE
|
||||||
PW = NONE
|
PW = NONE
|
||||||
LOGINURL = NONE
|
LOGINURL = NONE
|
||||||
SCRAPURL = https://ch.indeed.com/jobs?q=quereinsteiger+it&l=&from=searchOnDesktopSerp&vjk=7c069ecf7f0cabb6
|
SCRAPURL = https://ch.indeed.com/jobs?q=quereinsteiger+it
|
||||||
TAG = Informatiker, Quereinsteiger
|
TAG = Informatiker, Quereinsteiger
|
||||||
|
|
||||||
[jobs.ch_seilbahn]
|
[jobs.ch_seilbahn]
|
||||||
|
14
lib/gui.py
14
lib/gui.py
@ -100,6 +100,11 @@ class MainWindow(QMainWindow):
|
|||||||
self.view = QTableView()
|
self.view = QTableView()
|
||||||
self.view.setModel(self.model)
|
self.view.setModel(self.model)
|
||||||
|
|
||||||
|
self.proxymodel2 = QSortFilterProxyModel(self)
|
||||||
|
self.proxymodel2.setSourceModel(self.model)
|
||||||
|
self.view.setModel(self.proxymodel2)
|
||||||
|
self.setProxyViewSettings()
|
||||||
|
|
||||||
self.delegate = ColorDelegate(self)
|
self.delegate = ColorDelegate(self)
|
||||||
self.view.setItemDelegate(self.delegate)
|
self.view.setItemDelegate(self.delegate)
|
||||||
|
|
||||||
@ -133,8 +138,8 @@ class MainWindow(QMainWindow):
|
|||||||
self.view.setColumnWidth(5,10)
|
self.view.setColumnWidth(5,10)
|
||||||
self.view.hideColumn(7)
|
self.view.hideColumn(7)
|
||||||
self.view.setSortingEnabled(True)
|
self.view.setSortingEnabled(True)
|
||||||
self.sel_model = self.view.selectionModel()
|
#self.sel_model = self.view.selectionModel()
|
||||||
self.sel_model.selectionChanged.connect(self.cell_clicked)
|
#self.sel_model.selectionChanged.connect(self.cell_clicked)
|
||||||
|
|
||||||
def runWorker(self):
|
def runWorker(self):
|
||||||
self.thread = QThread()
|
self.thread = QThread()
|
||||||
@ -255,10 +260,7 @@ class MainWindow(QMainWindow):
|
|||||||
print("fetch iterations++")
|
print("fetch iterations++")
|
||||||
self.model.fetchMore()
|
self.model.fetchMore()
|
||||||
|
|
||||||
self.proxymodel2 = QSortFilterProxyModel(self)
|
|
||||||
self.proxymodel2.setSourceModel(self.model)
|
|
||||||
self.view.setModel(self.proxymodel2)
|
|
||||||
self.setProxyViewSettings()
|
|
||||||
self.view.show()
|
self.view.show()
|
||||||
class PWPrompt(QDialog):
|
class PWPrompt(QDialog):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -57,17 +57,18 @@ def scrap_jobs(url,entry,session):
|
|||||||
|
|
||||||
results = soup.find_all("div",attrs={'data-feat':'searched_jobs'})
|
results = soup.find_all("div",attrs={'data-feat':'searched_jobs'})
|
||||||
|
|
||||||
location_class = "P-sc-hyu5hk-0 Text__p2-sc-1lu7urs-10 Span-sc-1ybanni-0 Text__span-sc-1lu7urs-12 Text-sc-1lu7urs-13 jZCxUn"
|
location_class = "d_grid items_start gap_s12 grid-cols_[auto_1fr] px_s8"
|
||||||
location = item("p",location_class,0,"location")
|
location = item("div",location_class,0,"location")
|
||||||
ar_location = finder(results,location,LOCATION_CLEANUP=1)
|
ar_location = finder(results,location,GETCHILDREN='p',LOCATION_CLEANUP=1)
|
||||||
company_class = "P-sc-hyu5hk-0 Text__p2-sc-1lu7urs-10 Span-sc-1ybanni-0 Text__span-sc-1lu7urs-12 Text-sc-1lu7urs-13 jZCxUn"
|
|
||||||
|
company_class = "mb_s12 lastOfType:mb_s0 textStyle_p2"
|
||||||
company = item("p",company_class,0,"company")
|
company = item("p",company_class,0,"company")
|
||||||
ar_company = finder(results,company,DEFAULT=1,GETCHILDREN='strong')
|
ar_company = finder(results,company,DEFAULT=1,GETCHILDREN='strong')
|
||||||
|
|
||||||
title = item("span","jlFpCz",0,"TITLE")
|
title = item("span","text_link.brand.base",0,"TITLE")
|
||||||
ar_title = finder(results,title,DEFAULT=1)
|
ar_title = finder(results,title,DEFAULT=1)
|
||||||
|
|
||||||
date = item("span","Span-sc-1ybanni-0 Text__span-sc-1lu7urs-12 Text-sc-1lu7urs-13 krGudM hUhFmL",0,"date")
|
date = item("span","pos_absolute",0,"date")
|
||||||
ar_date = finder(results,date,CLEANDATE=1)
|
ar_date = finder(results,date,CLEANDATE=1)
|
||||||
|
|
||||||
link = item("a",{'data-cy' :'job-link'},0,"link")
|
link = item("a",{'data-cy' :'job-link'},0,"link")
|
||||||
|
@ -76,6 +76,7 @@ def login_loop(config_file,gui,worker):
|
|||||||
ret_login = 0
|
ret_login = 0
|
||||||
session = 0
|
session = 0
|
||||||
while (ret != 0):
|
while (ret != 0):
|
||||||
|
if gui:
|
||||||
worker.dialog_rejected = False
|
worker.dialog_rejected = False
|
||||||
ret = entry2 = config.readConfig(config_file,gui,worker)
|
ret = entry2 = config.readConfig(config_file,gui,worker)
|
||||||
print(entry2)
|
print(entry2)
|
||||||
@ -87,8 +88,11 @@ def login_loop(config_file,gui,worker):
|
|||||||
log("worker.dialog_rejected = ",worker.dialog_rejected)
|
log("worker.dialog_rejected = ",worker.dialog_rejected)
|
||||||
session = login(entry2)
|
session = login(entry2)
|
||||||
ret_login = entry2.input_pw(gui,entry2.user,worker)
|
ret_login = entry2.input_pw(gui,entry2.user,worker)
|
||||||
|
if gui:
|
||||||
if worker.dialog_rejected == False:
|
if worker.dialog_rejected == False:
|
||||||
choose_scraper(entry2,session)
|
choose_scraper(entry2,session)
|
||||||
|
if not gui:
|
||||||
|
choose_scraper(entry2,session)
|
||||||
|
|
||||||
def runner(entry,session,scrap_func,next_url_func):
|
def runner(entry,session,scrap_func,next_url_func):
|
||||||
i=0
|
i=0
|
||||||
|
Loading…
Reference in New Issue
Block a user