인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

treksis0603's profile image
treksis0603

asked

The Most Powerful Crawling Technology Today: Mastering Scrapy and Selenium

Note: Get seeko articles using XPATH and Selenium (changed to reference video due to closure of the site)

seeko 싸이트 xpath 이렇게 하면 작동함

Written on

·

339

0

싸이트가 좀 달라졌어요

seleniumscrapy웹-크롤링

Answer 1

0

funcoding님의 프로필 이미지
funcoding
Instructor

안녕하세요 이렇게 친절하게 가이드까지 해주셔서 감사합니다.

추가로 다른 수강생분께서 작성하신 코드에, 제가 일부 수정을 한 코드인데요, 다음과 같이 requests를 사용해도 출력이 됨을 확인하였습니다. 감사합니다. 추후에 정리해서 공지하겠습니다.

------------

import requests

from bs4 import BeautifulSoup

from urllib.request import urlopen

res = requests.get('https://seeko.earlyadopter.co.kr/bbs/board.php?bo_table=mainnews')

soup = BeautifulSoup(res.content, 'html.parser')

data = soup.findAll('a', 'item-subject')

data

for item in data:

    print(item.get_text().replace('\t', '').replace('\n', ''))

treksis0603's profile image
treksis0603

asked

Ask a question