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

  • SEARCH
  • Home
  • 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 7569363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:08:49+00:00 2026-05-30T15:08:49+00:00

i was able to get this code for c# which works perfectly fine..but due

  • 0

i was able to get this code for c# which works perfectly fine..but due to dependancy issues i need the java/ python equivalent of it..

class Program
{
    static void Main(string[] args)
    {
        var client = new WebClient();
        String userName = "*******";
        String password = "*******";
        var response =        client.DownloadString("https://www.google.com/accounts/ClientLogin?accountType=GOOGLE&Email="+userName+"@gmail.com&Passwd="+password+"&service=trendspro&source=test-test-v1");
        var sid = response.Split('\n')[0];
        client.Headers.Add("Cookie", sid);
        String downloadURL = "http://www.google.com/insights/search/overviewReport?cat=0-7&geo=BR&date=today%207-d&cmpt=geo&content=1&export=1";
        byte[] csv = client.DownloadData(downloadURL);
        Console.WriteLine(Encoding.Unicode.GetString(csv));
        Console.ReadLine();
    }
}
  • 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-05-30T15:08:51+00:00Added an answer on May 30, 2026 at 3:08 pm

    Fetching a file

    The urllib2 module is what you’re looking for here. A HOWTO is available as well. For authentication, you’re looking for HTTPBasicAuthHandler. See http://docs.python.org/library/urllib2.html#examples for an example.

    Handling CSV data

    For handling CSV data, you’ll want to use the csv module.

    Question is lacking effort

    If the documentation provided here is not enough for you to fake your way through a solution, please update the question with the things you’ve tried and specific questions on what isn’t working for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In code: //I know that to get this effect (being able to use it
I was able to get this working is SSRS 2008, but do to the
I've got a python program which runs via crontab and that works perfectly. However,
I have some code (which I cannot change) that I need to get working
Thanks to the answer on this stackoverflow question I was able to get the
This is a puzzle for me, I am able to get three DropDownLists to
I've had several clients ask this, and I've never been able to get or
I need to be able get a single specific attribute from an element with
I'm able to get cells to format as Dates, but I've been unable to
On click, I want to hide/show some html code(which is obtained via a GET

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.