mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 17:34:49 +08:00
from __future__ import annotations (#2464)
* from __future__ import annotations * fixup! from __future__ import annotations * fixup! from __future__ import annotations * fixup! Format Python code with psf/black push Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
"""
|
||||
Scraping jobs given job title and location from indeed website
|
||||
"""
|
||||
from typing import Generator, Tuple
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Generator
|
||||
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
@ -9,7 +11,7 @@ from bs4 import BeautifulSoup
|
||||
url = "https://www.indeed.co.in/jobs?q=mobile+app+development&l="
|
||||
|
||||
|
||||
def fetch_jobs(location: str = "mumbai") -> Generator[Tuple[str, str], None, None]:
|
||||
def fetch_jobs(location: str = "mumbai") -> Generator[tuple[str, str], None, None]:
|
||||
soup = BeautifulSoup(requests.get(url + location).content, "html.parser")
|
||||
# This attribute finds out all the specifics listed in a job
|
||||
for job in soup.find_all("div", attrs={"data-tn-component": "organicJob"}):
|
||||
|
Reference in New Issue
Block a user