Programming

Programming/Python 웹 스크래퍼 만들기

Python selenium 활용해서 webscrapper 기초 제작 1

5.11 Recursive https://indeed.com/ indeed 역시 weworkremotely 사이트와 마찬가지로 구인구직 사이트 이다. weworkremotely 에서 했듯이 동작방법을 알아본다. 검색창에 python 을 검색하고 어떤 방식으로 동작하는지 알아본다. jobs?q= 부분에 검색하고 싶은 키워드를 입력하면 된다. 이전에 만들었던 main.py 파일로 들어가서 base_url → 검색에 필요한 최소 url search_term → 검색어(키워드) response → base_url 과 search_term 변수를 합친 전체 url status_code != 200 으로 접속한 웹페이지가 정상인지 확인 ( status_code 관련 게시물은 여기를 클릭 ) response.text..

Programming/Python 웹 스크래퍼 만들기

Python Refactor

5.10 Refactor Refactor : 결과의 변경 없이 코드의 구조를 재조정함. - 가독성을 높이고 유지보수를 편하게 한다. 코드를 삭제하기는 싫고 재사용하기 위해 아래 코드를 별도의 파일로 이동시키고 function 안에 넣으려고 한다. 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 websit..

Programming/Python 웹 스크래퍼 만들기

Python Beautifulsoup 복습

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..

Programming/Python 웹 스크래퍼 만들기

Python Beautifulsoup를 이용한 Saving Results

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..

Programming/Python 웹 스크래퍼 만들기

Python Job Extraction

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 데이터를 추출한다. ( 링크를 저장하기 위해 ) - 결국 필요한건..

Programming/Python 웹 스크래퍼 만들기

Python Job Posts

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") ..

Security Engineer
'Programming' 카테고리의 글 목록 (4 Page)