5.9 Recap Beautifulsoup를 이용하여 웹사이트의 HTML 데이터를 가져왔었다. https://weworkremotely.com/ We Work Remotely: Remote jobs in design, programming, marketing and more Find the most qualified people in the most unexpected places: Hire remote! We Work Remotely is the best place to find and list remote jobs that aren't restricted by commutes or a particular geographic area. Browse thousands..
5.8 Saving Results 이전 게시물에서 weworkremotely posts 에서 href 데이터(구인정보 링크)를 추출하여 각 링크에 대한 구인 정보를 company, kind, region, job title 을 출력했다. 이전까지 진행한 코드 from requests import get from bs4 import BeautifulSoup base_url = "https://weworkremotely.com/remote-jobs/search?utf8=%E2%9C%93&term=" search_term = "python" response = get(f'{base_url}{search_term}') if response.status_code != 200: print("Can't request..
5.7 Job Extraction https://weworkremotely.com/remote-jobs/search?utf8=%E2%9C%93&term=python We Work Remotely: Advanced Remote Job Search Advanced job search for We Work Remotely, allowing you to search and refine jobs across programming, marketing, customer service, etc. Find your next remote career. weworkremotely.com weworkremotely posts 에서 데이터를 추출해본다. href 데이터를 추출한다. ( 링크를 저장하기 위해 ) - 결국 필요한건..
5.6 Job Posts 웹사이트의 job 정보를 가져 오려 할 때 list 의 각 항목에 대한 코드를 실행할 때는 무엇을 써야할까? ( for 문을 사용해야 한다. ) 일단 jobs 클래스를 가진 section이 몇 개 인지 확인해본다. from requests import get from bs4 import BeautifulSoup base_url = "https://weworkremotely.com/remote-jobs/search?utf8=%E2%9C%93&term=" search_term = "python" response = get(f'{base_url}{search_term}') if response.status_code != 200: print("Can't request website") ..
5.5 Keyword Arguments 이전에 beautifulsoup 를 사용해서 class_ = "jobs" 에 해당하는 웹사이트 HTML 코드를 가져왔었다. from requests import get from bs4 import BeautifulSoup base_url = "https://weworkremotely.com/remote-jobs/search?utf8=%E2%9C%93&term=" search_term = "python" response = get(f'{base_url}{search_term}') if response.status_code != 200: print("Can't request website") else: soup = BeautifulSoup(response.text,'h..
5.4 BeautifulSoup 아래 코드로 weworkremotely 웹사이트의 python 구인정보를 가져왔다. from requests import get base_url = "https://weworkremotely.com/remote-jobs/search?utf8=%E2%9C%93&term=" search_term = "python" response = get(f'{base_url}{search_term}') if response.status_code != 200: print("Can't request website") else: print(response.text) jobs 라는 class 를 가진 section 을 찾아 추출한다. 그리고 section 에 있는 ul 안에서 모든 li 를 찾는..