Scrapped HTML does not written at the beginning of text file.

Posted by karikari on Stack Overflow See other posts from Stack Overflow or by karikari
Published on 2010-04-22T02:05:54Z Indexed on 2010/04/22 2:13 UTC
Read the original article Hit count: 292

Filed under:

Currently, I'm scraping the HTML code of a page, and write it to a txt file.

My problem is, why there must be empty spaces or empty lines at the beginning? The HTML codes written to the txt file, seems does not start at the beginning of the txt file. Means, the '<' does not located at the position 0 of the txt file.

After a few runs, my HTML is always written a few lines down inside the txt file.

Can anyone tell me why : )

© Stack Overflow or respective owner

Related posts about html