Skip Menu |

This queue is for tickets about the WWW-Myspace CPAN distribution.

Report information
The Basics
Id: 28544
Status: resolved
Priority: 0/
Queue: WWW-Myspace

People
Owner: Nobody in particular
Requestors: ethandbrown [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Help with band show form automation.
Date: Sun, 29 Jul 2007 16:52:08 -0700
To: bug-WWW-Myspace [...] rt.cpan.org
From: "Ethan Brown" <ethandbrown [...] gmail.com>
Dear WWW-Myspace maintainers-- First, thank you for your efforts which provide this very useful module. I am trying to mechanize the Myspace Band site "Add A Show" form using your module. I felt that I was making progress, but am getting an error submitting the form (via submit_form) for the value of the "State" form element. I reviewed the form page source and saw that the "State" option value for "California" is "California|5", however I am getting the error Illegal value 'California|5' for field 'State' at /usr/local/share/perl/5.8.7/HTML/Form.pm line 512 when running my test program (see attached). Any help is appreciated in moving forward with this, including RTFM if I missed something in the manual. Thanks, --Ethan =========================================================================== #!/usr/bin/perl ## ## Test script for interacting with Myspace. There is currently no function ## in the WWW::Myspace module for adding a show for a band account, but ## there is a very handy method submit_form() for submitting an arbitrary ## Myspace form (by URL). Try using that. ## ## Note: The Myspace account must be a band account for this to have any hope of ## working. ## use warnings; use strict; use Data::Dumper; use WWW::Myspace; my $account = 'ethandbrown@gmail.com'; #Your account name (email) goes here. my $password = 'not_telling'; #Your password goes here. my $myspace = WWW::Myspace->new (account_name => $account, password => $password, human => 1); unless ( $myspace->logged_in ) { die "Login failed: " . $myspace->error } ## Set up new band show form elements my $form_url = 'http://editprofile.myspace.com/index.cfm?fuseaction=bandprofile.shows'; my $form_fields = {'sMonth' => 'September', 'sDay' => '6', 'sYear' => '2007', 'sHour' => '20', 'sMin' => '15', 'Venue_Name' => 'Rockin Cafe', 'Address' => '123 Main St.', 'State' => 'California|5', 'Country' => 'US', 'City' => 'Ramona', 'Zip_Code' => '92065', 'Description'=> 'A total rave party!'}; my $button = "formSubmit"; my $submitted = $myspace->submit_form( { page => $form_url, follow => 1, form_name => 'theForm', fields_ref => $form_fields, button => $button } ); unless ( $submitted ) { die "Initial form submission failed."; } ## Submit the confirmation form: $submitted = $myspace->submit_form({ follow => 1, form_no => 1 }); unless ( $submitted ) { die "Form confirmation failed."; }
Subject: Re: [rt.cpan.org #28544] Help with band show form automation.
Date: Tue, 28 Aug 2007 03:18:30 -0700
To: bug-WWW-Myspace [...] rt.cpan.org
From: Grant Grueninger <grantg [...] spamarrest.com>
Hi Ethan, It looks like myspace is creating the State values in the form using Javascript, so as far as WWW::Mechanize is concerned, "California|5" isn't an option for that form. So we'd either have to manually add the form value, or create a new form and post it. Welcome to hacking myspace's monkey code... Grant On Jul 29, 2007, at 4:52 PM, Ethan Brown via RT wrote: Show quoted text
> > Sun Jul 29 19:52:31 2007: Request 28544 was acted upon. > Transaction: Ticket created by ethandbrown@gmail.com > Queue: WWW-Myspace > Subject: Help with band show form automation. > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: ethandbrown@gmail.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=28544 > > > > Dear WWW-Myspace maintainers-- > > First, thank you for your efforts which provide this very useful > module. > > I am trying to mechanize the Myspace Band site "Add A Show" form using > your module. I felt that I was making progress, but am getting an > error submitting the form (via submit_form) for the value of the > "State" form element. > > I reviewed the form page source and saw that the "State" option > value for > "California" is "California|5", however I am getting the error > > Illegal value 'California|5' for field 'State' at > /usr/local/share/perl/5.8.7/HTML/Form.pm line 512 > > when running my test program (see attached). > > Any help is appreciated in moving forward with this, including RTFM if > I missed something in the manual. > > Thanks, > > --Ethan > > ====================================================================== > ===== > #!/usr/bin/perl > ## > ## Test script for interacting with Myspace. There is currently no > function > ## in the WWW::Myspace module for adding a show for a band account, > but > ## there is a very handy method submit_form() for submitting an > arbitrary > ## Myspace form (by URL). Try using that. > ## > ## Note: The Myspace account must be a band account for this to > have any hope of > ## working. > ## > > use warnings; > use strict; > > use Data::Dumper; > use WWW::Myspace; > > my $account = 'ethandbrown@gmail.com'; #Your account name (email) > goes here. > my $password = 'not_telling'; #Your password goes here. > > my $myspace = WWW::Myspace->new (account_name => $account, > password => $password, > human => 1); > > unless ( $myspace->logged_in ) { die "Login failed: " . $myspace-
> >error }
> > ## Set up new band show form elements > > my $form_url = 'http://editprofile.myspace.com/index.cfm? > fuseaction=bandprofile.shows'; > > my $form_fields = {'sMonth' => 'September', > 'sDay' => '6', > 'sYear' => '2007', > 'sHour' => '20', > 'sMin' => '15', > 'Venue_Name' => 'Rockin Cafe', > 'Address' => '123 Main St.', > 'State' => 'California|5', > 'Country' => 'US', > 'City' => 'Ramona', > 'Zip_Code' => '92065', > 'Description'=> 'A total rave party!'}; > > my $button = "formSubmit"; > > my $submitted = > $myspace->submit_form( { > page => $form_url, > follow => 1, > form_name => 'theForm', > fields_ref => $form_fields, > button => $button > } ); > > unless ( $submitted ) > { > die "Initial form submission failed."; > } > > ## Submit the confirmation form: > $submitted = $myspace->submit_form({ follow => 1, > form_no => 1 > }); > > unless ( $submitted ) > { > die "Form confirmation failed."; > } > >
Subject: Re: [rt.cpan.org #28544] Help with band show form automation.
Date: Tue, 28 Aug 2007 07:38:30 -0700
To: bug-WWW-Myspace [...] rt.cpan.org
From: "Ethan Brown" <ethandbrown [...] gmail.com>
Thanks Grant. I'm happy to have a shot at that. Where can I RTFM about that? I suppose WWW::Mechanize is a good place to start? I have a webapp, WheresTheGig.com that's about 30,000 lines of Perl, with over 1,000 users. I'm able to interoperate with other calendar sites like Google Calendar, but many of my users would like to be able to export their gigs on to their MySpace band sites. Thanks for your help, --Ethan On 8/28/07, grantg@spamarrest.com via RT <bug-WWW-Myspace@rt.cpan.org> wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=28544 > > > Hi Ethan, > > It looks like myspace is creating the State values in the form using > Javascript, so as far as WWW::Mechanize is concerned, "California|5" > isn't an option for that form. So we'd either have to manually add > the form value, or create a new form and post it. Welcome to hacking > myspace's monkey code... > > Grant > > On Jul 29, 2007, at 4:52 PM, Ethan Brown via RT wrote: >
> > > > Sun Jul 29 19:52:31 2007: Request 28544 was acted upon. > > Transaction: Ticket created by ethandbrown@gmail.com > > Queue: WWW-Myspace > > Subject: Help with band show form automation. > > Broken in: (no value) > > Severity: (no value) > > Owner: Nobody > > Requestors: ethandbrown@gmail.com > > Status: new > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=28544 > > > > > > > Dear WWW-Myspace maintainers-- > > > > First, thank you for your efforts which provide this very useful > > module. > > > > I am trying to mechanize the Myspace Band site "Add A Show" form using > > your module. I felt that I was making progress, but am getting an > > error submitting the form (via submit_form) for the value of the > > "State" form element. > > > > I reviewed the form page source and saw that the "State" option > > value for > > "California" is "California|5", however I am getting the error > > > > Illegal value 'California|5' for field 'State' at > > /usr/local/share/perl/5.8.7/HTML/Form.pm line 512 > > > > when running my test program (see attached). > > > > Any help is appreciated in moving forward with this, including RTFM if > > I missed something in the manual. > > > > Thanks, > > > > --Ethan > > > > ====================================================================== > > ===== > > #!/usr/bin/perl > > ## > > ## Test script for interacting with Myspace. There is currently no > > function > > ## in the WWW::Myspace module for adding a show for a band account, > > but > > ## there is a very handy method submit_form() for submitting an > > arbitrary > > ## Myspace form (by URL). Try using that. > > ## > > ## Note: The Myspace account must be a band account for this to > > have any hope of > > ## working. > > ## > > > > use warnings; > > use strict; > > > > use Data::Dumper; > > use WWW::Myspace; > > > > my $account = 'ethandbrown@gmail.com'; #Your account name (email) > > goes here. > > my $password = 'not_telling'; #Your password goes here. > > > > my $myspace = WWW::Myspace->new (account_name => $account, > > password => $password, > > human => 1); > > > > unless ( $myspace->logged_in ) { die "Login failed: " . $myspace-
> > >error }
> > > > ## Set up new band show form elements > > > > my $form_url = 'http://editprofile.myspace.com/index.cfm? > > fuseaction=bandprofile.shows'; > > > > my $form_fields = {'sMonth' => 'September', > > 'sDay' => '6', > > 'sYear' => '2007', > > 'sHour' => '20', > > 'sMin' => '15', > > 'Venue_Name' => 'Rockin Cafe', > > 'Address' => '123 Main St.', > > 'State' => 'California|5', > > 'Country' => 'US', > > 'City' => 'Ramona', > > 'Zip_Code' => '92065', > > 'Description'=> 'A total rave party!'}; > > > > my $button = "formSubmit"; > > > > my $submitted = > > $myspace->submit_form( { > > page => $form_url, > > follow => 1, > > form_name => 'theForm', > > fields_ref => $form_fields, > > button => $button > > } ); > > > > unless ( $submitted ) > > { > > die "Initial form submission failed."; > > } > > > > ## Submit the confirmation form: > > $submitted = $myspace->submit_form({ follow => 1, > > form_no => 1 > > }); > > > > unless ( $submitted ) > > { > > die "Form confirmation failed."; > > } > > > >
> > >
Subject: Re: [rt.cpan.org #28544] Help with band show form automation.
Date: Tue, 28 Aug 2007 10:35:38 -0700
To: bug-WWW-Myspace [...] rt.cpan.org
From: Grant Grueninger <grantg [...] spamarrest.com>
Hm, interesting project. I'd start with WWW::Mechanize. If you feel adventurous and are semi-familiar with writing OO perl modules, consider making this gig posting routine a method of WWW::Myspace. (To quote TFM under submit_form: "Please use the format below if you use this method (which you shouldn't need unless you're writing more methods)" :). Read CONTRIBUTING and SUBMITTING A PATCH sections of 'perldoc WWW::Myspace', and if you're doing enough editing I can give you svn write access to the module. Grant On Aug 28, 2007, at 7:39 AM, Ethan Brown via RT wrote: Show quoted text
> > Queue: WWW-Myspace > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=28544 > > > Thanks Grant. I'm happy to have a shot at that. Where can I RTFM > about that? I suppose WWW::Mechanize is a good place to start? I > have a webapp, WheresTheGig.com that's about 30,000 lines of Perl, > with over 1,000 users. I'm able to interoperate with other calendar > sites like Google Calendar, but many of my users would like to be able > to export their gigs on to their MySpace band sites. > > Thanks for your help, > > --Ethan > > On 8/28/07, grantg@spamarrest.com via RT <bug-WWW- > Myspace@rt.cpan.org> wrote:
>> >> <URL: http://rt.cpan.org/Ticket/Display.html?id=28544 > >> >> Hi Ethan, >> >> It looks like myspace is creating the State values in the form using >> Javascript, so as far as WWW::Mechanize is concerned, "California|5" >> isn't an option for that form. So we'd either have to manually add >> the form value, or create a new form and post it. Welcome to hacking >> myspace's monkey code... >> >> Grant >> >> On Jul 29, 2007, at 4:52 PM, Ethan Brown via RT wrote: >>
>>> >>> Sun Jul 29 19:52:31 2007: Request 28544 was acted upon. >>> Transaction: Ticket created by ethandbrown@gmail.com >>> Queue: WWW-Myspace >>> Subject: Help with band show form automation. >>> Broken in: (no value) >>> Severity: (no value) >>> Owner: Nobody >>> Requestors: ethandbrown@gmail.com >>> Status: new >>> Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=28544 > >>> >>> >>> Dear WWW-Myspace maintainers-- >>> >>> First, thank you for your efforts which provide this very useful >>> module. >>> >>> I am trying to mechanize the Myspace Band site "Add A Show" form >>> using >>> your module. I felt that I was making progress, but am getting an >>> error submitting the form (via submit_form) for the value of the >>> "State" form element. >>> >>> I reviewed the form page source and saw that the "State" option >>> value for >>> "California" is "California|5", however I am getting the error >>> >>> Illegal value 'California|5' for field 'State' at >>> /usr/local/share/perl/5.8.7/HTML/Form.pm line 512 >>> >>> when running my test program (see attached). >>> >>> Any help is appreciated in moving forward with this, including >>> RTFM if >>> I missed something in the manual. >>> >>> Thanks, >>> >>> --Ethan >>> >>> ==================================================================== >>> == >>> ===== >>> #!/usr/bin/perl >>> ## >>> ## Test script for interacting with Myspace. There is currently no >>> function >>> ## in the WWW::Myspace module for adding a show for a band account, >>> but >>> ## there is a very handy method submit_form() for submitting an >>> arbitrary >>> ## Myspace form (by URL). Try using that. >>> ## >>> ## Note: The Myspace account must be a band account for this to >>> have any hope of >>> ## working. >>> ## >>> >>> use warnings; >>> use strict; >>> >>> use Data::Dumper; >>> use WWW::Myspace; >>> >>> my $account = 'ethandbrown@gmail.com'; #Your account name (email) >>> goes here. >>> my $password = 'not_telling'; #Your password goes here. >>> >>> my $myspace = WWW::Myspace->new (account_name => $account, >>> password => $password, >>> human => 1); >>> >>> unless ( $myspace->logged_in ) { die "Login failed: " . $myspace-
>>>> error }
>>> >>> ## Set up new band show form elements >>> >>> my $form_url = 'http://editprofile.myspace.com/index.cfm? >>> fuseaction=bandprofile.shows'; >>> >>> my $form_fields = {'sMonth' => 'September', >>> 'sDay' => '6', >>> 'sYear' => '2007', >>> 'sHour' => '20', >>> 'sMin' => '15', >>> 'Venue_Name' => 'Rockin Cafe', >>> 'Address' => '123 Main St.', >>> 'State' => 'California|5', >>> 'Country' => 'US', >>> 'City' => 'Ramona', >>> 'Zip_Code' => '92065', >>> 'Description'=> 'A total rave party!'}; >>> >>> my $button = "formSubmit"; >>> >>> my $submitted = >>> $myspace->submit_form( { >>> page => $form_url, >>> follow => 1, >>> form_name => 'theForm', >>> fields_ref => $form_fields, >>> button => $button >>> } ); >>> >>> unless ( $submitted ) >>> { >>> die "Initial form submission failed."; >>> } >>> >>> ## Submit the confirmation form: >>> $submitted = $myspace->submit_form({ follow => 1, >>> form_no => 1 >>> }); >>> >>> unless ( $submitted ) >>> { >>> die "Form confirmation failed."; >>> } >>> >>>
>> >> >>
> >
Subject: Re: [rt.cpan.org #28544] Help with band show form automation.
Date: Tue, 28 Aug 2007 10:52:57 -0700
To: bug-WWW-Myspace [...] rt.cpan.org
From: "Ethan Brown" <ethandbrown [...] gmail.com>
Thanks Grant. If you're interested, my site is WheresTheGig.com. I've implemented a fair amount of interoperation infrastructure, including XML data export, RSS feeds, ICal exports, CSV exports, and Google Calendar interoperation via their API (through Simon Winslow's Net::Google::Calendar module). I'm pretty annoyed at how difficult it is to work with MySpace. I sent their tech support a question about interoperation, but they don't seem that interested. (I like writing in Perl very much, and working on WheresTheGig keeps me sane. I'm forced to write most apps in PHP for my day job :-/) I'll start looking into WWW::Mechanize and will try not to annoy you with dumb questions :-) Thanks much, --Ethan On 8/28/07, grantg@spamarrest.com via RT <bug-WWW-Myspace@rt.cpan.org> wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=28544 > > > Hm, interesting project. I'd start with WWW::Mechanize. If you feel > adventurous and are semi-familiar with writing OO perl modules, > consider making this gig posting routine a method of WWW::Myspace. > (To quote TFM under submit_form: "Please use the format below if you > use this method (which you shouldn't need unless you're writing more > methods)" :). > > Read CONTRIBUTING and SUBMITTING A PATCH sections of 'perldoc > WWW::Myspace', and if you're doing enough editing I can give you svn > write access to the module. > > Grant > > On Aug 28, 2007, at 7:39 AM, Ethan Brown via RT wrote: >
> > > > Queue: WWW-Myspace > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=28544 > > > > > Thanks Grant. I'm happy to have a shot at that. Where can I RTFM > > about that? I suppose WWW::Mechanize is a good place to start? I > > have a webapp, WheresTheGig.com that's about 30,000 lines of Perl, > > with over 1,000 users. I'm able to interoperate with other calendar > > sites like Google Calendar, but many of my users would like to be able > > to export their gigs on to their MySpace band sites. > > > > Thanks for your help, > > > > --Ethan > > > > On 8/28/07, grantg@spamarrest.com via RT <bug-WWW- > > Myspace@rt.cpan.org> wrote:
> >> > >> <URL: http://rt.cpan.org/Ticket/Display.html?id=28544 > > >> > >> Hi Ethan, > >> > >> It looks like myspace is creating the State values in the form using > >> Javascript, so as far as WWW::Mechanize is concerned, "California|5" > >> isn't an option for that form. So we'd either have to manually add > >> the form value, or create a new form and post it. Welcome to hacking > >> myspace's monkey code... > >> > >> Grant > >> > >> On Jul 29, 2007, at 4:52 PM, Ethan Brown via RT wrote: > >>
> >>> > >>> Sun Jul 29 19:52:31 2007: Request 28544 was acted upon. > >>> Transaction: Ticket created by ethandbrown@gmail.com > >>> Queue: WWW-Myspace > >>> Subject: Help with band show form automation. > >>> Broken in: (no value) > >>> Severity: (no value) > >>> Owner: Nobody > >>> Requestors: ethandbrown@gmail.com > >>> Status: new > >>> Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=28544 > > >>> > >>> > >>> Dear WWW-Myspace maintainers-- > >>> > >>> First, thank you for your efforts which provide this very useful > >>> module. > >>> > >>> I am trying to mechanize the Myspace Band site "Add A Show" form > >>> using > >>> your module. I felt that I was making progress, but am getting an > >>> error submitting the form (via submit_form) for the value of the > >>> "State" form element. > >>> > >>> I reviewed the form page source and saw that the "State" option > >>> value for > >>> "California" is "California|5", however I am getting the error > >>> > >>> Illegal value 'California|5' for field 'State' at > >>> /usr/local/share/perl/5.8.7/HTML/Form.pm line 512 > >>> > >>> when running my test program (see attached). > >>> > >>> Any help is appreciated in moving forward with this, including > >>> RTFM if > >>> I missed something in the manual. > >>> > >>> Thanks, > >>> > >>> --Ethan > >>> > >>> ==================================================================== > >>> == > >>> ===== > >>> #!/usr/bin/perl > >>> ## > >>> ## Test script for interacting with Myspace. There is currently no > >>> function > >>> ## in the WWW::Myspace module for adding a show for a band account, > >>> but > >>> ## there is a very handy method submit_form() for submitting an > >>> arbitrary > >>> ## Myspace form (by URL). Try using that. > >>> ## > >>> ## Note: The Myspace account must be a band account for this to > >>> have any hope of > >>> ## working. > >>> ## > >>> > >>> use warnings; > >>> use strict; > >>> > >>> use Data::Dumper; > >>> use WWW::Myspace; > >>> > >>> my $account = 'ethandbrown@gmail.com'; #Your account name (email) > >>> goes here. > >>> my $password = 'not_telling'; #Your password goes here. > >>> > >>> my $myspace = WWW::Myspace->new (account_name => $account, > >>> password => $password, > >>> human => 1); > >>> > >>> unless ( $myspace->logged_in ) { die "Login failed: " . $myspace-
> >>>> error }
> >>> > >>> ## Set up new band show form elements > >>> > >>> my $form_url = 'http://editprofile.myspace.com/index.cfm? > >>> fuseaction=bandprofile.shows'; > >>> > >>> my $form_fields = {'sMonth' => 'September', > >>> 'sDay' => '6', > >>> 'sYear' => '2007', > >>> 'sHour' => '20', > >>> 'sMin' => '15', > >>> 'Venue_Name' => 'Rockin Cafe', > >>> 'Address' => '123 Main St.', > >>> 'State' => 'California|5', > >>> 'Country' => 'US', > >>> 'City' => 'Ramona', > >>> 'Zip_Code' => '92065', > >>> 'Description'=> 'A total rave party!'}; > >>> > >>> my $button = "formSubmit"; > >>> > >>> my $submitted = > >>> $myspace->submit_form( { > >>> page => $form_url, > >>> follow => 1, > >>> form_name => 'theForm', > >>> fields_ref => $form_fields, > >>> button => $button > >>> } ); > >>> > >>> unless ( $submitted ) > >>> { > >>> die "Initial form submission failed."; > >>> } > >>> > >>> ## Submit the confirmation form: > >>> $submitted = $myspace->submit_form({ follow => 1, > >>> form_no => 1 > >>> }); > >>> > >>> unless ( $submitted ) > >>> { > >>> die "Form confirmation failed."; > >>> } > >>> > >>>
> >> > >> > >>
> > > >
> > >
Closing old ticket.