Skip to content

Instantly share code, notes, and snippets.

@Abhayparashar31
Last active July 7, 2020 06:29
Show Gist options
  • Save Abhayparashar31/41ad547893141721c5f756493ff0e2f7 to your computer and use it in GitHub Desktop.
Save Abhayparashar31/41ad547893141721c5f756493ff0e2f7 to your computer and use it in GitHub Desktop.
import requests
from bs4 import BeautifulSoup
name = input("Job name:\n").replace(" ","-")
city = input("City name:\n")
state = input("State name:\n")
res = requests.get(f'https://www.indeed.co.in/{name}-jobs-in-{city},-{state}')
soup = BeautifulSoup(res.text,'html.parser')
job_name = soup.select('.jobtitle')
for i in range(len(job_name)):
job_name = soup.select('.jobtitle')[i].getText()
job_company = soup.select('.company')[i].getText()
job_location = soup.select('.location')[i].getText()
money = soup.select('.salaryText')[i].getText()
print(f'{job_name} {job_company} {job_location} {money}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment