Brendan Sterne
Product Management, Software Development
Skip to content
  • Home
  • About
  • Resources
← A review of “One More Time: How Do You Motivate Employees”, by Frederick Herzberg
Achieving Your Way to Mediocrity →

Download / Scrape Salesforce Reports in 4 lines of Python

Posted on December 11, 2012 by brendansterne

Python Code:

import requests
l = requests.get("https://login.salesforce.com/?un=USERNAME&pw=PASSWORD")
d = requests.get("https://na3.salesforce.com/REPORT_ID?view=d&snip&export=1&enc=UTF-8&xf=csv",cookies=l.cookies)
print d.content

References:

http://sfdc-heretic.warped-minds.com/2006/04/10/progmatic-access-to-salesforcecom-reports/

http://docs.python-requests.org/en/latest/user/quickstart/#cookies

http://www.techsmog.com/index.php/2011/02/08/parsing-real-time-salesforce-com-reports-via-perlcgi-html-tables/

Share on

  • Click to email a link to a friend (Opens in new window) Email
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on X (Opens in new window) X
Like Loading...

Related

Unknown's avatar

About brendansterne

Sr Director, Indeed.com Product Incubator
View all posts by brendansterne →
This entry was posted in Uncategorized and tagged python, software development. Bookmark the permalink.
← A review of “One More Time: How Do You Motivate Employees”, by Frederick Herzberg
Achieving Your Way to Mediocrity →

Leave a comment Cancel reply

  • Unknown's avatar

  • RSS Feed

  • Enter your email address to receive notifications of new posts by email.

    Join 500 other subscribers
  • Top Posts

    • Do the right thing, Wait to get fired
    • A review of "The Set-Up-to-Fail Syndrome" by Jean-Francois Manzoni and Jean-Louis Barsoux
  • Recent Posts

    • Naming things clearly
    • Inconvenient Truths about Operating Mechanisms
    • Successful Second Products are Rare
    • How Can I Help?
    • Gmail wasn’t really a 20%-time project
    • Criteria for continued funding of new products
    • Seeds, Pods and Big Bets
    • Technical Risk vs Market Risk, Part II
    • Technical Risk vs Market Risk, Part I
    • Inside Amazon.com, what’s the culture really like these days?
  • Archives

    • June 2019
    • April 2019
    • May 2018
    • January 2018
    • December 2016
    • October 2015
    • August 2015
    • June 2015
    • April 2015
    • May 2014
    • April 2014
    • March 2014
    • February 2014
    • January 2014
    • December 2013
    • November 2013
    • October 2013
    • July 2013
    • June 2013
    • May 2013
    • March 2013
    • February 2013
    • January 2013
    • December 2012
    • November 2012
    • October 2012
    • March 2012
    • February 2012
  • Brendan on the web

    LinkedIn
    Twitter (@brendansterne)
    Google+
    GitHub
    StackOverflow
    Flickr
Brendan Sterne
Blog at WordPress.com.
  • Comment
  • Reblog
  • Subscribe Subscribed
    • Brendan Sterne
    • Join 71 other subscribers
    • Already have a WordPress.com account? Log in now.
    • Brendan Sterne
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar
%d