I can get all the text inside the other tds, except for td with class="datapid"
<tr>
<td class="cregion">JP</td>
<td class="datacompany"><a href="/company/10644-tecmo">Tecmo</a></td>
<td class="datapid">P99-00001</td>
<td class="datapid">4960677070033</td>
<td class="cdate">02/06/03</td>
<td class="datarating"> </td>
</tr>
I'm using selenium with PhantomJS 2.1.1:
driver = webdriver.PhantomJS(
"c:/phantomjs-2.1.1-windows/bin/phantomjs.exe")
Trying to get the fields, but only the datapid field is blank:
cregions = driver.find_elements(
By.CLASS_NAME, "cregion")
for region in cregions:
regions.append(region.text)
datacompanies = driver.find_elements(
By.CLASS_NAME, "datacompany")
for company in datacompanies:
publishers.append(company.find_element(By.XPATH, "a").text)
datapids = driver.find_elements(
By.CLASS_NAME, "datapid")
for i in range(0, (len(datapids))):
if i % 2:
pids.append(datapids[i].text) //datapids[i].text = ''