How to, login into the yahoo groups/clubs,....

Hi,
I would like to write a offline browser utility to follow up my yahoo groups and clubs.
I took several attempts before I wrote this mail and I discoverd that it are the redirections and cookies that cause the problems.
Does anyone know a class capable to download a URL dispite of cookies and redirections?
I tried with the swing-brower that comes as example with the JDK but he has also problems with the cookies and redirections.
Greetings
Frank

Hi,
I found the sollution to my problem with the help of the sniplet of madhu77 "Dealing with cookies" from nov 8, 2000 10:05 AM
I worte a class to login to the yahoo clubs, I just added the hidden parameters from HTML form, and two methods, one to retrieve the login page and a second to get a HashSet of String(URLs) to the clubs your a member of. The constructor accepts login name and password as parameters.
import java.net.*;
import java.io.*;
import java.util.*;
public class YahooClubsLogin
private String loginName="";
private String password="";
private String loginPage="";
public YahooClubsLogin(String pLoginName,String pPassword)
try
loginName=pLoginName;
password=pPassword;
String firstcookie="";
URL u = new URL("http://clubs.yahoo.com/clubs.html");
URLConnection uc = u.openConnection();
HttpURLConnection huc = (HttpURLConnection)uc;
huc.setFollowRedirects(false);
String cookie1 = huc.getHeaderField("set-cookie");
if(cookie1!=null)
{ int index = cookie1.indexOf(";");
if(index > 0)
firstcookie = cookie1.substring(0, index);
URL loginurl = new URL("http://login.yahoo.com/config/login");
URLConnection con = loginurl.openConnection();
HttpURLConnection httpcon = (HttpURLConnection)con;
httpcon.setDoInput(true);
httpcon.setDoOutput(true);
httpcon.setUseCaches(false);
httpcon.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
httpcon.setRequestProperty("Cookie", firstcookie);
httpcon.setFollowRedirects(false);
OutputStream raw = httpcon.getOutputStream();
OutputStream buffered = new BufferedOutputStream(raw);
OutputStreamWriter out = new OutputStreamWriter(buffered);
String query = ".tries"+"="+URLEncoder.encode("1")+"&"+
".done"+"="+URLEncoder.encode("http://clubs.yahoo.com/clubs/")+"&"+
".src"+"="+URLEncoder.encode("grp")+"&"+
".intl"+"="+URLEncoder.encode("us")+"&"+
"login"+"="+URLEncoder.encode(loginName)+"&"+
"passwd"+"="+URLEncoder.encode(password)+"&"+
".persistent"+"="+URLEncoder.encode("Y")+"&"+
".chkP"+"="+URLEncoder.encode("Y")+"&"+
"Submit"+"="+URLEncoder.encode("Login");
out.write(query);
out.write("\r\n");
out.flush();
out.close();
for(int p=0; p<15 ; p++)
String header2 = httpcon.getHeaderField(p);
String key2 =httpcon.getHeaderFieldKey(p);
String location = httpcon.getHeaderField("location");
int j=1;
int count = 0;
String[] cookies = new String[4];
while(httpcon.getHeaderFieldKey(j)!= null)
String key =
httpcon.getHeaderFieldKey(j).toLowerCase();
if(key.indexOf("set-cookie")!=-1)
String header = httpcon.getHeaderField(j);
int ind = header.indexOf(";");
if(ind > 0)
String cookie = header.substring(0, ind);
cookies[count] = cookie;
count++;
j++;
String cookiestring = new String();
for(int k=0; k<count; k++)
cookiestring = cookiestring.concat(cookies[k]+";");
URL verifyurl = new URL(location);
URLConnection loccon = verifyurl.openConnection();
HttpURLConnection lcon = (HttpURLConnection)loccon;
lcon.setFollowRedirects(false);
lcon.setRequestProperty("Cookie", cookiestring);
for(int r=0; r<15 ; r++)
String header3 = lcon.getHeaderField(r);
String key3 = lcon.getHeaderFieldKey(r);
int code = lcon.getResponseCode();
String response =lcon.getResponseMessage();
String location2 = lcon.getHeaderField("location");
String secondcookie = new String();
String cookie2 = lcon.getHeaderField("set-cookie");
if(cookie2!=null)
int index2 = cookie2.indexOf(";");
if(index2 > 0)
secondcookie = cookie2.substring(0, index2);
secondcookie = cookiestring+";"+secondcookie;
URL myurl = new URL(location2);
URLConnection mycon = myurl.openConnection();
HttpURLConnection hmycon = (HttpURLConnection)mycon;
hmycon.setFollowRedirects(false);
hmycon.setRequestProperty("Cookie", secondcookie);
for(int s=0; s<15 ; s++)
String header4 = hmycon.getHeaderField(s);
String key4 = hmycon.getHeaderFieldKey(s);
InputStream data = hmycon.getInputStream();
InputStream in = new BufferedInputStream(data);
Reader r = new InputStreamReader(in);
StringBuffer tmpPage=new StringBuffer(20000);
int c;
while ((c = r.read())!= -1)
tmpPage.append((char)c);
loginPage = tmpPage.toString();
catch(Exception e)
String getLoginPage()
return loginPage;
HashSet getClubURLs()
HashSet urls = new HashSet();
int loginNamePos = loginPage.indexOf(loginName);
int endOfClubsTable = loginPage.indexOf("/table>",loginNamePos);
int positionOfClub = loginPage.indexOf("http://clubs.yahoo.com/clubs/",loginNamePos);
while (positionOfClub > loginNamePos && positionOfClub < endOfClubsTable )
int positionEndClub = loginPage.indexOf("\">",positionOfClub);
urls.add(loginPage.substring(positionOfClub,positionEndClub));
positionOfClub = loginPage.indexOf("http://clubs.yahoo.com/clubs/",positionEndClub);
return urls;

Similar Messages

  • Hello, iam using the latest version of firefox, whenever i login into my yahoo mail account i get a stop script error, the details of the error script is mentioned below , please suggest how to stop this : STOP ERROR

    Hello, iam using the latest version of firefox, whenever i login into my yahoo mail account i get a stop script error, the details of the error script is mentioned below , please suggest how to stop this
    the website is www.mail.yahoo.com. i was getting the same STOP script error every now and then in firefox 6 as well

    I have had a similar problem with my system. I just recently (within a week of this post) built a brand new desktop. I installed Windows 7 64-bit Home and had a clean install, no problems. Using IE downloaded an anti-virus program, and then, because it was the latest version, downloaded and installed Firefox 4.0. As I began to search the internet for other programs to install after about maybe 10-15 minutes my computer crashes. Blank screen (yet monitor was still receiving a signal from computer) and completely frozen (couldn't even change the caps and num lock on keyboard). I thought I perhaps forgot to reboot after an update so I did a manual reboot and it started up fine.
    When ever I got on the internet (still using firefox) it would crash after anywhere between 5-15 minutes. Since I've had good experience with FF in the past I thought it must be either the drivers or a hardware problem. So in-between crashes I updated all the drivers. Still had the same problem. Took the computer to a friend who knows more about computers than I do, made sure all the drivers were updated, same problem. We thought that it might be a hardware problem (bad video card, chipset, overheating issues, etc.), but after my friend played around with my computer for a day he found that when he didn't start FF at all it worked fine, even after watching a movie, or going through a playlist on Youtube.
    At the time of this posting I'm going to try to uninstall FF 4.0 and download and install FF 3.6.16 which is currently on my laptop and works like a dream. Hopefully that will do the trick, because I love using FF and would hate to have to switch to another browser. Hopefully Mozilla will work out the kinks with FF 4 so I can continue to use it.
    I apologize for the lengthy post. Any feedback would be appreciated, but is not necessary. I will try and post back after I try FF 3.16.6.

  • How to Find out who is login into the Portal.

    Hi Friends ,
    I have one doubt  Now I have one Requirement. i.e.
    How many members (users) login in to the Portal?
    In what time they login into the portal?
    How many times hits the iView in  Portal?
    Who is last login into the portal?
    I have find out these details by using these details I will create one Iview.
    How to find these details. By using these details I will created one iView. Kindly  let me know.
    Could you tell me those
    1.     Is it creating Portal Activity Report iView in Portal?
    2.     By using WDJ Application we can create one Application. By using this application we can create iView?
    Regards
    Vijay Kalluri

    Hello Vijay,
    If you are interested in a 3rd party application with all the stats you need and more, check out Click Stream by Sweetlets. Easy to download and user friendly with many key reports quickly accessible. It also answers some of the questions you had above a whole lot simpler than anything else out there or any other route you had in mind.
    In the very near future Click Stream will also have iView recording to monitor iViews, telling which iViews have been clicked, etc. Also, the one you were looking for, "who the last login into the portal", will soon be added.
    Click Stream uses the Usermanagement (UME) API to get more information about the user, groups, roles, LDAP attributes etc. and offers you the ability to use such information for filtering within any report.
    Click Stream also uses the PCD API to get information about the pages your users are visiting.
    Here are some reviews on the SAP EcoHub from people who have used it: http://ecohub.sdn.sap.com/irj/ecohub/solutions/clickstream
    Please just let me know if you have any question or if you are open to test drive Click Stream. We will certainly help as best as we can.
    Good luck.

  • How do i login into the cloud

    I am trying to login into the cloud to see what is on their....can anyone help me?

    If you want to sign into your account on your Mac, go to System Preferences>iCloud and sign in with your iCloud ID (requires OS X 10.7.5 or higher).  If you only want to view the data, go to icloud.com and sign in.

  • A MacBook Air was reported stolen From a room at my hotel that belong to a guest. I request a apple Id and password from the guest in order to track it though iCloud, when I login into the account the MacBook was not their, however I saw other device. A f

    A MacBook Air was reported stolen
    From a room at my hotel that belong to a guest. I request a apple Id and password from the guest in order to track it though iCloud, when I login into the account the MacBook was not their, however I saw other device. A few days has past then the MacBook appear. How does that happened, please explain?

    For a stolen Macbook to appear in iCloud - the person who stole it must turn it on.
    You can't track something that's turned off.

  • I can not login into the system.

    Hello! A problem - I can not login into the system. After entering the login and password for a second or two there is a blue screen, then the universe, then again a blue screen, and - again, the login window. This happens with just one account of the four on my iMac-2007 with OS 10.6.8. How can I be?

    Click here and follow the instructions.
    (36381)

  • How to login into 000 client -- sap*   in ecc6.0

    how to login into 000 client--sap*  in ecc6.0
    because i need to generate solution maneger key.
    or tell me any alternate for generating the same.
    Edited by: THIRU MALAI on May 9, 2008 9:55 AM

    Hi,
    1. You have to Configure the Email connections through SCOT tcode.
    2. After that you ccan send/recive a mails from exchange server and SAP R/3 systems.
    Look into the following link.
    http://help.spa.com--> search for E-mail configuration and aslo search for FAX configuration.
    Regards,
    Srini Nookala

  • New users are getting "cntl_error" whenever login into the portal

    Dear Experts,
    New users are getting "cntl_error" whenever login into the portal. They are accessing .par application. I have read so many threads, but unable to find exact solution.
    I have tried in my browser with the user login, then no error. But the user login there end then its giving "cntl_error" error.
    Problem with Internet Explore Browser? Any additional setting required for users browser?
    Could you please help me, how to resolve this error.
    Thanks in Advance.
    Regards,
    Vijay.

    Hi Vijay,
    Check this thread - "CNTL_ERROR" raised,error key: RFC_ERROR_SYSTEM_FAILURE- Show Team Calendar , this might help you on what you are looking for.
    Regards,
    Sen

  • Can't login into the Skype

    Hello! I can't login into the Skype. I think its banned because recently someone created group chat and told them to ban me. What should I do?
    Skype login: micro.kz

    I also have been having this EXACT problem, and have actually (like a sucker) filled out that verification for a million times, to no avail.
    The skype android app freaked out attempting to login to my MS account, which locked my MS account, which I then unlocked, but then skype got suspended, and have yet to be able to unlink them, or be verified.  Since I've had skype seemingly forever, and this is the first issue I've had, and it makes me just want to move my family over to something else.
    Its like customer support has one email response.
    I'd make a new MS account, but I have my whole Xbox sub, and everything attached to it.

  • Alter a BAPI Result Table, how to get into the display "loop" ?

    Hello all,
    i have a problem regarding the result rows of a RFC/BAPI Call.
    There are three views, let's say 1,2,3. In View 1, i call a BAPI, and display the results in a table in View 2. I added a button in each row, which calls View 3 and displays some details concerning the selected row.
    I now want to store a flag for each row, that has been displayed in this way.
    In View 3 i store the key value of the displayed row in an own value node in the context.
    When i go back from View 3 to View 2, i want to see that flag (in an extra column) in every row, that has been selected in this session.
    So i do not know, how to alter a single row in the BAPI result table, how to get into the "loop" that is used by WD to display the table.
    already tried a supply function, but i was not able to alter single rows.
    Any suggestions/tips or perhaps code fragments of working supply functions ?
    Thank you !

    Hello,
    I'm not sure whether I understood your problem correctly, but I will try to give an answer.
    The easiest way I see is to copy the RFC Results to a Component Controller Context structure with an additional Flag field. You can use WDCopyService for copying.
    Then on the event of selecting you set your flag as appropriate for you (e.g. if you want to use an image as flag you set the Image path) on the current element of your table. Then display View 3.
    On going back View 2 should show now the new flag values...
    The trick is to copy the values (as at Time structures can not be expandend with new fields) and set the Flag on the onSelect event.
    Hope this helps,
    Frank

  • How can we change the purchasing group which it is maintained in R/3?

    Hello All.
    In case of MM, purchasing group is assigned to material master.
    It means purchasing group is maintained based on material code.
    But SRM has different maintenance level.
    As you know that purchasing group has the responsibility based on material group (Product category).
    So we should change the purchasing group from R/3, when end user create shopping cart.
    How can we change the purchasing group which it is maintained in material master?
    Thank you,
    Best regards,
    SH.

    Hello So Hee,
    I am not a technical guy.
    But for your requirement i am building a logic.
    I am not sure whether it will work.
    You need to check with your ABAPER.
    It is as below:
    When the SC is approved and the other configuration is correct ,
    PR is created in ECC by the virtue of BAPI.
    You want that the pur grp should be populated on the base of matl code and not on matl grp.
    Hence in SC you will not fill up pur grp.
    In the programme for BBPSC01 i.e. SC creation you will add modification that it will call a custom FM.
    This custom FM will get the matl code from SC and will find the value of pur grp from R/3 MM01i.e. matl master(you may get in MARA).
    Now in the BAPI you need to incorporate this additional value of yr pur grp field.
    So the desired pur grp as per yr R/3 matl master will be populated in yr R/3 PR.
    Again: this is all hypothesis.
    That's all I can help you.
    BR
    Dinesh
    <b>Reward if helps</b>

  • How can I remove the Yahoo icon from my iphone?

    How can I remove the Yahoo icon from my iphone?

    This is covered in the manual.
    iPhone User Guide (For iOS 4.2 and 4.3 Software)
    Hold an icon until they all wiggle, then tap the "x" in the corner.

  • How to find out the account group information in customer master record?

    how to find out the account group information in customer master record?
    in which tab? thanks in advance

    Hi
    Go to XD02 and select the Extras from the main menu , you will find Account group info -> click on the No.ranges.
    reward if it helps
    SR

  • How can i transfer the 'Authorization Group'(SE54) to another client?

    In project i must define an 'Authorization Group' in T-Code SE54---The 3rd radiobutton.
    But there is no message to me to entry the Request NO.?
    How can i transfer the 'Authorization Group' ?
    I konw the date can be show from view 'V_BRG_54' ,but how to transport the data of the view?
    TKS a millon~~

    Hi,
    If your client is set for automatic recording of changes it should prompt for a transport, check there is not another client where you should make config changes.  If not, the menu option Table View -> Transport will let you assign the Auth group to a transport.
    Regards,
    Nick

  • How can I get the second group and report totals in Matrix report?

    Hi,
    I have created a matrix report with 2 break Groups.
    Iam getting columns totals for the first group, but not for the second group and the report totals.
    How can I get the second group and report totals for each month?
    Thanks.
    Ram.

    Hi Ram,
    If you want a total at any group-level, go to the particular group in the data model, insert a summary column in the group, and select
    Reset At > appropriate Group Name
    For report level summaries, you must create the summary column outside of all groups.
    Navneet.

Maybe you are looking for

  • Anyone know how to get Adobe to pay attention? Or am I compelled to be a pirate?

    I bought PageMaker many many years ago (about 1998 I think), and at the time it was a substantial investment. I've upgraded regularly since, and now have InDesign CS3 purchased in June 2007 (Adobe Store Australia Recept No. AD000385242U dated 27/6/07

  • I open my MacBook Pro lid, the screen comes on momentarily, then goes dark, and I can't do anything

    OS X  10.6..08 MacBookPro6.2 I never reboot.  I have a lot of windoes open.  Every week or two I'll open the lid to get to work and the display comes on then goes off and I can't do anything.  The keyboard backlight is on.  If I close the lid the whi

  • How to implement content caching for jsp page ?

    Hello everyone, I am reading an article <Servlets and Jsp Best Practice>,at http://developer.java.sun.com/developer/technicalArticles/javaserverpages/servlets_jsp/#author, on one section it is saying : "Cache content: You should never dynamically reg

  • DYNAMIC PIVOT - Problem with variables

    Dear All, I'm working on a Query that makes use of Dynamic Pivot It is intented to give a summarized list of Income and Expenses month by month I have adapted the foll. Query from SAP B1 Forum to my problem: Re: Date Wise Production Report Unfortunat

  • Banks rfebka96

    Hello to everyone. When i am trying to upload the CSB43 running the trancsaction FF_5. Pop up the warning: Acct 6800020476: Statement 01231 already exists; entry ignored then , system, reporting, and i add the program rfebka96. Then i check soo much