{ "info": { "author": "Khanh Do", "author_email": "dokhanh@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Programming Language :: Python :: 3" ], "description": "# street\nScrape earnings history from StreetInsider.com\n\n\n## Installation\n```\n$ pip install street\n```\n\n\n## Quickstart\nTo display the help menu:\n```\n$ street\nUsage: street [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n --help Show this message and exit.\n\nCommands:\n setup Set request headers to bypass bot blocker\n ticker Get earnings history for ticker symbol\n```\n\n\nIn order to scrape the earnings history of a company from StreetInsider.com, the `street` CLI must look like it's making an HTTP request from a browser. Otherwise, the request will get blocked by the site. So, first visit the site from a browser and grab the `user-agent` and `cookie` parameters from the request header.\n\nTo set the `user-agent` and `cookie` parameters for our CLI, use `street setup`, which will prompt you to enter the values. You can find these values, for example, by visiting `https://www.streetinsider.com/ec_earnings.php?q={TICKER_SYMBOL}` in a browser and checking the network tab of the developer tools inspector. Afterwards, the parameters are written to `.street.ini` in your `$HOME` directory. You can also set these values by editing the INI file manually.\n```\n$ street setup\nUser agent:\nCookie:\n```\n\n\nThe `.street.ini` file looks like this:\n```ini\n[browser]\nuser_agent = YOUR_USER_AGENT\ncookie = YOUR_COOKIE\n```\n\n\nNow, to get the earnings history of a company such as `AMZN` (case-insensitive), use the following command:\n```\n$ street ticker amzn\n DATE QTR EPS EPS_CONSENSUS SURPRISE REVENUE REVENUE_CONSENSUS\n0 2019-04-25 Q119 $7.09 $4.72 +$2.37 $59.7B $59.65B\n1 2019-01-31 Q418 $6.04 $5.67 +$0.37 $72.4B $71.87B\n2 2018-10-25 Q318 $5.75 $3.14 +$2.61 $56.6B $57.1B\n3 2018-07-26 Q218 $5.07 $2.50 +$2.57 $52.9B $53.27B\n4 2018-04-26 Q118 $3.27 $1.27 +$2.00 $51B $49.87B\n5 2018-02-01 Q417 $3.75 $1.85 +$1.90 $60.5B $59.83B\n6 2017-10-26 Q317 $0.52 $0.03 +$0.49 $43.7B $42.14B\n7 2017-07-27 Q217 $0.40 $1.42 -$1.02 $38B $37.18B\n8 2017-04-27 Q117 $1.48 $1.13 +$0.35 $35.7B $35.31B\n9 2017-02-02 Q416 $1.54 $1.35 +$0.19 $43.7B $44.68B\n10 2016-10-27 Q316 $0.52 $0.78 -$0.26 $32.7B $32.69B\n11 2016-07-28 Q216 $1.78 $1.11 +$0.67 $30.4B $29.55B\n12 2016-04-28 Q116 $1.07 $0.58 +$0.49 $29.1B $27.97B\n13 2016-01-28 Q415 $1.00 $1.56 -$0.56 $35.75B $35.93B\n14 2015-10-22 Q315 $0.17 -$0.13 +$0.30 $25.4B $24.91B\n15 2015-07-23 Q215 $0.19 -$0.14 +$0.33 $23.18B $22.39B\n16 2015-04-23 Q115 -$0.12 -$0.13 +$0.01 $22.72B $22.39B\n17 2015-01-29 Q414 $0.45 $0.17 +$0.28 $29.33B $29.7B\n18 2014-10-23 Q314 -$0.95 -$0.74 -$0.21 $20.58B $20.85B\n19 2014-07-24 Q214 -$0.24 -$0.15 -$0.09 $19.34B $19.32B\n20 2014-04-24 Q114 $0.23 $0.23 $0.00 $19.74B $19.42B\n21 2014-01-30 Q413 $0.51 $0.66 -$0.15 $25.59B $26.06B\n22 2013-10-24 Q313 -$0.09 -$0.09 $0.00 $17.09B $16.77B\n23 2013-07-25 Q213 -$0.08 $0.05 -$0.13 $15.7B $15.73B\n24 2013-04-25 Q113 $0.18 $0.09 +$0.09 $16.07B $16.17B\n25 2013-01-29 Q412 $0.21 $0.27 -$0.06 $21.27B $22.27B\n26 2012-10-25 Q312 -$0.60 -$0.08 -$0.52 $13.81B $13.92B\n27 2012-07-26 Q212 $0.01 $0.02 -$0.01 $12.83B $12.89B\n28 2012-04-26 Q112 $0.28 $0.07 +$0.21 $13.2B $12.9B\n29 2012-01-31 Q411 $0.38 $0.19 +$0.19 $17.4B $18.2B\n30 2011-10-25 Q311 $0.14 $0.24 -$0.10 $10.9B $10.93B\n31 2011-07-26 Q211 $0.41 $0.35 +$0.06 $9.9B $9.37B\n32 2011-04-26 Q111 $0.44 $0.61 -$0.17 $9.86B $9.52B\n33 2011-01-27 Q410 $0.91 $0.88 +$0.03 $12.9B $12.98B\n34 2010-10-21 Q310 $0.51 $0.48 +$0.03 N/A N/A\n```\n\n\nTo save the earnings history to a CSV file, include the `-o/--outfile` option:\n```\n$ street ticker -o amzn.csv amzn\n```\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kndo/street", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "street", "package_url": "https://pypi.org/project/street/", "platform": "", "project_url": "https://pypi.org/project/street/", "project_urls": { "Homepage": "https://github.com/kndo/street" }, "release_url": "https://pypi.org/project/street/0.1.2/", "requires_dist": [ "beautifulsoup4", "click", "lxml", "pandas", "requests" ], "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "summary": "Scrape earnings history from StreetInsider.com", "version": "0.1.2" }, "last_serial": 5489234, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "442efb6653d0ddbba5287b925abe6156", "sha256": "cd56d4e6a65ad40e9b2b6ff7072ebfdd97cad5d68d467fde1b47e9e0d4f0f1cb" }, "downloads": -1, "filename": "street-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "442efb6653d0ddbba5287b925abe6156", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 5957, "upload_time": "2019-06-27T03:01:46", "url": "https://files.pythonhosted.org/packages/2f/1e/662923f2bf4b921017f4c3f3cf0ec4e36d17ababd85349d79ed8644ea1ea/street-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "55206b8942f553f361dc2d5d4ad0c068", "sha256": "677447aff9250a857ea9381778dcb8fca83f84fff93f55eab92e66e8b8c49f18" }, "downloads": -1, "filename": "street-0.1.1.tar.gz", "has_sig": false, "md5_digest": "55206b8942f553f361dc2d5d4ad0c068", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 4878, "upload_time": "2019-06-27T03:01:48", "url": "https://files.pythonhosted.org/packages/91/5c/db09858070e5fb3abf384ab20638031111baf99bc5154b26c20738d9dc6b/street-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "d9f329193a47657e13bbc456a2c95652", "sha256": "14769d8d3a4d35b489ae5559eb3e55c0cbf2f75cca38dd8ad0c1f141d5ffee8d" }, "downloads": -1, "filename": "street-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d9f329193a47657e13bbc456a2c95652", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 6736, "upload_time": "2019-07-05T01:50:04", "url": "https://files.pythonhosted.org/packages/07/a8/9f94bb7c5ade03987581f771d716ff85f95c34a74390593d3559decff866/street-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8fed36b027255c1a5b93591233af0800", "sha256": "f70d16e8a52354610aedf71b7195286091469f8494b6417e675c3753b8d49f3b" }, "downloads": -1, "filename": "street-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8fed36b027255c1a5b93591233af0800", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 5233, "upload_time": "2019-07-05T01:50:06", "url": "https://files.pythonhosted.org/packages/c1/e0/daf345ecf53e22612df190066b77fb448b05dd3e14e3efa033720872443a/street-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d9f329193a47657e13bbc456a2c95652", "sha256": "14769d8d3a4d35b489ae5559eb3e55c0cbf2f75cca38dd8ad0c1f141d5ffee8d" }, "downloads": -1, "filename": "street-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d9f329193a47657e13bbc456a2c95652", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 6736, "upload_time": "2019-07-05T01:50:04", "url": "https://files.pythonhosted.org/packages/07/a8/9f94bb7c5ade03987581f771d716ff85f95c34a74390593d3559decff866/street-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8fed36b027255c1a5b93591233af0800", "sha256": "f70d16e8a52354610aedf71b7195286091469f8494b6417e675c3753b8d49f3b" }, "downloads": -1, "filename": "street-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8fed36b027255c1a5b93591233af0800", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 5233, "upload_time": "2019-07-05T01:50:06", "url": "https://files.pythonhosted.org/packages/c1/e0/daf345ecf53e22612df190066b77fb448b05dd3e14e3efa033720872443a/street-0.1.2.tar.gz" } ] }