Misc Perl Rants and Praises
Author: Aaron Anderson
More tips, tricks, praises and rants for Perl (the most powerful scripting language in the world).
First rant goes to the SWF* module package. This module was created back in 2001 (or was it 2003). Since then, there haven't been any SWF* updates or documentation written by the author or by user's who figured out how to use it.
There are some perl modules that you can figure out just by looking at the synopsis and sample code, but when you're working with an entirely foreign language (Flash) its hard to make good of any of the code.
The module is so outdated or impossible to work with that I actually brought myself to posting for help on RentACoder, Kasamba and GetACoder and zero people even made an attempt and finding a working solution.
So until this SWF package gets fixed, and with MING out of the picture, Perl has no way to create Flash movies. If you're an extremely talented yet bored Perl scripter and have some free time, use these original SWF* modules as a roughdraft and update everything.
The praise for the day is for WWW::Mechanize. It is one of the easiest and, depending what you use Perl for, one of the most used Perl modules. It's a shame it doesn't come prepackaged with ActiveState.
WWW::Mechanize allows you to create web bots (site scrapers) and automated form fillers in a snatch. It's so powerful, it can interact with any form element whether it be a textfield, radio button, hidden field or button.
It uses the LWP:: core functions making it even more customizable. There aren't many documentations on how to use LWP with WWW::Mechanize, but after playing around a little bit, you'll figure it out.
-----------------------------------
I am currently using WWW::Mechanize to create a web-based search engine submission script. So far, everything is running as smooth as a script could, but collecting the engine data is extremely time consuming. Not to mention, it's hard to get legit search engines that don't use image verification codes.
This is current engine database NAME SUBMIT_URL FORM_NAME FORM_PARAMS CHECKBOXES SUCCESS_TXT Aesop::http://www.aesop.com/cgi-bin/aesopadd.cgi::2::EMAIL= $email,URL=$url,NAME=$name, VERIFIER=072-58::terms=yes::Thank you for using Amidalla::http://www.amidalla.com/add.htm::1:: addurl=$url::::thank you for Axxasearch::http://www.axxasearch.com/submit-site.htm: :submit_url_form::required-www=$url,required-email= $name::::Thank you for EVisum::http://www.evisum.com/addsite.htm::1:: URL=$url,email=$email::::Your site will be reviewed EntireWeb::http://www.entireweb.com/free_submission/::addurl:: URL=$url,Email=$email::::We have sent you ExactSeek::http://www.exactseek.com/add.html::2:: URL=$url,EMAIL=$email,NAME=$name, VERIFIER=072-58,action=submit::verify=yes::Thank you for using SearchWho:: http://www.searchwho.com/cgi-bin/addsite.pl::2:: v_title=$title,v_url=$url,v_email=$email, v_directory=$directory,v_comments= $comments, db=general::::Thanks for submitting
If anyone has time and wants to contribute to this project, the engine data is broken into the following blocks.
1) Engine name, followed by :: 2) Engine submission page URL, followed by :: 3) The form name or number. form name="bob" may be found in the HTML code. If it's not, you need to count how many <form> tags there are before the form for the subission. The database needs the name if it's found, or the form number. Followed by :: 4) All the form fields the form has (required or not), including hidden paramaters. This is case-sensitive. It requires a field_name=value. If it's the URL, append the variable $url. Name, url, comments, directory, email have $name, $url, $comments, $directory and $email respectively. If it's a hidden field, take the value that it tells you in the HTML code and assign it with the value, not a variable. They all need to be comma separated WITHOUT SPACES. Do not include checkboxes in this section. Followed by :: 5) This is identical to #4 but this is only for checkboxes. Same syntax as above. Se the checkbox_name=the_value. Followed by :: 6) Lastly, after a successful submission there should be some text saying it succeeded. It only needs a few words that will NOT appear if the submission fails.
This database will remain a textfile to make it infinitely easier to update. Please send contributions to support@spyderscripts.com
Rate : Misc Perl Rants and Praises
| Rating: 0 Votes: 0 Visits: 21 |