diff --git a/App/app.js b/App/app.js index 7311d88..bafa79d 100644 --- a/App/app.js +++ b/App/app.js @@ -43,7 +43,7 @@ app.post('/form', function(req, res) { var pyshell = new PythonShell('scripts/script.py',options); pyshell.on('message', function (message) { - console.log('messege: '+message); + //console.log('messege: '+ message); res.send(message); }); diff --git a/App/debug.log b/App/debug.log index d2ac3a0..6876b29 100644 --- a/App/debug.log +++ b/App/debug.log @@ -156,3 +156,6 @@ [0522/144133.682:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022) [0522/144133.683:ERROR:exception_snapshot_win.cc(88)] thread ID 22432 not found in process [0522/144133.683:WARNING:crash_report_exception_handler.cc(62)] ProcessSnapshotWin::Initialize failed +[0522/192533.577:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022) +[0522/192533.577:ERROR:exception_snapshot_win.cc(88)] thread ID 3532 not found in process +[0522/192533.577:WARNING:crash_report_exception_handler.cc(62)] ProcessSnapshotWin::Initialize failed diff --git a/App/scripts/script.py b/App/scripts/script.py index c9d6ecf..f344a0b 100644 --- a/App/scripts/script.py +++ b/App/scripts/script.py @@ -394,74 +394,6 @@ def globalNews(info,handleCount): websites["successful"].append("Global News") -##def kijiji(price,dateFrom,dateTo,title,description,postalCode,street,organizerPhone): -#### driver.execute_script("window.open('https://www.kijiji.ca/t-login.html?targetUrl=L3Atc2VsZWN0LWNhdGVnb3J5Lmh0bWw/Y2F0ZWdvcnlJZD0yODkmdXNlclJlZ2lzdGVyZWQ9dHJ1ZV54Tk1KeU9ySTA5U0Z3MDdzS213OC93PT0', -#### 'new window')") -## -## try: -## usernameField = driver.find_element_by_id("LoginEmailOrNickname") -## except NoSuchElementException: -## print('Username field ID changed') -## -## usernameField.send_keys(username) -## -## try: -## passwordField = driver.find_element_by_id("login-password") -## except NoSuchElementException: -## print('Password field ID changed') -## -## passwordField.send_keys(password) -## passwordField.submit() -## -## try: -## myElem = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, 'FormLocationPicker'))) -## except TimeoutException: -## print ("Loading took too much time!") -## -## element = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.LINK_TEXT, "British Columbia"))) -## element.click() -## element = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.LINK_TEXT, "Greater Vancouver Area"))) -## element.click() -## element = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.LINK_TEXT, "Vancouver"))) -## element.click() -## -## form = driver.find_element_by_id("PageSelect") -## form.click() -## try: -## priceField = driver.find_element_by_id("PriceAmount") -## priceField.send_keys(price) -## -## dateField = driver.find_element_by_id("SelectDate") -## dateField.send_keys(dateFrom) -## -## dateToField = driver.find_element_by_id("SelectDateTo") -## dateToField.send_keys(dateTo) -## -## titleField = driver.find_element_by_id("postad-title") -## titleField.send_keys(title) -## -## descriptionField = driver.find_element_by_id("pstad-descrptn") -## descriptionField.send_keys(description) -## -## postalCodeField = driver.find_element_by_id("PostalCode") -## postalCodeField.send_keys(postalCode) -## -## streetField = driver.find_element_by_id("pstad-map-address") -## streetField.send_keys(street) -## -## numberField = driver.find_element_by_id("PhoneNumber") -## numberField.send_keys(organizerPhone) -## except: -## websites['unsuccessful'].append("Kijiji") -## else: -## try: -## driver.implicitly_wait(10) -## driver.find_element_by_id("SelectDate") -## websites['unsuccessful'].append("Kijiji") -## except NoSuchElementException: -## websites['successful'].append("Kijiji") - - def metroVancouver(info,handleCount): try: title = info['event_title'] @@ -1014,17 +946,12 @@ def main(): input = sys.argv[1] info = json.loads(input) -## f = open('C:/Users/Nadeem AbdelAziz/Desktop/Extracurriculars/sample.json', "r") -## s = f.read() -## info = json.loads(s) - functions = { "Eventful": eventful, "Youth Core": youthCore, "Planet Friendly":planetFriendly, "Global News": globalNews, -## "Kijiji": kijiji, "Metro Vancouver": metroVancouver, "City of North Van Community": cnv, "Ubyssey": ubyssey, @@ -1041,10 +968,8 @@ def main(): pass - sys.stdout.flush() print(json.dumps(websites)) sys.stdout.flush() -## quit() diff --git a/App/views/error.html b/App/views/error.html index 139c902..31ee147 100755 --- a/App/views/error.html +++ b/App/views/error.html @@ -4,7 +4,7 @@ - + @@ -15,8 +15,8 @@ - - + + diff --git a/App/views/landing.html b/App/views/landing.html index e8cd5fe..cd10627 100755 --- a/App/views/landing.html +++ b/App/views/landing.html @@ -44,7 +44,8 @@

Succesful Websites

-

*These websites were sussecfully completed , Please double check the inputed data in each website
+

*These websites were sussecfully completed +
Please double check the inputed data in each website
(By visiting the opened chrome tabs) and submit each form individually.

@@ -52,7 +53,8 @@

*These websites were sussecfully completed , Please double

Unsuccesful Websites

-

*Something went wrong , we are unsure what happened with these websites

+

*Something went wrong +
we are unsure what happened with these websites