LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Closed Thread
 
LinkBack Search this Thread
Old 03-11-2007, 08:29 PM   #1
Komelore
LQ Newbie
 
Registered: Feb 2007
Distribution: Gentoo
Posts: 10

Rep: Reputation: 0
Quick shell scripting question


I am trying to write a script that when ran will show me if a friend is on xbox live. So far I have something along the lines of:

Quote:
wget http://live.xbox.com/en-US/profile/p...rTag=Kugamunga index.html
cat index.html | grep offline || echo "kuga is online"
except that microsoft doesnt like me using wget to get the webpage file. It gives me problems such as
Quote:
--18:34:26-- http://live.xbox.com/en-US/profile/profile.aspx?pp=0
=> `profile.aspx?pp=0'
Resolving live.xbox.com... 65.59.234.169
Connecting to live.xbox.com|65.59.234.169|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://login.live.com/login.srf?wa=...pZ3D0&id=66262 [following]
--18:34:26-- https://login.live.com/login.srf?wa=...pZ3D0&id=66262
=> `login.srf?wa=wsignin1.0&rpsnv=10&ct=1173662598&rver=4.0.1532.0&wp=HBI&wreply=https:%2F%2Flive.xbox. com%2Fxweb%2Flive%2Fpassport%2FsetCookies.ashx?rru=httpZ3AZ2FZ2FliveZ2ExboxZ2EcomZ2FenZ2DUSZ2Fprofil eZ2FprofileZ2EaspxZ3FppZ3D0&lc=1033&cb=BhttpZ3AZ2FZ2FliveZ2ExboxZ2EcomZ2FenZ2DUSZ2FprofileZ2Fprofile Z2EaspxZ3FppZ3D0&id=66262'
Resolving login.live.com... 65.54.183.202
Connecting to login.live.com|65.54.183.202|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11,651 (11K) [text/html]
login.srf?wa=wsignin1.0&rpsnv=10&ct=1173662598&rver=4.0.1532.0&wp=HBI&wreply=https:%2F%2Flive.xbox.c om%2Fxweb%2Flive%2Fpassport%2FsetCookies.ashx?rru=httpZ3AZ2FZ2FliveZ2ExboxZ2EcomZ2FenZ2DUSZ2Fprofile Z2FprofileZ2EaspxZ3FppZ3D0&lc=1033&cb=BhttpZ3AZ2FZ2FliveZ2ExboxZ2EcomZ2FenZ2DUSZ2FprofileZ2FprofileZ 2EaspxZ3FppZ3D0&id=66262: File name too long

Cannot write to `login.srf?wa=wsignin1.0&rpsnv=10&ct=1173662598&rver=4.0.1532.0&wp=HBI&wreply=https:%2F%2Flive.xbox. com%2Fxweb%2Flive%2Fpassport%2FsetCookies.ashx?rru=httpZ3AZ2FZ2FliveZ2ExboxZ2EcomZ2FenZ2DUSZ2Fprofil eZ2FprofileZ2EaspxZ3FppZ3D0&lc=1033&cb=BhttpZ3AZ2FZ2FliveZ2ExboxZ2EcomZ2FenZ2DUSZ2FprofileZ2Fprofile Z2EaspxZ3FppZ3D0&id=66262' (Success).

[2]+ Exit 1 wget http://live.xbox.com/en-US/profile/profile.aspx?pp=0
what other solutions are there? I want to be able to just check to see if a certain value is on the website mainly to see if a user is online.

Thanks
 
Old 03-11-2007, 11:11 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,501

Rep: Reputation: 285Reputation: 285Reputation: 285
Duplicate of this posting
 
Old 03-12-2007, 05:08 AM   #3
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,063

Rep: Reputation: 221Reputation: 221Reputation: 221
You could try using elinks to dump the text from the webpage. Use elinks first to login to the page and save any cookies needed, then when later using -dump command it should log you in automatically.
 
Old 03-12-2007, 08:39 AM   #4
crabboy
Moderator
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,755

Rep: Reputation: 88
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

Follow the link above.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Scripting Question Komelore Programming 2 02-28-2007 07:16 PM
shell scripting question creolophus Linux - Software 1 10-02-2006 02:13 AM
a shell-scripting question: mrchaos Slackware 3 09-22-2005 11:00 AM
Shell Scripting Question b_vasu Linux - Newbie 1 11-21-2003 02:10 PM
Shell Scripting Question jester_69 Programming 13 11-05-2003 06:55 PM


All times are GMT -5. The time now is 05:07 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration