Skip to content
This repository was archived by the owner on Jun 30, 2018. It is now read-only.

Commit 4789c80

Browse files
committed
Minor cleanups , double flushing fix
1 parent 86f5846 commit 4789c80

5 files changed

Lines changed: 11 additions & 81 deletions

File tree

App/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ app.post('/form', function(req, res) {
4343
var pyshell = new PythonShell('scripts/script.py',options);
4444

4545
pyshell.on('message', function (message) {
46-
console.log('messege: '+message);
46+
//console.log('messege: '+ message);
4747
res.send(message);
4848
});
4949

App/debug.log

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,6 @@
156156
[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)
157157
[0522/144133.683:ERROR:exception_snapshot_win.cc(88)] thread ID 22432 not found in process
158158
[0522/144133.683:WARNING:crash_report_exception_handler.cc(62)] ProcessSnapshotWin::Initialize failed
159+
[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)
160+
[0522/192533.577:ERROR:exception_snapshot_win.cc(88)] thread ID 3532 not found in process
161+
[0522/192533.577:WARNING:crash_report_exception_handler.cc(62)] ProcessSnapshotWin::Initialize failed

App/scripts/script.py

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -394,74 +394,6 @@ def globalNews(info,handleCount):
394394
websites["successful"].append("Global News")
395395

396396

397-
##def kijiji(price,dateFrom,dateTo,title,description,postalCode,street,organizerPhone):
398-
#### driver.execute_script("window.open('https://www.kijiji.ca/t-login.html?targetUrl=L3Atc2VsZWN0LWNhdGVnb3J5Lmh0bWw/Y2F0ZWdvcnlJZD0yODkmdXNlclJlZ2lzdGVyZWQ9dHJ1ZV54Tk1KeU9ySTA5U0Z3MDdzS213OC93PT0',
399-
#### 'new window')")
400-
##
401-
## try:
402-
## usernameField = driver.find_element_by_id("LoginEmailOrNickname")
403-
## except NoSuchElementException:
404-
## print('Username field ID changed')
405-
##
406-
## usernameField.send_keys(username)
407-
##
408-
## try:
409-
## passwordField = driver.find_element_by_id("login-password")
410-
## except NoSuchElementException:
411-
## print('Password field ID changed')
412-
##
413-
## passwordField.send_keys(password)
414-
## passwordField.submit()
415-
##
416-
## try:
417-
## myElem = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, 'FormLocationPicker')))
418-
## except TimeoutException:
419-
## print ("Loading took too much time!")
420-
##
421-
## element = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.LINK_TEXT, "British Columbia")))
422-
## element.click()
423-
## element = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.LINK_TEXT, "Greater Vancouver Area")))
424-
## element.click()
425-
## element = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.LINK_TEXT, "Vancouver")))
426-
## element.click()
427-
##
428-
## form = driver.find_element_by_id("PageSelect")
429-
## form.click()
430-
## try:
431-
## priceField = driver.find_element_by_id("PriceAmount")
432-
## priceField.send_keys(price)
433-
##
434-
## dateField = driver.find_element_by_id("SelectDate")
435-
## dateField.send_keys(dateFrom)
436-
##
437-
## dateToField = driver.find_element_by_id("SelectDateTo")
438-
## dateToField.send_keys(dateTo)
439-
##
440-
## titleField = driver.find_element_by_id("postad-title")
441-
## titleField.send_keys(title)
442-
##
443-
## descriptionField = driver.find_element_by_id("pstad-descrptn")
444-
## descriptionField.send_keys(description)
445-
##
446-
## postalCodeField = driver.find_element_by_id("PostalCode")
447-
## postalCodeField.send_keys(postalCode)
448-
##
449-
## streetField = driver.find_element_by_id("pstad-map-address")
450-
## streetField.send_keys(street)
451-
##
452-
## numberField = driver.find_element_by_id("PhoneNumber")
453-
## numberField.send_keys(organizerPhone)
454-
## except:
455-
## websites['unsuccessful'].append("Kijiji")
456-
## else:
457-
## try:
458-
## driver.implicitly_wait(10)
459-
## driver.find_element_by_id("SelectDate")
460-
## websites['unsuccessful'].append("Kijiji")
461-
## except NoSuchElementException:
462-
## websites['successful'].append("Kijiji")
463-
464-
465397
def metroVancouver(info,handleCount):
466398
try:
467399
title = info['event_title']
@@ -1014,17 +946,12 @@ def main():
1014946
input = sys.argv[1]
1015947
info = json.loads(input)
1016948

1017-
## f = open('C:/Users/Nadeem AbdelAziz/Desktop/Extracurriculars/sample.json', "r")
1018-
## s = f.read()
1019-
## info = json.loads(s)
1020-
1021949

1022950
functions = {
1023951
"Eventful": eventful,
1024952
"Youth Core": youthCore,
1025953
"Planet Friendly":planetFriendly,
1026954
"Global News": globalNews,
1027-
## "Kijiji": kijiji,
1028955
"Metro Vancouver": metroVancouver,
1029956
"City of North Van Community": cnv,
1030957
"Ubyssey": ubyssey,
@@ -1041,10 +968,8 @@ def main():
1041968
pass
1042969

1043970

1044-
sys.stdout.flush()
1045971
print(json.dumps(websites))
1046972
sys.stdout.flush()
1047-
## quit()
1048973

1049974

1050975

App/views/error.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<!-- Mete data-->
55
<meta charset="utf-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7-
<link rel="icon" href="favicon.ico">
7+
<link rel="icon" href="css/favicon.ico">
88

99

1010
<!-- Style Sheets-->
@@ -15,8 +15,8 @@
1515
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
1616
<link rel = "stylesheet" href = "https://fonts.googleapis.com/icon?family=Material+Icons">
1717
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/css/bootstrap-select.min.css">
18-
<link rel="stylesheet" type="text/css" href="materialize/css/materialize.css">
19-
<link rel="stylesheet" type="text/css" href="style.css">
18+
<link rel="stylesheet" type="text/css" href="css/materialize/css/materialize.css">
19+
<link rel="stylesheet" type="text/css" href="css/tyle.css">
2020
<link href='https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900' rel='stylesheet' type='text/css'>
2121
<!-- Scripts -->
2222
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>

App/views/landing.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,17 @@
4444
<h2 class="title-h2a">Succesful Websites</h2>
4545
<ul id="successful-web">
4646
</ul>
47-
<h2 class="title-h2b">*These websites were sussecfully completed , Please double check the inputed data in each website <br>
47+
<h2 class="title-h2b">*These websites were sussecfully completed
48+
<br>Please double check the inputed data in each website <br>
4849
(By visiting the opened chrome tabs) and submit each form individually.</h2>
4950
</div>
5051

5152
<div class="col-lg-6">
5253
<h2 class="title-h2a">Unsuccesful Websites</h2>
5354
<ul id="unsuccessful-web">
5455
</ul>
55-
<h2 class="title-h2b">*Something went wrong , we are unsure what happened with these websites</h2>
56+
<h2 class="title-h2b">*Something went wrong
57+
<br> we are unsure what happened with these websites</h2>
5658
</div>
5759
</div>
5860
</div>

0 commit comments

Comments
 (0)