-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added codes to extract job description snippet #9
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,16 +19,26 @@ def indeed_job_search(): | |
browser.implicitly_wait(5) | ||
|
||
search_results = browser.find_elements_by_xpath('//h2/a') | ||
|
||
search_descriptions=browser.find_elements_by_xpath('//div[@class="summary"]') | ||
|
||
descriptions=[] | ||
for element in search_descriptions: | ||
job_description=element.text | ||
descriptions.append(job_description) | ||
|
||
file = open("job_search.txt", 'a') | ||
file.write("\n") | ||
|
||
|
||
index=0 | ||
for job_element in search_results: | ||
|
||
job_title = job_element.text | ||
job_link = job_element.get_attribute('href') | ||
|
||
|
||
file.write("%s | link: %s | description: %s \n" %(job_title, job_link, descriptions[index])) | ||
Comment on lines
+24
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you refactor to make this section one for loop instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I will make the changes, and can you tell how to pull the latest upstream? I'm new to open source and don't have much idea on it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @btapash Sure, just follow these steps: add link to upstream in your local repo
you can confirm the upstream was added by running
pull main branch from the upstream to update your local repo
now make your changes on your branch and push the changes to Github There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi, Any updates? @btapash There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is some problem with my laptop, it is in service centre for repairing. I can do it after a week or you can assign someone else. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay no problem thanks for letting me know. I'll unassign you to leave it open. If its still open when your laptop is fixed you can try again. |
||
index=index+1 | ||
|
||
file.write("%s | link: %s \n" %(job_title, job_link)) | ||
|
||
browser.close() | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format code added to match surrounding code. Add whitespace around operators. For example, edit "search_descriptions=browser" to be "search_descriptions = browser"