강좌
클라우드/리눅스에 관한 강좌입니다.
프로그램 분류

파이썬기초131 : 웹크롤링 예제06

작성자 정보

  • 관리자 작성
  • 작성일

컨텐츠 정보

본문

import time

import requests


def print_hello():

    print "hello!!! HTML"

    for i in range(5, -1, -1):

        time.sleep(1)

        print i


print_hello()


response = requests.get('http://www.naver.com')

try:

    response.raise_for_status()

except Exception as exc:

    print 'There was a problem: %s' % exc


print response.text

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,043 명
  • 현재 강좌수 :  35,850 개
  • 현재 접속자 :  132 명