All pastes #441278 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-04-15 16:34 UTC
rendered paste body
# -*- coding: utf-8 -*-
import urllib2, htmldata
url="http://www.milliyet.com.tr/2007/04/15/yazar/"
url1 = 'http://www.milliyet.com.tr/2007/04/15/yazar/altan.html'
 
contents = urllib2.urlopen(url1).read()
L = htmldata.tagextract(contents)
yazar=[]
for i in range(len(L)):
	if str(L[i]) == "('!-- PRINT BASLADI --', {})":
		j=i		
		while str(L[j]) != "('!-- PRINT B\xddTT\xdd --', {})":
			for j in range(len(L)):			
				yazar.append(L[j])
		break

print yazar