{ "info": { "author": "Tristan Tao", "author_email": "tristan@teamleada.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Intro\n=====\n\nExtremely thin python wrapper for Microsoft Azure Bing Search API. Please note that this module does not use the Bing Search API 2.0 AppIDs which will be deprecated on August 1, 2012. This module requires that you sign up to the Windows Azure Marketplace and apply for an application key.\n\nThe modules uses OAuth, so you'll need to get your key here (free for up to 5K/Mon):\n* [All Purpose](https://datamarket.azure.com/dataset/5BA839F1-12CE-4CCE-BF57-A49D98D29A44)\n* [Web Search Only](https://datamarket.azure.com/dataset/8818F55E-2FE5-4CE3-A617-0B8BA8419F65)\n\n\nInstallation\n=====\n#####for python 2.7.* \n\n```sh\npip install py-bing-search\n```\n\n#####for python 3.*\n\n```sh\npip3 install py-bing-search\n```\n\n*Requires the requests library.\n\nUsage\n=====\n\nRemember to set the `API_KEY` as your own.\n\n####For Web Results:\n\n```py\n>>> from py_bing_search import PyBingWebSearch\n>>> search_term = \"Python Software Foundation\"\n>>> bing_web = PyBingWebSearch('Your-Api-Key-Here', search_term, web_only=False) # web_only is optional, but should be true to use your web only quota instead of your all purpose quota\n>>> first_fifty_result= bing_web.search(limit=50, format='json') #1-50\n>>> second_fifty_result= bing_web.search(limit=50, format='json') #51-100\n\n>>> print (second_fifty_result[0].description)\n u'Python Software Foundation Home Page. The mission of the Python Software Foundation is to promote, protect, and advance the Python programming language, and to ...'\n```\n\nWhat you get is a list of WebResult() instances, each comes with the following values:\n\n```\nself.title: title of the result\nself.url: the url of the result\nself.description: description for the result\nself.id: bing id for the page\n\n#Meta info:\nself.meta.uri: the search uri for bing\nself.meta.type: for the most part WebResult\n```\n\n####For Image Results:\n\n```py\n>>> from py_bing_search import PyBingImageSearch\n>>> bing_image = PyBingImageSearch('Your-Api-Key-Here', \"x-box console\", image_filters='Size:medium+Color:Monochrome') #image_filters is optional\n>>> first_fifty_result= bing_image.search(limit=50, format='json') #1-50\n>>> second_fifty_result= bing_image.search(limit=50, format='json') #51-100\n>>> print (second_fifty_result[0].media_url)\n...\n```\n\nWhat you get is a list of ImageResult() instances, each comes with the following values:\n\n```\nself.id: id of the result\nself.title: title of the resulting image\nself.media_url: url to the full size image\nself.source_url: url of the website that contains the source image\nself.width: width of the image\nself.height: height of the image\nself.file_size: size of the image (in bytes) if available\nself.content_type the MIME type of the image if available\nself.meta: meta info\n\n#Meta info#:\nmeta.uri: the search uri for bing\nmeta.type: for the most part ImageResult\n```\n\n####For Video Results:\n\n```py\n>>> from py_bing_search import PyBingVideoSearch\n>>> bing_video = PyBingVideoSearch('Your-Api-Key-Here', \"cats\")\n>>> first_fifty_result= bing_video.search(limit=50, format='json') #1-50\n>>> second_fifty_result= bing_video.search(limit=50, format='json') #51-100\n>>> print (second_fifty_result[0].media_url)\n...\n```\n\nWhat you get is a list of VideoResult() instances, each comes with the following values:\n\n```\nself.id: id of the result\nself.title: title of the resulting Video\nself.media_url: url to the full size Video\nself.display_url: url to display on the search result.\nself.run_time: run time of the video\nself.meta: meta info\n\n#Meta info#:\nmeta.uri: the search uri for bing\nmeta.type: for the most part VideoResult\n```\n\n####For News Results:\n\n```py\n>>> from py_bing_search import PyBingNewsSearch\n>>> bing_news = PyBingNewsbSearch('Your-Api-Key-Here', \"US Election\")\n>>> first_fifty_result= bing_news.search(limit=50, format='json') #1-50\n>>> second_fifty_result= bing_news.search(limit=50, format='json') #51-100\n>>> print (second_fifty_result[0].url)\n...\n```\n\nWhat you get is a list of NewsResult() instances, each comes with the following values:\n\n```\nself.id: id of the result\nself.title: title of the resulting News\nself.url: url to the News\nself.description: description of the article\nself.date: date of the News\nself.meta: meta info\n\n#Meta info#:\nmeta.uri: the search uri for bing\nmeta.type: for the most part NewsResult\n```\n\n## Searching for a specific number of results.\n\nYou secan also run __*search_all*__ to keep searching until it fills your required quota. Note that this will make an unpredictable number of api calls (hence drains your credits).\n\n```py\n>>> from py_bing_search import PyBingWebSearch\n>>> bing_web = PyBingNewsbSearch('Your-Api-Key-Here', \"Python Software Foundation\")\n>>> result_list = bing_web.search_all(limit=130, format='json') #will return result 1 to 130\n>>> len(result_list) == 130\nTrue\n>>> result_list = bing_web.search_all(limit=130, format='json') #will return result 131 to 260\n```\n\n__*search_all()*__ is available in all PyBing*Search classes.\n\n## Custom parameters\n\nIf you need more control via *custom parameters* (and you know what you're doing), you can include a __*custom_param*__ parameter as follows:\n\n```py\n>>> from py_bing_search import PyBingWebSearch\nweb_bing = PyBingWebSearch('Your-Api-Key-Her', \"some bad search\", custom_params=\"&Adult='Strict'\")\nresult_list = bing_web.search_all(limit=100, format='json') \n# result_list should now contain 100 results that are filetered by safesearch.\n```\n\nDon't forget to include the __*&__* at the start of your custom_param or the search will return the error msg: \"py_bing_search.py_bing_search.PyBingWebException: Request returned with code 400, error msg: The provided format is not supported.\"\n\nThe optional parameter __*custom_param*__ is available in all PyBing*Search constructors.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tristantao/py-bing-search", "keywords": "Azure,Bing,API,Search", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "py-bing-search", "package_url": "https://pypi.org/project/py-bing-search/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/py-bing-search/", "project_urls": { "Homepage": "https://github.com/tristantao/py-bing-search" }, "release_url": "https://pypi.org/project/py-bing-search/0.2.6/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "A simple lightweight python wrapper for the Azure Bing Search API.", "version": "0.2.6" }, "last_serial": 2174290, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "4e3e229010e9906623be99c5cc5ee24a", "sha256": "f6546e3bbc51e070550e1ed968f548fa0b0a7a611e40a0106cbb075665112e51" }, "downloads": -1, "filename": "py-bing-search-0.1.0.tar.gz", "has_sig": false, "md5_digest": "4e3e229010e9906623be99c5cc5ee24a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2934, "upload_time": "2015-03-08T23:11:44", "url": "https://files.pythonhosted.org/packages/bc/7a/b1eee928a365a76ff2c8d2cea67774af7120ea9e6c58a580ed7fe8e4b5cd/py-bing-search-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "65d77f6d28e8cec4c88437da61c6c071", "sha256": "085ba4286a48c3bf6a4d48aaf80e432fe7e69a8db7a5622844512d502449e3a1" }, "downloads": -1, "filename": "py-bing-search-0.1.1.tar.gz", "has_sig": false, "md5_digest": "65d77f6d28e8cec4c88437da61c6c071", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2933, "upload_time": "2015-03-08T23:15:12", "url": "https://files.pythonhosted.org/packages/ce/21/65192f6a6d2cf15b687d360c008471f9a07d2a119abf36bfd2edd7d91b53/py-bing-search-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "6ba68dea9fe6200d9a2870304c960c70", "sha256": "baf2e99d83dad08c560583e1586806b7300dc0fff275673508b260d96822905e" }, "downloads": -1, "filename": "py-bing-search-0.1.2.tar.gz", "has_sig": false, "md5_digest": "6ba68dea9fe6200d9a2870304c960c70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2941, "upload_time": "2015-03-08T23:35:43", "url": "https://files.pythonhosted.org/packages/05/0f/e42021a262ca1063cba389b87cccf690929c78cb944020cec7648dcf56c4/py-bing-search-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "899004686e92560803a44e5f8b073101", "sha256": "08e4a1085b241ee82b5643a50887de4457f03cd7a8e51a6233ebf41cfe926a86" }, "downloads": -1, "filename": "py-bing-search-0.1.3.tar.gz", "has_sig": false, "md5_digest": "899004686e92560803a44e5f8b073101", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3872, "upload_time": "2015-03-08T23:46:02", "url": "https://files.pythonhosted.org/packages/d6/02/134057afc9e98d6742b929582885c4c0de6b30afa5f9f7d2b7eda1147a06/py-bing-search-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "ae29c0a4f915d9569a66838eb3757757", "sha256": "15db3d8eeb8dfec8c9be8fe83be0862e6b9cfa2bf63c7d9a9f37821c6f03ebf9" }, "downloads": -1, "filename": "py-bing-search-0.1.4.tar.gz", "has_sig": false, "md5_digest": "ae29c0a4f915d9569a66838eb3757757", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3894, "upload_time": "2015-03-09T00:01:37", "url": "https://files.pythonhosted.org/packages/90/41/17c3c3d0552a2f59d74eb92c5ff25b1b2af58fcca74be5b4a3e31cef40c2/py-bing-search-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "416f06c67ddf04d1d8e00db501721a9d", "sha256": "db4ec5428f4beeab90a8d0e8de02c841b96610a486c6138a7cf447af708e818e" }, "downloads": -1, "filename": "py-bing-search-0.1.5.tar.gz", "has_sig": false, "md5_digest": "416f06c67ddf04d1d8e00db501721a9d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3858, "upload_time": "2015-03-09T00:32:55", "url": "https://files.pythonhosted.org/packages/7e/67/097392df69375fac3873cf5a9ed0c1a71c11ac301e228bf5725f4947b0ae/py-bing-search-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "69ae434855f0a0db1eae9f3c0a83dcad", "sha256": "ef3b8d36c4ae7775260333b598cc52aa0949b8d53e3445f9a632db9b45538f1b" }, "downloads": -1, "filename": "py-bing-search-0.1.6.tar.gz", "has_sig": false, "md5_digest": "69ae434855f0a0db1eae9f3c0a83dcad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3908, "upload_time": "2016-02-03T17:13:29", "url": "https://files.pythonhosted.org/packages/b1/4c/d41711a4601a3cc2e8f4e0bea465c6d40756cc5725f5ebbf137e40ad112e/py-bing-search-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "b419b33d02f23c9c9a77362af218759f", "sha256": "060f9e89cd5b94e3b2388412ea0a7add8d5cfdf882b3db711870a2aff5b4163f" }, "downloads": -1, "filename": "py-bing-search-0.1.7.tar.gz", "has_sig": false, "md5_digest": "b419b33d02f23c9c9a77362af218759f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4090, "upload_time": "2016-02-03T18:03:59", "url": "https://files.pythonhosted.org/packages/a3/b5/23e9f292c43bb7433b9b3115430200ddfb34857b40c7ee91ffeded144d26/py-bing-search-0.1.7.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "39fc921aa115767a97b70967d7c96d01", "sha256": "b273908273bacaa2f739eb583d2559bce567a39da8a3ed0e4d9173e993f36334" }, "downloads": -1, "filename": "py-bing-search-0.2.0.tar.gz", "has_sig": false, "md5_digest": "39fc921aa115767a97b70967d7c96d01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4953, "upload_time": "2016-05-05T16:25:48", "url": "https://files.pythonhosted.org/packages/ec/fd/e3fe8d337a8345777da53412a4a74fdd1170728982a90447f2ed6c92c0f1/py-bing-search-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "86066b5b2f4d7ee7981227ccc3d61e17", "sha256": "a740edaf41537713ee6f1ae8e7c00f9dd831b9dabae92e5e319aedda071150de" }, "downloads": -1, "filename": "py-bing-search-0.2.1.tar.gz", "has_sig": false, "md5_digest": "86066b5b2f4d7ee7981227ccc3d61e17", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5357, "upload_time": "2016-05-12T00:28:12", "url": "https://files.pythonhosted.org/packages/d6/9d/0d530d01122aa8001454e303672641b69e6b350d85aec98fa76bca6be777/py-bing-search-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "eb9dd934e898c1aebb06294ea23ea75a", "sha256": "b9ba91de7845cd9ada1578ee844369e7ba38dd884c60e7b779c202e5e26ec7e3" }, "downloads": -1, "filename": "py-bing-search-0.2.2.tar.gz", "has_sig": false, "md5_digest": "eb9dd934e898c1aebb06294ea23ea75a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5350, "upload_time": "2016-05-12T01:24:51", "url": "https://files.pythonhosted.org/packages/20/41/50f03a52d1ea270dff0d148ab517b9fad512d893b348f3746b330d8c2921/py-bing-search-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "df2dd9840a28b88eb0cce7a00f535402", "sha256": "a2e6a8274abbf694977752aee272c3ff420be2b44373e0f221a714814f30f0e5" }, "downloads": -1, "filename": "py-bing-search-0.2.3.tar.gz", "has_sig": false, "md5_digest": "df2dd9840a28b88eb0cce7a00f535402", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5374, "upload_time": "2016-05-12T22:40:27", "url": "https://files.pythonhosted.org/packages/18/06/007f86895a9254cb73f2bd0db931c7d6cd07973077b4810613d8dd5898fe/py-bing-search-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "8ec63e7277c6bff95eef0ad88798a664", "sha256": "3321278fe50bbdcec8e58c4735de6e1ce080108fc78616ecf03315b8da57650c" }, "downloads": -1, "filename": "py-bing-search-0.2.4.tar.gz", "has_sig": false, "md5_digest": "8ec63e7277c6bff95eef0ad88798a664", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5420, "upload_time": "2016-05-12T22:53:10", "url": "https://files.pythonhosted.org/packages/54/8c/f349e5c6069873800f0afca15cca07c97d5e3ffe092586d0010d8f490175/py-bing-search-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "436119f47e28ff52509122c518bb935f", "sha256": "ebce518cc30db36a12ec720e84e6ddc73ec5e2762d60a019f463b10aacd264ce" }, "downloads": -1, "filename": "py_bing_search-0.2.5-py2-none-any.whl", "has_sig": false, "md5_digest": "436119f47e28ff52509122c518bb935f", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7516, "upload_time": "2016-05-16T20:34:23", "url": "https://files.pythonhosted.org/packages/2d/6c/580f6972fc61f9f05701a24c329baf27c5fc6c8e97b8752d2b26340ac2b3/py_bing_search-0.2.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3941116fbe382bdf2e8697f8d410d499", "sha256": "a6679b8f04924ad5718c944addbde0f286f526b660deed534f5cc6c092c8f3da" }, "downloads": -1, "filename": "py_bing_search-0.2.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3941116fbe382bdf2e8697f8d410d499", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7520, "upload_time": "2016-05-16T20:50:55", "url": "https://files.pythonhosted.org/packages/a8/b4/6d5dc206474bd4fe0ac0d506d9d4137a324e966c8a0acdb594d2a578cb03/py_bing_search-0.2.5-py2.py3-none-any.whl" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "48c376eec53c8eb674ba562190cbb6e0", "sha256": "020c6b3592eb581c7253559b0643b0d43b5f1beb22e1b76868c1957c61823149" }, "downloads": -1, "filename": "py_bing_search-0.2.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "48c376eec53c8eb674ba562190cbb6e0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9383, "upload_time": "2016-06-18T01:12:43", "url": "https://files.pythonhosted.org/packages/99/d5/4ffc76a71e78fb1d783c755c9f4731b4fbed966bf38378d571caf1106c1a/py_bing_search-0.2.6-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "48c376eec53c8eb674ba562190cbb6e0", "sha256": "020c6b3592eb581c7253559b0643b0d43b5f1beb22e1b76868c1957c61823149" }, "downloads": -1, "filename": "py_bing_search-0.2.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "48c376eec53c8eb674ba562190cbb6e0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9383, "upload_time": "2016-06-18T01:12:43", "url": "https://files.pythonhosted.org/packages/99/d5/4ffc76a71e78fb1d783c755c9f4731b4fbed966bf38378d571caf1106c1a/py_bing_search-0.2.6-py2.py3-none-any.whl" } ] }