For the moment I have made great progress with my Splinder-exporter Blogspot.
As I said, I'm using as Beautiful Soup parser, since it is more permissive than the standard, because of errors.
At this early stage I am trying to rebuild an index of all posts, then to recover the contents one by one.
Unfortunately the initial phase, which is to do the parsing of HTML is becoming more difficult than I thought: for some reason the parser crashes in the middle of the page, before you start to analyze the post.
's not all, I did the following test: I opened the page with Firefox, then I saved to a file, and I opened that page instead of the remote, well, everything worked perfectly (in the sense that retrieves the data that interest me). My suspicion is that there are illegal characters in the page that Firefox probably unable to solve alone. Should I try another parser and see the result. In particular, try with a validating XML parser, tell me where there is an error.
What happened has led me to make the following conclusions:
- The template does not follow the letter of the rules of HTML, XHTML, or even better, can be a problem, because it makes life very difficult for existing parser.
- You can repair a badly written HTML code, but there is a risk that some parts may be lost.
This will eliminate the problem of having pages of complicated and also speeds up the parsing, but I would avoid this solution if possible.
0 comments:
Post a Comment