Skip to content

Commit

Permalink
Merge pull request #7 from Jigar3/master
Browse files Browse the repository at this point in the history
Added a script in python to print all jobs using github jobs api
  • Loading branch information
gauthamzz authored Jan 13, 2018
2 parents 0e3ac91 + dd783b5 commit 306b237
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Solutions/Jigar3/Task1/script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import requests, json
from bs4 import BeautifulSoup

print("Enter Job Description")
jobDes = raw_input()

print("Enter the Location")
location = raw_input()

obj = requests.get("https://jobs.github.com/positions.json?description="+jobDes+"&location="+location)

jsonObj = json.loads(obj.content)

if (jsonObj):
j=1
for i in jsonObj:
print("Job " + str(j) + " ==>\n")
print("Title: " + i['title'] + "\n")
print("Location: " + i['location'] + "\n")
print("Type: " + i["type"] + "\n")
soup1 = BeautifulSoup(i['description'], "lxml")
print("Description: " + soup1.get_text() + "\n")
soup2 = BeautifulSoup(i['how_to_apply'], "lxml")
print("How to Apply: " + soup2.get_text() + "\n")
print("Company: " + i["company"] + "\n")
print("Company Website: " + i["company_url"] + "\n")
j+=1
print("---------------------------------------------------------------------")
else:
print("No Jobs Found")

0 comments on commit 306b237

Please sign in to comment.