@@ -58,18 +58,22 @@ def getDetails(url):
5858 s = soup (result_py , "lxml" )
5959 #print s
6060
61- celeb_list = BirthDayCelebrities .parse_soup (s )
62-
63- for index , celeb in enumerate (celeb_list ):
64- print '-' * 50 + str (index + 1 ) + '-' * 50
65- print "Name: " + celeb [0 ]
66- print "Image: " + celeb [1 ]
67- print "Profession: " + celeb [2 ]
68- print "Best works: " + celeb [3 ]
69-
61+ return BirthDayCelebrities .parse_soup (s )
7062
7163if __name__ == "__main__" :
7264 print "*** Attention***: http_proxy and https_proxy env variables are properly set and reflected in pycharm"
7365 url_from_browser = "http://m.imdb.com/feature/bornondate"
7466 celeb = BirthDayCelebrities ()
75- BirthDayCelebrities .getDetails (url_from_browser )
67+ celeb_list = BirthDayCelebrities .getDetails (url_from_browser )
68+
69+ from twitter import Twitter
70+ twitter = Twitter (* sys .argv [1 :])
71+ #twitter.getTweets()
72+
73+ for index , celeb in enumerate (celeb_list ):
74+ print '@' * 50 + str (index + 1 ) + '@' * 50
75+ print "Name: " + celeb [0 ]
76+ print "Image: " + celeb [1 ]
77+ print "Profession: " + celeb [2 ]
78+ print "Best works: " + celeb [3 ]
79+ twitter .getMatchedTweets (q = celeb [0 ], lang = 'en' )
0 commit comments