I am confused !!! can anybody tell me where the problem is??? this code used to work properly but it started returning nothing since yesterday !! I did not make any changes on it !!! does anybody have any idea???
import re
from re import sub
import time
import cookielib
from cookielib import CookieJar
import urllib2
from urllib2 import urlopen
import difflib
import requests
def twitParser():
try:
cj = CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
res=opener.open('https://twitter.com/haberturk')
html=res.read()
splitSource=re.findall(r'<p class="js-tweet-text tweet-text">(.*?)</p>',html)
print len(splitSource)
for item in splitSource:
aTweet = re.sub(r'<.*?>','',item)
print aTweet
except Exception, e:
print str(e)
print 'ERROR IN MAIN TRY'
twitParser()