import requests
import selenium
from selenium import webdriver
from bs4 import BeautifulSoup
browser = webdriver.Firefox()
browser.get('http://www.megabox.co.kr/?show=detail&rtnShowMovieCode=013491')
html = browser.page_source
soup = BeautifulSoup(html, 'html.parser')
comment = soup.findAll('',{'class': 'comment'})
for i, t in enumerate(comment,1):
print('%2d: %s'%(i, t.text))
http://www.megabox.co.kr/?show=detail&rtnShowMovieCode=013491
我想抓取所有评论在1页,2页,3页。。。 但我不知道怎么做。你能解释一下吗?在
我对Python很陌生,所以可能有bug,但这是我的尝试。我已经尽我所能地在评论方面添加了解释。
我真诚希望这对你有所帮助。
相关问题 更多 >
编程相关推荐