SearchNavigationUser login |
Invoking screen-scraper from the Command Line
Scraping sessions created within screen-scraper can be invoked by running screen-scraper from a Unix terminal or a DOS command prompt. This allows for possibilities such as scraping information at regular intervals via something like cron or a scheduled task. The syntax is as follows:
jre\bin\java -jar screen-scraper.jar {-s} "scraping_session_name" [{-p,--params} "url-encoded_variable_string"]Note that if you installed a version of screen-scraper that includes a Java Virtual Machine (currently Windows and Linux), you'll want to preface the command with "jre\bin\" on Windows or "jre/bin/" on Linux. On Windows, for example, the full command above would be:
{screen-scraper-install-folder}\jre\bin\java -jar screen-scraper.jar {-s} "scraping_session_name" [{-p,--params} "url-encoded_variable_string"]or:
cd {screen-scraper-install-folder}Where {screen-scraper-install-folder} is the location where you installed screen-scraper, such as "C:\Program Files\screen-scraper professional edition\". Here are a couple of examples:
"C:\Program Files\screen-scraper professional edition\jre\bin\java" -jar screen-scraper.jar -s "Google search" -p "search_string=screen+scraper"This would invoke the scraping session "Google search" and pass in a parameter named search_string containing the value screen scraper (remember that the passed-in parameters need to be a URL-encoded string, just like the query string in a URL). This would cause a session variable named "search_string" to be created, which would hold the value "screen scraper".
"C:\Program Files\screen-scraper professional edition\jre\bin\java" -jar screen-scraper.jar -s "Hotmail mail retrieval" --params "user_name=uname&password=mypass"This one would invoke the scraping session Hotmail mail retrieval and pass in two parameters, one named user_name containing the value "uname" and the other named password containing the value "mypass". Again, two session variables would be created. Note also that, when running on Windows, any % character needs to be doubled because this character is treated in a special way in DOS. For example, the parameter "string=hello%21" would need to be passed in as "string=hello%%21".
|
Command line on trial version?
Hello, does running from the command line work on the trial version? I'm pretty sure I get everything right, but the program always launches and gives me the trial message without ever running the script or session I'm trying to run.