NavigationUser loginscreen-scraper.com welcomes...
Currently online
There are currently 0 users and 1 guest online.
|
Tutorial 4: Page 3: Invoking screen-scraper from Cold Fusion
Before we dig into the code you'll probably want to take a minute to review our Invoking screen-scraper from ColdFusion documentation page. Remember that you need to add the "screen-scraper.jar" file for you classpath in order to be able to interact with screen-scraper. In order to invoke screen-scraper from Cold Fusion, screen-scraper needs to be running in server mode. If you'd like a refresher on how to start up screen-scraper in server mode go ahead and follow that link, then come back here. Okay, let's try it out before we go over the code. Download the shopping.cfm.txt file here, then save it in a directory that will be accessible from your web server. Rename the file from "shopping.cfm.txt" to "shopping.cfm". After that start up screen-scraper in server mode. Open up your web browser and go to the URL corresponding to the "shopping.cfm" file (e.g, http://localhost/screen-scraper/shopping.cfm). You'll see a simple search form. Type in a product keyword, such as "bug", then hit the "Go" button. If all goes well the page will take a little while to load (it's waiting as screen-scraper extracts the data), then it will output the corresponding products. If that didn't go quite as you expected here are some things to check:
Assuming that test worked, fire up your favorite Cold Fusion editor and open the "shopping.cfm" file in it. The file is pretty heavily commented, so hopefully it makes sense what's going on. If not, try reviewing Cold Fusion documentation, posting to our forum, or sending us a support request. When you invoke screen-scraper as a server it creates log files corresponding to your scraping session in its "log" folder. Take a look in that folder for your "Shopping Site" log file and take a look through it. It should look similar to what you see when you run scraping sessions in the workbench.
|
SearchNew Video!Tags Throughout this Site |
Recent comments
16 hours 31 min ago
16 hours 48 min ago
17 hours 36 min ago
17 hours 44 min ago
17 hours 54 min ago
18 hours 4 min ago
2 days 14 hours ago
3 days 21 hours ago
3 days 21 hours ago
5 days 17 hours ago