Content pulling script

This is a discussion on "Content pulling script" within the Classic ASP section. This forum, and the thread "Content pulling script are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 9th, 2003, 21:01
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Content pulling script

I was building a database from a static site and wrote a script to pull the content and images from the old site and store it on my computer. I thought someone might find it useful.

I put in a tame sample that just grabs all the pics from a Cameron Diaz page, but you can easily modify it to do something like download all the full sized daily pictures from the Hun onto your computer with one click (ask me if you want the setting for that:wink or grab the text and images from a weather or news site to display on yours.

Enjoy - Cat

Code: Select all
<!--METADATA TYPE="typelib"
      UUID="00000205-0000-0010-8000-00AA006D2EA4"
     NAME="ADODB Type Library"
-->
<% 
	server.scripttimeout = 6000
	
	saveto = "C:\savedpics\" ' folder to save the pictures to (needs write permissions)
	url = "http://www.virtuous.co.uk/fantasy/gallery/diaz.htm"  ' url to the page you want to parse
	
	Set xml = Server.CreateObject("Msxml2.ServerXMLHTTP")
	xml.Open "GET", url, False
	xml.Send
	s = xml.responseText
	
	set regmp= new RegExp
	regmp.IgnoreCase = True
	regmp.global = true
	regmp.pattern = "[img][/img]500 then
			Set objStream = Server.CreateObject("ADODB.Stream")
			objStream.Type = adTypeBinary
			objStream.Open
			objStream.Write data
			objStream.SaveToFile saveto & ipid & ".jpg", 2	
			objStream.Close
			Set objStream = Nothing
		end if
		Set objHTTP = Nothing
	
	end sub
%>

  #2 (permalink)  
Old Sep 10th, 2003, 08:00
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
great job! it works perfectly!

Thanks
  #3 (permalink)  
Old Sep 10th, 2003, 09:42
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Cheers for sharing your code, it works like a charm!

u2o
Closed Thread

Tags
content, pulling, script

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Expandable Content Script (Swtich Content) Matc JavaScript Forum 0 Apr 8th, 2008 10:53
accordian not pulling through css in ie6 welshstew Web Page Design 4 Aug 24th, 2007 13:30
Switch Content Script jsaccheri JavaScript Forum 5 Jan 26th, 2007 19:36
Pulling dynamic images/JS issue whoooowhaaaa Flash & Multimedia Forum 1 Jan 8th, 2007 20:55
Ive been pulling my hair out herrlip Introduce Yourself 5 Oct 24th, 2004 13:13


All times are GMT. The time now is 23:48.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43