Pages

Friday, September 2, 2016

How to get my portfolio details from moneycontrol.com using python?



How to get my portfolio details from 

moneycontrol.com ?


Python web scraping from moneycontrol.com

Source code : 



Main Tasks


1. Getting login URL and parameters

2. Getting Portofolio details after login

3. Getting required data using BeautifulSoup 

module








2.




Code Snipet :
LOGIN_URL = "https://accounts.moneycontrol.com/login/index"

URL= 

"http://www.moneycontrol.com/bestportfolio/wealth-

management-tool/investments#port_top"


session_requests = requests.session()

# Create payload
payload = {
          'email' : USERNAME,
          'pwd' : PASSWORD ,
    }

result = session_requests.post(LOGIN_URL, data = payload)
newresult = session_requests.get("http://www.moneycontrol.com/bestportfolio/wealth-management-tool/investments#port_top")




3.
soup = bs4.BeautifulSoup(newresult.content,"lxml")

table = soup.find_all("div", "rightCont")


#print table
commodittTableRows = table[0].find_all("div")

cl = commodittTableRows[0].find_all("p")


for Bull
    ./newMoney.py
Net Worth is 118,445 ▲+72 (+0.06%)


For Bear


Net Worth is 118,212 ▼-161 (-0.14%)


Source code : 

https://github.com/sterin501/PythonScripts/blob/master/moneycontrol/moneyControlPortfolio.py

Friday, August 26, 2016

Installing Oracle VM server on Lenovo Thinkcentre


Installing Oracle VM server on Lenovo Thickcentre


if you are using ThickCentre M900 , Oracle VM server 8.4.2 should be installed .


Main Tasks


1. Creating Bootable USB
2. Copying extracted ISO file in Web server
3. Make MotherBoard Ready for Legacy Boot .






1. Creating Bootable USB
a.Download the Latest Oracle VM server ISO file .


b . Create Bootable USB by unetbootin.




2. Copying extracted ISO file in Web server




a.Extract the ISO file using standard tools

b. Copy the the extracted files to any webserver and 

patch should be accessible

Example : URL to access





































3. Make MotherBoard Ready for Legacy Boot .

a.Changing settings from UEFI to legacy

Example from Lenovo Thickcenter M900































4. Boot with USB


Select the Network drive ,during installation and 


provide the web server details which mention in the 


step 2  


























5 . Run like VM server 2.2





a. Edit /etc/xen/xend-config.sxp


    vi /etc/xen/xend-config.sxp


a.Uncomment
(network-script network-bridge)


b. make sure that below line is uncommented
(vif-script vif-bridge)


c. After Reboot brctl show  should show brigde network


  1. brctl show 




bridge name bridge id STP enabled interfaces

bond0 8000.4ccc6a3c3e52 no pbond0