def cli(scores, transfers):
browser = mechanize.Browser()
browser.set_handle_robots(False)
cookies = mechanize.CookieJar()
browser.set_cookiejar(cookies)
browser.addheaders = [('User-agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.41 Safari/534.7')]
browser.set_handle_refresh(False)
if(scores):
soup = find_soup(browser,'http://www.goal.com/en-in/live-scores')
score_box = soup.find_all('div',attrs={'class':'match-main-data'})
click.echo("\nThe scores of all matches being played currently is displayed below:")
click.echo("--------------------------------------------------------------------")
for i in score_box:
print i.text
click.echo("--------------------------------------------------------------------")
click.echo("\n\nNOTE: ALL THE MATCH TIMINGS ARE IN GMT\n\n")
if(transfers):
soup = find_soup(browser,'http://www.goal.com/en-us/transfer-rumours/1')
rumours = soup.select(".transfer-card__desc p")
click.echo("\nThe latest Transfer news & rumours are displayed below:")
click.echo("--------------------------------------------------------------------")
for i in rumours:
print("->"+i.text)
click.echo("--------------------------------------------------------------------")