from bs4 import BeautifulSoup
import requests
url = 'http://m...content-available-to-author-only...f.com/companies/ICICI-Bank-Ltd/14030056?src=comp_srch'

"""to do -> reaching a stock's page on rediff, converting str(delta) into float, improving upon the way u get delta, is conversion to str is neccessery??"""
source_code = requests.get(url)
code = BeautifulSoup(source_code.text)
# print(code)
for l in code.findAll('span', {'id' : 'ChangePercent'}):
    s = str(l)
    perc = s.index('%')
    delta = s[perc-5:perc]
    if delta[0] != '-' :
        s = s[25:29]
        delta = s
    delta = float(delta)
    print(delta)
