Skip to content

A CFC that scrapes information from a given URL.

Notifications You must be signed in to change notification settings

RHMason/ScrapeCFC

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ScrapeCFC

A CFC that scrapes information from a given URL.

The use of ScrapeCFC requires Adobe ColdFusion 9+ or Railo 4. I have only test this on Railo so far, but believe it to work fine on ACF.

This script makes use of a Java class loader and a Java library known as jSoup. Combining these tools, we are able to extract information from a URL relatively easily.

There is only one public function getData() which can return either a ColdFusion structure, or JSON, when providing a URL and the output argument.

The following code assumes that your files are placed in a folder called lib, in your web root.

<cfparam name="url.url" type="string" default="" />
<cfset scrape = new lib.scrape() />
<cfdump var="#scrape.getData(url.url, "json")#" />

This is my first ever open source project, so I welcome feedback.

About

A CFC that scrapes information from a given URL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published