__author__ = 'yongeun'

import requests
from bs4 import BeautifulSoup

response = requests.get("http://comic.naver.com")
parser = BeautifulSoup(response.text, 'lxml')

pageElements = parser.find_all(name='a', attrs={'class':'title'})

for pageElement in pageElements:
    print pageElement

print response


@@ -14,16 +14,27 @@
 'yongeun
+, hyeonseok
 '%0A%0Aimpor
@@ -122,16 +122,36 @@
 aver.com
+/webtoon/weekday.nhn
 %22)%0Aparse
@@ -187,28 +187,22 @@
 xt, 
-'
+%22
 lxml
-')%0A%0ApageElement
+%22)%0A%0Atitle
 s = 
@@ -221,98 +221,449 @@
 all(
-name='a', attrs=%7B'class':'title'%7D)%0A%0Afor pageElement in pageElements:%0A    print pageElement
+%22a%22, %22title%22)%0A%0A#print all titles of webtoon%0A#for elem in titles:%0A#    print 'title:%7B0%7D link:%7B1%7D%5Cn'.format(elem%5B'title'%5D.encode('utf-8'), elem%5B'href'%5D.encode('utf-8'))%0A#%0Atoday_webtoon = parser.findAll(%22div%22, %7B %22class%22 : %22col col_selected%22 %7D)%0A%0Afor elem in today_webtoon:%0A    titles = elem.find_all(%22a%22, %22title%22)%0A    for elem2 in titles:%0A        print 'title:%7B0%7D link:%7B1%7D%5Cn'.format(elem2%5B'title'%5D.encode('utf-8'), elem2%5B'href'%5D.encode('utf-8'))
 %0A%0Apr
@@ -675,9 +675,8 @@
 esponse%0A
-%0A

add some codes to find today's webtoon list