1

I'm try to get a some date(web scraping) of this page, I try to get the of the fields: nombre, nombe en citaciones, nacionalidad. enter image description here

The xpath is /html/body/div/div[3]/table/tbody/tr[2]/td/table, so I don't understant how to set up my feed importer to get the data with my xpath .

This is the relevant information about the settings of my importer

Basic Settings enter image description here

Fetcher: Http Fetcher

Parser: XPath HTML parser

Settings XPath HTML parser enter image description here

Here, another question, what is the diference between the context and nid?

Procesor: Node procesor

Node procesor: Text Format: Full Html

Mapping for Node processor

enter image description here

This is the "trouble" that I get when I try to run the importer

 htmlParseStartTag: misplaced <html> tag on line 9. Error code: 800
 Unexpected end tag : span on line 25. Error code: 76
 htmlParseEntityRef: no name on line 1049. Error code: 68
 Opening and ending tag mismatch: td and i on line 1843. Error code: 76
 Opening and ending tag mismatch: td and i on line 1875. Error code: 76
 Opening and ending tag mismatch: td and i on line 1915. Error code: 76
 Opening and ending tag mismatch: td and i on line 1961. Error code: 76
 Opening and ending tag mismatch: td and i on line 2007. Error code: 76
 Opening and ending tag mismatch: td and i on line 2053. Error code: 76
 Opening and ending tag mismatch: td and i on line 2099. Error code: 76
 Opening and ending tag mismatch: td and i on line 2139. Error code: 76
 Opening and ending tag mismatch: td and i on line 2179. Error code: 76
 Opening and ending tag mismatch: td and i on line 2219. Error code: 76
 Opening and ending tag mismatch: td and i on line 2259. Error code: 76
 Opening and ending tag mismatch: td and i on line 2305. Error code: 76
 Opening and ending tag mismatch: td and i on line 2351. Error code: 76
 htmlParseEntityRef: expecting ';' on line 2385. Error code: 23
 Opening and ending tag mismatch: td and i on line 2391. Error code: 76
 Opening and ending tag mismatch: td and i on line 2431. Error code: 76
 Opening and ending tag mismatch: td and i on line 2471. Error code: 76
 Opening and ending tag mismatch: td and i on line 2518. Error code: 76
 Opening and ending tag mismatch: td and i on line 2571. Error code: 76
 Opening and ending tag mismatch: td and i on line 2618. Error code: 76
 Opening and ending tag mismatch: blockquote and i on line 2681. Error code:    76 ....
 context :
 There are no new nodes.

To sumury, how to set up my importer to get the value of this fields ?

Thanks for you time and answer my questions.

  • The page you linked has horribly broken HTML. It has two <html> tags, and declares to be XHTML, but again does not correctly close tags. You will need to pass it through some HTML cleaner like tagsoup or htmlcleaner, can't help you with that together with drupal. Another hint: There is no <tbody> tag in there, see stackoverflow.com/questions/18241029/… – Jens Erat Mar 26 '14 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.