Käynnissä

scrapping a website using python for some specific parameters and put the final results into the excel sheet

Hello all,

I need a python script with comments about how the code works (wherever needed). Basically, it is a web scrapping project where input will be an excel sheet with the list of links to indian stocks in the website moneycontrol.com. Now I need the script to populate the parameters of that stock like "debt, net profit, market capitalization & net cash flow" in the correspondng columns of the excel sheet. The only constraint is the time. I want the script to only take [url removed, login to view] (infact as low as possible) to populate these parameters for one stock. The procedure to check these parameters from the stock link is as shown below.

Example stock: ITC

corresponding [url removed, login to view] link: [url removed, login to view] (This will be available from the execl sheet I uploaded)

Extracting Sector's name:

open [url removed, login to view]

the required Sector's name would be the title html element at the xpath element ://*[@id="nChrtPrc"]/div[4]/div[1]/a[1] //(in the case of ITC it is "CIGARETTES")

Extracting Debt:

open [url removed, login to view]

click on financials and select the balance sheet in "old format".

the required Debt would be at the xpath element : /html/body/center[2]/div/div[1]/div[8]/div[3]/div[2]/div[2]/div[2]/div[1]/table[2]/tbody/tr[12]/td[2] (in other words, value of latest yearly Debt available is needed)

Extracting EPS:

open [url removed, login to view]

click on financials and select the balance sheet in "old format".

the required EPS value would be at the xpath element : /html/body/center[2]/div/div[1]/div[8]/div[3]/div[2]/div[2]/div[2]/div[1]/table[2]/tbody/tr[36]/td[2] (in other words, value of latest yearly EPS available is needed)

Extracting Net profit:

open [url removed, login to view]

click on "financials" and then on "yearly results".

the required Net profit would be at the xpath element : /html/body/center[2]/div/div[1]/div[8]/div[3]/div[2]/div[2]/div[2]/div[1]/table[2]/tbody/tr[32]/td[2] (in other words, value of latest yearly net profit available is needed)

Extracting Market capitalization:

open [url removed, login to view]

the required Market capitalization would be at the xpath element : //*[@id="mktdet_2"]/div[1]/div[1]/div[2]

Extracting P/E ratio:

open [url removed, login to view]

the required P/E ratio would be at the xpath element : //*[@id="mktdet_1"]/div[1]/div[2]/div[2]

Extracting Industry P/E ratio:

open [url removed, login to view]

the required Industry P/E ratio would be at the xpath element : //*[@id="mktdet_1"]/div[1]/div[6]/div[2]

Extracting Net cashflow:

open [url removed, login to view]

click on "financials" and then on "cash flow".

the required Net cashflow would be at the xpath element : /html/body/center[2]/div/div[1]/div[8]/div[3]/div[2]/div[2]/div[2]/div[1]/table[2]/tbody/tr[32]/td[2] (in other words, value of latest yearly net cash flow available is needed)

Extracting Return on Capital Employed:

open [url removed, login to view]

click on "Financial"and then on "Ratios"

the required Net cashflow would be at the xpath element : /html/body/center[2]/div/div[1]/div[8]/div[3]/div[2]/div[2]/div[2]/div[1]/table[2]/tbody/tr[23]/td[2] (in other words, value of latest yearly Return on Capital Employed available is needed)

Taidot: Excel, Python, Tietojen kaavinta verkosta

Näytä lisää: develop website using python, database website using excel

About the Employer:
( 1 review ) Hyderabad, India

Projektin tunnus: #13155700

Myönnetty käyttäjälle:

ishanibasnayake

I am a python programmer and being doing programming for 6 years, I can give you this script within a day.

25 $ USD 1 päivässä
(0 arvostelua)
0.0

2 freelanceria on tarjonnut keskimäärin 290 $ tähän työhön

bpestilence

Hello. I'm professional scraper with 10 years experience in PHP & Ruby. Specializing in scraping. As you can see, i can do this with Ruby + PhantomJS.

555 $ USD 3 päivässä
(6 arvostelua)
4.9
farhannaqvi7

I complete your project in short time as soon as posible my concentration on no quilty compromise I have 4 year experience in data entry accounts work and Email and social media handling .

25 $ USD 1 päivässä
(1 arvostelu)
0.0