c# - How to copy this text from a webpage formatted? -
i'm trying copy text this webpage in .txt on desktop.
the text must formatted in webpage. use no luck.
httpclient httpclient = new httpclient(); file.writealltext(@"c:\users\matteo\desktop\google2.txt", httpclient.getstringasync("http://someonewhocares.org/hosts/").result);
how can it?
first of all, you'll need save file .html
extension. also, seems webpage uses styles separate css file: http://someonewhocares.org/pollock.css
you'll need grab make on webpage.
sample code:
httpclient httpclient = new httpclient(); file.writealltext(@"c:\users\matteo\desktop\index.html", httpclient.getstringasync("http://someonewhocares.org/hosts/").result); file.writealltext(@"c:\users\matteo\desktop\pollock.css", httpclient.getstringasync("http://someonewhocares.org/pollock.css /").result);
Comments
Post a Comment