visual.ly에서 시각화를 긁어 내고 싶었지만 지금은 "더보기"버튼이 어떻게 작동하는지 이해할 수 없습니다. 현재, 내 코드는 이미지 링크, 이미지 옆의 텍스트 및 페이지의 링크를 가져옵니다. 나는 "더 많은 것을 보여라"버튼이 어떻게 기능하는지 궁금해했다. 왜냐하면 나는 페이지의 수를 사용하여 반복하려고 시도했기 때문이다. 현재로서는 어떻게 하나씩 개별적으로 반복 할 것인지 모르겠다. 내가 반복 할 수있는 방법에 대한 아이디어는 원래 당신보다 더 많은 이미지를 얻는 데 도움이됩니까 ????도움이 필요한 웹 스크 레이 핑
from BeautifulSoup import BeautifulSoup
import urllib2
import HTMLParser
import urllib, re
counter = 1
columnno = 1
parser = HTMLParser.HTMLParser()
soup = BeautifulSoup(urllib2.urlopen('http://visual.ly/?view=explore& type=static#v2_filter').read())
image = soup.findAll("div", attrs = {'class': 'view-mode-wrapper'})
if columnno < 4:
column = image[0].findAll("div", attrs = {'class': 'v2_grid_column'})
columnno += 1
else:
column = image[0].findAll("div", attrs = {'class': 'v2_grid_column last'})
visualizations = column[0].findAll("div", attrs = {'class': '0 v2_grid_item viewmode-item'})
getImage = visualizations[0].find("a")
print counter
print getImage['href']
soup1 = BeautifulSoup(urllib2.urlopen(getImage['href']).read())
theImage = soup1.findAll("div", attrs = {'class': 'ig-graphic-wrapper'})
text = soup1.findAll("div", attrs = {'class': 'ig-content-right'})
getText = text[0].findAll("div", attrs = {'class': 'ig-description right-section first'})
imageLink = theImage[0].find("a")
print imageLink['href']
print getText
for row in image:
theImage = image[0].find("a")
actually_download = False
if actually_download:
filename = link.split('/')[-1]
urllib.urlretrieve(link, filename)
counter += 1
를 설치해야합니까 수 있을까? 양식 데이터, 단추 동작, 링크 등을 시각화 (말장난이 아님)하는 데 매우 중요합니다. – Lenna
링크를 인쇄하면 올바른 리소스를 가리 킵니까? 이것이 디버깅의 첫 번째 단계입니다. –
방화범이 없다면 웹 개발자 툴바가 없습니다. – user1497050