해결된 질문
작성
·
298
0
답변 4
0
0
https://www.ppomppu.co.kr/zboard/zboard.php?id=ppomppu
차단먹인것에 위에건 없는데 리스폰도 200으로 잘받는다고 하는데 왜 스푸는 안될까요..
대답좀해주삼~
from bs4 import BeautifulSoup
import requests
import telegram
# from hotdeal.models import Deal
from selenium import webdriver
from datetime import datetime, timedelta
# options = webdriver.ChromeOptions()
# options.headless = True
# browser = webdriver.Chrome(options=options)
browser = webdriver.Chrome()
browser.get('http://www.ppomppu.co.kr/zboard/zboard.php?id=ppomppu')
html=browser.page_source
soup=BeautifulSoup(html,'xml')
# BOT_TOKEN = "5467952826:AAF30-fcPgBsCQSYnl78EDSguYVXrwAWsAg"
# bot = telegram.Bot(token=BOT_TOKEN)
from selenium.webdriver.common.by import By
for item in soup.find_all("tr", {'class': ["list1", "list0"]}):
try:
up_count = item.find_all("td")[6].text # 여기까지
up_count = up_count.split("-")[0]
up_count = int(up_count)
title = item.find("font", class_="list_title").text
title = title.strip()
link = item.find("font", class_="list_title").parent.get("href")
link = "http://www.ppomppu.co.kr/zboard/" + link
if up_count >= 5:
print(up_count)
print(title)
print(link)
except :
continue
셀레니움으로 하긴했는데 이래도 되나 모르겠네요
0
0