{"id":21,"date":"2009-02-21T20:59:09","date_gmt":"2009-02-22T01:59:09","guid":{"rendered":"http:\/\/blog.bitsofgenius.com\/?p=21"},"modified":"2010-12-05T01:25:13","modified_gmt":"2010-12-05T05:25:13","slug":"scraping-in-vbscript","status":"publish","type":"post","link":"https:\/\/blog.bitsofgenius.com\/?p=21","title":{"rendered":"Scraping&#8230; in VBScript"},"content":{"rendered":"<p>So this is a tidbit I discovered while cleaning out some files.\u00a0 It is a VBScript class to do basic scraping, and a test script to validate the methods in the class&#8211;and scrape a web page to an XML document.\u00a0 The WSF file is the execution file, which links the two VBS source files together.\u00a0 To run it, unpack it a folder, and at a command-line with that folder as the current directory, enter&#8230;<\/p>\n<pre lang=\"vb\" line=\"1\">\r\ncscript\u00a0 ScrapeClass_TEST.wsf\r\n<\/pre>\n<p>The class, as is, can&#8217;t do anything beyond capturing the response stream from a simple request, and the extraction is hard-coded for the page it targets.\u00a0 Yet it does demonstrate what is possible with VBScript and ActiveX objects.<\/p>\n<p>It&#8217;s older code, but enjoy.\u00a0 You can download the code in the <a href=\"\/?page_id=8\">Download<\/a> page (ScrapeClass_vbs.zip).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So this is a tidbit I discovered while cleaning out some files.\u00a0 It is a VBScript class to do basic scraping, and a test script to validate the methods in the class&#8211;and scrape a web page to an XML document.\u00a0 The WSF file is the execution file, which links the two VBS source files together.\u00a0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-21","post","type-post","status-publish","format-standard","hentry","category-vbscript-intended-for-command-line-batch-usage"],"_links":{"self":[{"href":"https:\/\/blog.bitsofgenius.com\/index.php?rest_route=\/wp\/v2\/posts\/21","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bitsofgenius.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bitsofgenius.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bitsofgenius.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bitsofgenius.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=21"}],"version-history":[{"count":0,"href":"https:\/\/blog.bitsofgenius.com\/index.php?rest_route=\/wp\/v2\/posts\/21\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.bitsofgenius.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bitsofgenius.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bitsofgenius.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}