Skip to content
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 Arpit's solution to task 1 #64

Merged
merged 7 commits into from
Feb 1, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions Solutions/arpitmisraw/Task1/task1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import requests
from bs4 import BeautifulSoup

description = input("Enter Description: ")
location = input("Enter Location: ")
loc = list(location.split(" "))
location = ""
for loc_element in loc:
location += "+" + loc_element

url = "https://jobs.github.com/positions?description=" + description + "&location=" + location
resp = requests.get(url)

html = resp.text
soup = BeautifulSoup(html)


title = soup.select('.title h4 a')

for job_title in title:
print("\n\n" + job_title.getText() + "\n")
url_job = "https://jobs.github.com" + job_title.get('href')
job_req = requests.get(url_job)
job_html = job_req.text
job_soup = BeautifulSoup(job_html)
info = job_soup.select('.column.main')
link = job_soup.select('.highlighted a')
for job_info in info:
print(job_info.getText())
print("\nApply here: " + link[0].get('href'))
print("\n\n")