Google Answers Logo
View Question
 
Q: Need eBay login script ( No Answer,   2 Comments )
Question  
Subject: Need eBay login script
Category: Computers
Asked by: dirthurts-ga
List Price: $10.00
Posted: 24 Jun 2002 11:26 PDT
Expires: 25 Jun 2002 03:15 PDT
Question ID: 32473
I need a script to login to eBay using Perl/LWP/HTTP::Cookies and
return the email addresses of the high bidders on my auctions.

Clarification of Question by dirthurts-ga on 25 Jun 2002 02:08 PDT
ok, how about this:  

Why am I getting an error from eBay that my browser doesn't accept
cookies when I use this script?
---------------------------------
#!/usr/bin/perl

use LWP; 
use HTTP::Request::Common; 
use HTTP::Cookies; 
 
$userid	=	''; 
$pass	=	''; 

$ua = LWP::UserAgent->new; 
$ua->cookie_jar(HTTP::Cookies->new); 

$req=$ua->request(POST 'http://cgi3.ebay.com/aw-cgi/eBayISAPI.dll', 
	[
	'MfcISAPICommand'	=>	'SignInWelcome',
	'siteid'			=>	0, 
	'co_partnerId'		=>	2,
	'UsingSSL'			=>	0,
	'ru'				=>	'',
	'pp'				=> 	'',
	'pa1'				=>	'',
	'pa2'				=>	'',
	'pa3'				=>	'',
	'i1'				=>	-1,
	'pageType'			=>	559,
	'userid'			=>	$userid,
	'pass'				=>	$pass,
	]);

print $req->content;

Clarification of Question by dirthurts-ga on 25 Jun 2002 03:14 PDT
ahh... got it working!  
simply added the line:

$req=$ua->request(GET
'http://cgi3.ebay.com/aw-cgi/eBayISAPI.dll?SignIn');

before the POST.  Looks like eBay sets a session cookie on that page,
then checks for it when I do the post.  Awesome!

Here is the complete script, not too spiffy, all it does is log
in...but it is a start!
----------------------------------
#!/usr/bin/perl

use LWP; 
use HTTP::Request::Common; 
use HTTP::Cookies; 
 
$userid	=	''; 
$pass	=	''; 
 
$ua = LWP::UserAgent->new; 
$ua->cookie_jar(HTTP::Cookies->new(file=>'lwp-cookies',autosave=>1));

$req=$ua->request(GET
'http://cgi3.ebay.com/aw-cgi/eBayISAPI.dll?SignIn');

$req=$ua->request(POST 'http://cgi3.ebay.com/aw-cgi/eBayISAPI.dll', 
	[
	'MfcISAPICommand'	=>	'SignInWelcome',
	'siteid'			=>	0, 
	'co_partnerId'		=>	2,
	'UsingSSL'			=>	0,
	'ru'				=>	'',
	'pp'				=> 	'',
	'pa1'				=>	'',
	'pa2'				=>	'',
	'pa3'				=>	'',
	'i1'				=>	-1,
	'pageType'			=>	559,
	'userid'			=>	$userid,
	'pass'				=>	$pass,
	]);

print $req->content;
Answer  
There is no answer at this time.

Comments  
Subject: Re: Need eBay login script
From: oblom-ga on 24 Jun 2002 11:40 PDT
 
I can write one, but $10 is not going to covert time spent. :-)
Subject: Re: Need eBay login script
From: runix-ga on 24 Jun 2002 11:45 PDT
 
I think you have to raise your price.
If you don't want to and you want to code the bot yourself, you can I
answered a question explaining how to write webbots:
[ https://answers.google.com/answers/main?cmd=threadview&id=28442 ]

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy