I'm not understanding why below is returning 0 instead of 1 ?
I've taken below CSS Selector from Chrome dev tool itself.
doc.select("#company-holding_table > tbody > tr:nth-child(1) > td.table-text.dtfc-fixed-left > div > a")
I couldn't post complete HTML as character limit was exceeded.
<div id="\"protfolio_pie_chart1\"" class="\"d-flex" justify-content-center\ data-is-loaded="\"false\"">
<\/div>\r\n <\/div>\r\n <\/div>\r\n <\/div>\r\n <\/div>\r\n <!-- COMPANY HOLDING WRAPPER -->\r\n
<div class="\"company-holdings-wrapper" top-holding-table p-t-b-50 pb-0\>
\r\n
<h2 class="\"portfolio-tab-title\"">\r\n Top Holdings <\/h2>\r\n <div\r\n class="\"custom-table-wrapper" custom-table-wrapper__portfolio-holding-table custom-table-wrapper__section-table custom-table-wrapper__portfolio-holding-bottom-table with-borders pt-0 pb-0 pl-0 pr-0\>
\r\n
<table id="\"company-holding_table\"" class="\"table\"">
\r\n
<thead>
\r\n
<tr class="\"custom-header\"" role="\"row\"">
\r\n
<th class="\"col-hide-mob" mobile-first-th\>\r\n
<div class="\"first-col-custom-width\"">
\r\n Company Name <\/div>\r\n <\/th>\r\n
</div></th>
<th>\r\n
<div class="\"fixed-width-cell" fixed-width-cell-mob\>
\r\n Sector<\/div>\r\n <\/th>\r\n
</div></th>
<th class="\"small-th-pr" text-right\>\r\n
<div class="\"fixed-width-cell" fixed-width-cell-mob\>
\r\n P\/E Ratio\r\n <img class="\"info-icon" ml-2\ src="\"\/asts\/img\/icons\/Info-icon.svg\"\r\n" alt="\"info\"" tabindex="\"0\"" data-trigger="\"focus\"" data-toggle="\"popover\"" data-container="\"body\"\r\n" data-content="\"<p">A valuation metric which indicates the price you pay for each rupee of a company's profits. It is calculated by dividing the current share price by earnings per share in the last 4 calendar quarters.<\/p>\"\r\n data-original-title=\"\" title=\"\" \/>\r\n <\/div>\r\n <\/th>\r\n
</div></th>
<th class="\"text-right\"">\r\n
<div class="\"fixed-width-cell" fixed-width-cell-mob\>
\r\n % Assets <img class="\"info-icon" ml-2\ src="\"\/asts\/img\/icons\/Info-icon.svg\"\r\n" alt="\"info\"" tabindex="\"0\"" data-trigger="\"focus\"" data-toggle="\"popover\"" data-container="\"body\"\r\n" data-content="\"<p">The current weight of the security in the portfolio as a percentage of the fund's total assets.<\/p>\"\r\n data-original-title=\"\" title=\"\" \/>\r\n <\/div>\r\n <\/th>\r\n
</div></th>
<th class="\"no-sort" text-center\>\r\n <div\r\n class="\"fixed-width-cell" fixed-width-cell-mob w-200 head-center\>
\r\n Holding Trend
<a href="\"\/premium\/subscribe\/?utm_medium=vro&utm_campaign=premium-unlock&utm_source=fund-details\"">\r\n
<div class="\"unlock-premium" w-70\>
\r\n <img src="\"\/asts\/img\/icons\/premium-lock.svg\"\r\n" alt="\"unlock" premium\ width="\"20\"" data-toggle="\"tooltip\"\r\n" data-placement="\"top\"" tabindex="\"0\"" data-html="\"true\"\r\n" title="\"<p">Unlock with Premium<\/p>\"\r\n data-template=\"
<div class="tooltip unlock-premium-tooltip" role="tooltip">
<div class="arrow">
<\/div>
<div class="tooltip-inner">
<\/div><\/div>\" \/>\r\n <\/div>\r\n <\/a>\r\n <\/div>\r\n <\/th>\r\n <\/tr>\r\n <\/thead>\r\n
</div>
</div>
</div>
</div></a>
</div\r\n></th>
</tr>
</thead>
<tbody>
\r\n
<tr>
\r\n
<td class="\"table-text\"">\r\n
<div class="\"first-col-custom-width\"">
\r\n <img src="\/asts\/img\/equalarrow.gif" width="12" height="8" alt="equal"> <a class="\"custom-fund-name\"\r\n" href="\"\/stocks\/42383\/hdfc-bank-ltd#overview\"">\r\n HDFC Bank <\/a>\r\n <\/div>\r\n <\/td>\r\n </a>
</div></td>
<td class="\"td-link\"">\r\n
<div class="fixed-width-cell fixed-width-cell-mob">
\r\n <a class="\"custom-fund-name\"\r\n" href="\"\/stocks\/selector\/sector\/8\/\"">\r\n Financial <\/a>\r\n <\/div>\r\n <\/td>\r\n </a>
</div></td>
<td class="\"mono-font\"">\r\n <div\r\n class="\"table-text-right" fixed-width-cell fixed-width-cell-mob text-right\>
\r\n 21.26 <\/div>\r\n <\/td>\r\n
</div\r\n></td>
<td class="\"td-bg" mono-font text-right\>\r\n
<div class="\"table-text-right" fixed-width-cell fixed-width-cell-mob\>
\r\n <span\r\n class="\"asset-circle-bg\"">
<\/span>7.52 <\/div>\r\n <\/td>\r\n
</span\r\n>
</div></td>
<td class="\"text-center\"">
<a\r\n href="\"\/premium\/subscribe\/?utm_medium=vro&utm_campaign=premium-unlock&utm_source=fund-details\"">
\r\n
<div class="\"unlock-premium" w-70\>
<img\r\n src="\"\/asts\/img\/icons\/premium-lock.svg\"\r\n" alt="\"unlock" premium\ width="\"20\"" data-toggle="\"tooltip\"\r\n" data-placement="\"top\"" tabindex="\"0\"" data-html="\"true\"\r\n" title="\"<p">
Unlock with Premium<\/p>\"\r\n data-template=\"
<div class="tooltip unlock-premium-tooltip" role="tooltip">
<div class="arrow">
<\/div>
<div class="tooltip-inner">
<\/div><\/div>\" \/>\r\n <\/div>\r\n <\/a><\/td>\r\n <\/tr>\r\n
</div>
</div>
</div>
</img\r\n>
</div>
</a\r\n></td>
</tr>
<tr>
\r\n
<td class="\"table-text\"">\r\n
<div class="\"first-col-custom-width\"">
\r\n <img src="\/asts\/img\/equalarrow.gif" width="12" height="8" alt="equal"> <a class="\"custom-fund-name\"\r\n" href="\"\/stocks\/42508\/icici-bank-ltd#overview\"">\r\n ICICI Bank <\/a>\r\n <\/div>\r\n <\/td>\r\n </a>
</div></td>
<td class="\"td-link\"">\r\n
<div class="fixed-width-cell fixed-width-cell-mob">
\r\n <a class="\"custom-fund-name\"\r\n" href="\"\/stocks\/selector\/sector\/8\/\"">\r\n Financial <\/a>\r\n <\/div>\r\n <\/td>\r\n </a>
</div></td>
<td class="\"mono-font\"">\r\n <div\r\n class="\"table-text-right" fixed-width-cell fixed-width-cell-mob text-right\>
\r\n 23.05 <\/div>\r\n <\/td>\r\n
</div\r\n></td>
<td class="\"td-bg" mono-font text-right\>\r\n
<div class="\"table-text-right" fixed-width-cell fixed-width-cell-mob\>
\r\n <span\r\n class="\"asset-circle-bg\"">
<\/span>7.48 <\/div>\r\n <\/td>\r\n
</span\r\n>
</div></td>
<td class="\"text-center\"">
<a\r\n href="\"\/premium\/subscribe\/?utm_medium=vro&utm_campaign=premium-unlock&utm_source=fund-details\"">
\r\n
<div class="\"unlock-premium" w-70\>
I need to choose value ICICI Bank from
<a class="\"custom-fund-name\"\r\n" href="\"\/stocks\/42508\/icici-bank-ltd#overview\"">\r\n ICICI Bank <\/a>\r\n <\/div>\r\n <\/td>\r\n </a>
What should be CSS in this case ?
