{ "info": { "author": "Roberto Soares", "author_email": "robertomlsoares@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: Implementation", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "##############################\nTrophyFetcher |license| |pypi|\n##############################\n\n.. |license| image:: https://img.shields.io/pypi/l/trophyfetcher.svg?style=flat-square\n :target: https://github.com/robertomlsoares/trophyfetcher/blob/master/LICENSE.txt\n\n.. |pypi| image:: https://img.shields.io/pypi/v/trophyfetcher.svg?style=flat-square\n :target: https://pypi.python.org/pypi/trophyfetcher\n\n``TrophyFetcher`` provides a way to extract information from the `PSN Public Trophies`_ website.\nIt uses ``Selenium`` and ``PhantomJS`` to access the website and scrape it, therefore, there are\nprivate information that ``TrophyFetcher`` is not able to extract (everything that is not on the website).\n\n.. _PSN Public Trophies: https://www.playstation.com/en-us/my/public-trophies/\n\nInstallation\n============\n\nYou need to install ``PhantomJS`` to be able to use ``TrophyFetcher``.\nThere are multiple ways to install it, such as with ``npm``.\n\n.. code-block:: console\n\n $ npm install -g phantomjs\n\nIf you do not have ``npm`` installed and do not want to install it, I recommend checking their `website`_ to\nlook for other alternatives.\n\n.. _website: http://phantomjs.org/\n\nTo install ``TrophyFetcher`` itself, simply do:\n\n.. code-block:: console\n\n $ pip install trophyfetcher\n\nRemember that you need ``Selenium`` as well, but ``pip`` will most likely that care of that for you.\n\nTutorial\n========\n\nAll you need to do is create a ``TrophyFetcher`` object and call the ``user_info`` method passing\nthe username of the user you want to extract information from.\n\n.. code-block:: python\n\n from trophyfetcher import TrophyFetcher\n\n tf = TrophyFetcher()\n extracted_info = tf.user_info('username')\n\n``TrophyFetcher`` will automatically log errors in a file called ``trophyfetcher_log.txt``, but you\ncan turn that off by doing:\n\n.. code-block:: python\n\n from trophyfetcher import TrophyFetcher\n\n tf = TrophyFetcher()\n tf.logging_option(False)\n extracted_info = tf.user_info('username')\n\nIf a problem occurs and ``Selenium`` is not able to locate elements on the page, ``TrophyFetcher`` will\nraise a ``TimeoutException`` and log (if logging is enabled) which element caused the error.\nIf that happens, it is most likely due to slow connection or a problem with the website, since\n``TrophyFetcher`` will wait until 30 seconds before it raises the ``TimeoutException``.\n\nFinally, if everything goes well, you will receive an object in the following format (JSON):\n\n.. code-block:: javascript\n\n {\n \"avatar_url\": \"https://avatar_example.png\",\n \"bronze_trophies\": \"0\",\n \"games_info\": [{\n \"bronze_trophies\": \"0\",\n \"gold_trophies\": \"0\",\n \"img_url\": \"https://game_example.png\",\n \"name\": \"example\",\n \"platform\": \"example platform\",\n \"platinum_trophies\": \"0\",\n \"progress\": \"0%\",\n \"silver_trophies\": \"0\"\n }],\n \"gold_trophies\": \"0\",\n \"level\": \"0\",\n \"level_progress\": \"0\",\n \"platinum_trophies\": \"0\",\n \"silver_trophies\": \"0\",\n \"trophies\": \"0\"\n }", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/robertomlsoares/trophyfetcher", "keywords": "selenium,psn,trophy,fetcher,crawler", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "trophyfetcher", "package_url": "https://pypi.org/project/trophyfetcher/", "platform": "Platform Independent", "project_url": "https://pypi.org/project/trophyfetcher/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/robertomlsoares/trophyfetcher" }, "release_url": "https://pypi.org/project/trophyfetcher/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "A package used to fetch public information about trophies from PSN.", "version": "0.1.0" }, "last_serial": 2148305, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "c101e0955ac6df9381af83570fd4c844", "sha256": "f415e6022a8914e439c17226d67136945d297fa6eecfd6488c46fb26cef2098f" }, "downloads": -1, "filename": "trophyfetcher-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "c101e0955ac6df9381af83570fd4c844", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 23610, "upload_time": "2016-06-03T03:56:18", "url": "https://files.pythonhosted.org/packages/ce/26/bf75941451b7f605799f77eb86d6ae8e29d213e87a71ffee142f35ad8be7/trophyfetcher-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4255b2839d0069f0ed3953d646d0101e", "sha256": "4e3f6de8704530ba4cc1b59595ac7976952d26cd30f9bfaeed92b8c203ad3963" }, "downloads": -1, "filename": "trophyfetcher-0.1.0.tar.gz", "has_sig": false, "md5_digest": "4255b2839d0069f0ed3953d646d0101e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5709, "upload_time": "2016-06-03T03:56:13", "url": "https://files.pythonhosted.org/packages/36/52/43189a40f9cb5672779dcfbab430dbe1fe082095f12cb97ce417cf3eb738/trophyfetcher-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c101e0955ac6df9381af83570fd4c844", "sha256": "f415e6022a8914e439c17226d67136945d297fa6eecfd6488c46fb26cef2098f" }, "downloads": -1, "filename": "trophyfetcher-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "c101e0955ac6df9381af83570fd4c844", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 23610, "upload_time": "2016-06-03T03:56:18", "url": "https://files.pythonhosted.org/packages/ce/26/bf75941451b7f605799f77eb86d6ae8e29d213e87a71ffee142f35ad8be7/trophyfetcher-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4255b2839d0069f0ed3953d646d0101e", "sha256": "4e3f6de8704530ba4cc1b59595ac7976952d26cd30f9bfaeed92b8c203ad3963" }, "downloads": -1, "filename": "trophyfetcher-0.1.0.tar.gz", "has_sig": false, "md5_digest": "4255b2839d0069f0ed3953d646d0101e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5709, "upload_time": "2016-06-03T03:56:13", "url": "https://files.pythonhosted.org/packages/36/52/43189a40f9cb5672779dcfbab430dbe1fe082095f12cb97ce417cf3eb738/trophyfetcher-0.1.0.tar.gz" } ] }