{ "info": { "author": "sl4v", "author_email": "iamsl4v@protonmail.com", "bugtrack_url": null, "classifiers": [], "description": "Socialblade API wrapper\n=======================\n\nSocialblade API wrapper.\n\nExamples\n--------\n\nLive YouTube subscriber count\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nPrints PewDiePie's subscriber count in real time.\n\n.. code-block::\n\n from socialblade import YouTubeChannel\n\n\n pewdiepie_channel = YouTubeChannel('UC-lHJZR3Gqxm24_Vd_AJ5Yw')\n\n for sub in pewdiepie_channel.live_subscriber_count_generator():\n print(sub)\n\nYou could also just get the subscriber count as it is at the time, like this:\n\n.. code-block::\n\n from socialblade import YouTubeChannel\n\n\n pewdiepie_channel = YouTubeChannel('UC-lHJZR3Gqxm24_Vd_AJ5Yw')\n\n print(pewdiepie_channel.get_subscriber_count())\n\nExport a Channel's Most Viewed Videos Statistics to CSV\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIn this example we are exporting statistics about PewDiePie's most viewed videos to CSV.\n\n.. code-block::\n\n from socialblade import YouTubeChannel\n import csv\n from datetime import datetime\n import locale\n\n\n locale.setlocale(locale.LC_ALL, '')\n\n\n def create_more_readable_ints(integer):\n return locale.currency(integer, symbol=False, grouping=True).replace('.00', '').replace(',', \"'\")\n\n\n pewdiepie_channel = YouTubeChannel('UC-lHJZR3Gqxm24_Vd_AJ5Yw')\n\n writer = csv.writer(\n open(\n 'PewDiePie Most Viewed Videos {}.csv'.format(str(datetime.now().date())),\n 'w',\n newline='',\n encoding='utf-8'\n )\n )\n writer.writerow(\n ['Channel', 'Title', 'Created at', 'Views', 'Comments']\n )\n for video in pewdiepie_channel.get_most_viewed_videos():\n writer.writerow(\n [\n 'PewDiePie',\n video.title,\n str(video.created_at),\n create_more_readable_ints(video.views_num),\n create_more_readable_ints(video.comments_num)\n ]\n )\n\nYou could do the same thing to any channel. You could also export different types of statistics about videos, which I will list the functions for them here:\n\n\n* socialblade.YouTubeChannel(channel_id).get_latest_videos()\n* socialblade.YouTubeChannel(channel_id).get_most_viewed_videos()\n* socialblade.YouTubeChannel(channel_id).get_highest_rated_videos()\n* socialblade.YouTubeChannel(channel_id).get_most_relevant_videos()\n\nGet live Twitter follower count\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe twitter functionality is limited in this wrapper to retrieving follower counts.\nYou could get a twitter users live follower count similer to how you get a youtuber's live follower count:\n\n.. code-block::\n\n from socialblade import TwitterUser\n\n\n donald_trump_twitter = TwitterUser('realdonaldtrump')\n\n for follower in donald_trump_twitter.live_follower_count_generator(request_delay=500):\n print(follower)\n\nYou could also get the follower count as it is at the moment, like so:\n\n.. code-block::\n\n from socialblade import TwitterUser\n\n\n donald_trump_twitter = TwitterUser('realdonaldtrump')\n\n print(donald_trump_twitter.get_follower_count())", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sl4vkek/python-socialblade", "keywords": "", "license": "WTFPL", "maintainer": "", "maintainer_email": "", "name": "socialblade", "package_url": "https://pypi.org/project/socialblade/", "platform": "", "project_url": "https://pypi.org/project/socialblade/", "project_urls": { "Homepage": "https://github.com/sl4vkek/python-socialblade" }, "release_url": "https://pypi.org/project/socialblade/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "Object oriented SocialBlade API wrapper", "version": "1.0.1" }, "last_serial": 5511562, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "f8c51ec697cb632fc840b5a79ddf3dd6", "sha256": "829827f18ba175028ce93709eba5abe8b2a356e14cf62096a85177cf8b16b9c9" }, "downloads": -1, "filename": "socialblade-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f8c51ec697cb632fc840b5a79ddf3dd6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2724, "upload_time": "2019-07-10T11:10:52", "url": "https://files.pythonhosted.org/packages/8e/fb/08adf58735856abf829c0817d888b01584883e7d4562bef7cdb533c7de0d/socialblade-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "eca266be2198b9a63774e34ca167ed33", "sha256": "0889dd797c91a246f165ce7816dd597532aaeba870210ef6df82414f57dce831" }, "downloads": -1, "filename": "socialblade-1.0.1.tar.gz", "has_sig": false, "md5_digest": "eca266be2198b9a63774e34ca167ed33", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2733, "upload_time": "2019-07-10T11:27:27", "url": "https://files.pythonhosted.org/packages/c7/a3/d70e021811294d4bfedf102892809d28b568e1998e63741107e6b6324aa9/socialblade-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "eca266be2198b9a63774e34ca167ed33", "sha256": "0889dd797c91a246f165ce7816dd597532aaeba870210ef6df82414f57dce831" }, "downloads": -1, "filename": "socialblade-1.0.1.tar.gz", "has_sig": false, "md5_digest": "eca266be2198b9a63774e34ca167ed33", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2733, "upload_time": "2019-07-10T11:27:27", "url": "https://files.pythonhosted.org/packages/c7/a3/d70e021811294d4bfedf102892809d28b568e1998e63741107e6b6324aa9/socialblade-1.0.1.tar.gz" } ] }