Craiglist Question

Signed-In Members Don't See This Ad
Status
Not open for further replies.

DocStram

Member
Joined
Feb 16, 2006
Messages
3,429
Location
Pittsburgh, Pennsylvania
Whenever I do a Craigslist search it always ends up being for a specific city ... like, "Atlanta". Is there way of doing one search for a whole state .... like, "Oregon"? Or, can I do a search for the whole country?
 
Signed-In Members Don't See This Ad
Originally posted by DocStram
<br />Whenever I do a Craigslist search it always ends up being for a specific city ... like, "Atlanta". Is there way of doing one search for a whole state .... like, "Oregon"? Or, can I do a search for the whole country?

Do a Google search...just anchor your search with the word "CRAIGSLIST" followed by the item you are looking for. Works for me.

Of course Greg's solution is much better. Can I have the code too? [:D][:p] Thanks!
 
Ohhh mannnn ... you guys are killing me! Ok, Greg .... go ahead and post your code ... but please ... at least send it to me about 30 seconds before you post it for everybody else. Afterall ... I'm the one who started this whole mess. Geeezeee I can't wait for Cav to see this post. [:0] [:D][:D][:D]
 
I've sent the code to everyone who sent me an email. For the rest of you asking, I hope this works.

Just edit the list of URLs to be your area (hint: do a CL search and see what the URL for the finished search looks like and modify it below).

Once it is edited add it to your cgi-bin directory on your web server (which hopefully has Perl installed).


----------------------------------------
#!/usr/local/bin/perl


use CGI qw/:standard :netscape/;
use CGI::Carp qw(fatalsToBrowser carpout);

print header;

$frame_name = path_info();
$frame_name =~ s!^/!!;

# If no path information is provided, then we create
# a side-by-side frame set
if (!$frame_name) {
print_frameset();
exit 0;
}

# If we get here, then we either create the query form
# or we create the response.
print start_html();
print_query() if $frame_name eq 'left';
print_response() if $frame_name eq 'right';
print end_html();

# Create the frameset
sub print_frameset {
my $script = url();
print title('Net Quick Search'),
frameset({-cols=&gt;'50%,50%'},
frame({-name=&gt;'left',-src=&gt;"$script/left"}),
frame({-name=&gt;'right',-src=&gt;"$script/right"})
);
exit 0;
}

sub print_query {
my $script = url();
print h1("Net Quick Search"),
start_form(-action=&gt;"$script/right",
-target=&gt;"right"),
"What are you searching for? ",
textfield('SearchItem'),
p(),
"This page will search several Craig's List sites and Ebay.&lt;br&gt;
If/When I can figure out the Amazon search format I will add that too.",
p(),
submit,
p(),
end_form;
}

sub print_response {
$ItemName=param(SearchItem);
print h2("Search for \"$ItemName\" at");
unless (param) {
print b("No query submitted yet."),
p(),
"This will search several Craig's List sites and Ebay";;
return;
}

#
# Modify these lines for your region
# Don't add anything between the EoText below and the
# EoText way below that you don't want on your web page.
#
print &lt;&lt;EoText;
&lt;a href="http://monterey.craigslist.org/search/sss?query=$ItemName"
target="_blank"&gt;Monterey Craig's List&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://sfbay.craigslist.org/search/sss?query=$ItemName"
target="_blank"&gt;SF Bay Area Craig's List&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://stockton.craigslist.org/search/sss?query=$ItemName"
target="_blank"&gt;Stockton Craig's List&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://sacramento.craigslist.org/search/sss?query=$ItemName"
target="_blank"&gt;Sacramento Craig's List&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://search.ebay.com/search/search.dll?satitle=$ItemName"
target="_blank"&gt;Ebay&lt;/a&gt;
EoText
}

----------------------------------------------------------


It could be a whole lot nicer. But I'm not a programmer. I just hacked this together and it shows. If any of you are programmers and want to make this a neater program it would be appreciated.

GK
 
OK now THAT was done by a programmer. SWEET! That is exactly how I envisioned mine eventually working but I had no idea how to get there.

Mine just got supplanted!

GK
 
I have known about this search for about a year.. I guess craigslist people don't like it.. They keep finding ways to disable it.. Every once in a while you'll see a how to fix up at the top. So if for some reason it doesn't work.. Look for it at the top..

http://www.crazedlist.org/
 
[/quote]
Oh Yes. This one rocks. Thanks DocStram for starting this great debate. Hope all your searches are profitable.
[/quote]

Ain't I somethin'!!! [8D][8D][8D][8D][8D]
 
The whole idea of Craig's List is that it's local. No mail..no fuss..just go pick it up and pay the man. That's one reason I monitor it. Otherwise it's just a buy it now ebay.

What's the advantage of searching outside your driving area anyway?
 
Define driving area. SF bay area, sacramento, stockton, monterey. 4 CL lists all within 2 hours of my house. I check them all and then decide whether it is worth the drive depending on the item/cost.

Phoenix AZ, within minutes of my parents' house where I go "regularly" anyway so checking there (especially for small stuff that is easily shipped) makes sense too.

GK
 
Status
Not open for further replies.
Back
Top Bottom