Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8170823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:15:35+00:00 2026-06-06T21:15:35+00:00

It is no longer possible to export your Facebook friends to Twitter or Google+

  • 0

It is no longer possible to export your Facebook friends to Twitter or Google+ in the way it once was by using Yahoo mail- http://lifehacker.com/5824769/how-to-migrate-all-your-facebook-data-to-google%252B
Yahoo now (presumably forced by Facebook) tag all imported Facebook friends so you can’t then export them.
I am wanting to find a way of converting Yahoo contacts to a CSV file including Facebook contacts, and thought the best way would be converting the simple print view (see https://dl.dropbox.com/u/95261/CloudShot/shot_21062012_153052.png ) to a CSV file.

Ideally I’d use a Bookmarklet and thought I could use a plugin similar to Table2CSV-
http://www.kunalbabre.com/projects/table2CSV.php

I created the following bookmarklet as a test:

javascript:;var s=document.createElement('script'); s.setAttribute('src','http://jquery.com/src/jquery-latest.js'); document.getElementsByTagName('body')[0].appendChild(s); s.setAttribute('type', 'text/javascript'); var t=document.createElement('script'); t.setAttribute('src','http://www.kunalbabre.com/projects/table2CSV.js'); document.getElementsByTagName('body')[0].appendChild(t); t.setAttribute('type', 'text/javascript'); $('qprintable').table2CSV();

This doesn’t work because the table in Yahoo print contacts puts each contact in a separate table. I’ve got a sample here (I’ve changed the details to protect the privacy!)- http://pastebin.com/STuKmwQa

Ideally I’d be able to either download as a CSV or copy and paste. I’d like to use a bookmarklet as I want this to be easy for the end user and hope this will benefit all the people that currently can’t export their Facebook contacts easily.

How do I achieve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:15:37+00:00Added an answer on June 6, 2026 at 9:15 pm

    http://jsfiddle.net/GMmdg/5/

    general selector format:

    xtract('table.container-of-inner-tables table.child-tables');
    

    concrete selector for jsfiddle, but it probably won’t work with actual page:

    xtract('body > table > tbody > tr:not(.qprintfoot) table');
    

    Data extractor function, change internal selectors if necessary:

    function xtract( rootTableSelector ){
        var rows = [];
        var csv = [];
        $( rootTableSelector ).each(function(){
            var $t = $(this);
            var row = {};
            row.name  = $.trim( $t.find('tr:nth-child(1) > td > b').text());
            row.email = $.trim( $t.find('tr:nth-child(2) > td > div:nth-child(2)').text());
            rows.push( row );
            csv.push([ row.name, row.email ]);
        });
        console.log( rows );
        $('#result').text( toCSV( csv ) );
        $('#json').text( JSON.stringify( rows) );
        // prompt('this is not csv', csv );
    }
    

    Untested, freshly written function to create csv, enjoy the options:

    function toCSV( rows ){
        var newline = '\n';
        var fsep = ','; // field separator
        var quot = '"'; // field quoter
        var quotquot = [ quot + quot, '\\' + quot ][1]; // choose
        var alwaysQuote = false;
        var quoteIfContainsQuote = true;
        // omitted option possibilities:
        // - trimFields
        // - quoteStringsButNotNumbers(excel)
        // - putEqualSignBeforeNumbers(excel), etc.
    
        var lines = [];
        $.each( rows, function(){
          var line = [];
          $.each( this, function(){
              var s = this;
              var needsQuote = alwaysQuote;
    
              if( s.indexOf( fsep ) >= 0 )
                  needsQuote = true;
    
              if( s.indexOf( quot ) >= 0 ){
                  needsQuote = needsQuote || quoteIfContainsQuote;
                  s = s.replace( quot, quotquot );
              }
    
              if( needsQuote ) s = quot + s + quot;
              line.push( s );
          });
          lines.push( line.join( fsep ));
        });
        return lines.join( newline );
    }
    

    updated, full js http://marijnhaverbeke.nl/uglifyjs/):

    http://pastebin.com/vCuVBUvE

    javascript:(function()%7Bfunction%20e(e)%7Bvar%20t%3D%22%5Cn%22%2Cn%3D%22%2C%22%2Cr%3D'%22'%2Ci%3D%5Br%2Br%2C%22%5C%5C%22%2Br%5D%5B1%5D%2Cs%3D!1%2Co%3D!0%2Cu%3D%5B%5D%3Breturn%20%24.each(e%2Cfunction()%7Bvar%20e%3D%5B%5D%3B%24.each(this%2Cfunction()%7Bvar%20t%3Dthis%2Cu%3Ds%3Bt.indexOf(n)%3E%3D0%26%26(u%3D!0)%2Ct.indexOf(r)%3E%3D0%26%26(u%3Du%7C%7Co%2Ct%3Dt.replace(r%2Ci))%2Cu%26%26(t%3Dr%2Bt%2Br)%2Ce.push(t)%7D)%2Cu.push(e.join(n))%7D)%2Cu.join(t)%7Dfunction%20t(t)%7Bvar%20n%3D%5B%5D%2Cr%3D%5B%5D%3B%24(t).each(function()%7Bconsole.log(this)%3Bvar%20e%3D%24(this)%2Ct%3D%7B%7D%3Bt.name%3D%24.trim(e.find(%22tr%3Anth-child(1)%20%3E%20td%20%3E%20b%22).text())%2Ct.email%3D%24.trim(e.find(%22tr%3Anth-child(2)%20%3E%20td%20%3E%20div%3Anth-child(2)%22).text())%2Cn.push(t)%2Cr.push(%5Bt.name%2Ct.email%5D)%7D)%2Cr%3De(r)%2Cconsole.log(n)%2C%24(%22body%22).prepend('%3Cpre%20id%3D%22result%22%3E%3C%2Fpre%3E')%2C%24(%22img%2C.qprintable%22).remove()%2C%24(%22%23result%22).text(r)%2C%24(%22%23json%22).text(JSON.stringify(n))%2Cprompt(%22Select%20all%20and%20copy%22%2Cr)%7Dfunction%20r()%7Bvar%20e%3Dwindow.jQuery%3Bif(!e)%7BsetTimeout(r%2C100)%3Breturn%7De(function()%7Bt(%22.qprintable2%22)%7D)%7Dvar%20n%3Ddocument.createElement(%22script%22)%3Bn.setAttribute(%22src%22%2C%22http%3A%2F%2Fcode.jquery.com%2Fjquery.min.js%22)%2Cn.setAttribute(%22type%22%2C%22text%2Fjavascript%22)%2Cdocument.getElementsByTagName(%22body%22)%5B0%5D.appendChild(n)%2Cr()%7D)()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

With OSX 10.5. it's no longer possible to spoof MAC addresses of your wired
Isn't it any longer possible in Google Maps API V3 (JavaScript) to display a
Is it possible to inject an instance of logger class object using Managed Extensibility
Is it possible to add a attachment to a mail with the mailto function
I have a element and it is possible that it is longer than one
Possible Duplicate: Does a huge amount of warnings make C# compile time longer? In
Possible Duplicate: Ignore SVN files when exporting a WAR file from Eclipse? Using eclipse
Possible Duplicate: What are the downsides of longer directory paths/names and URL's on a
I'm trying to export a schema in an oracle 10 database using the EXP
What happened to OCX's? Are they no longer possible to create with the latest

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.