youtube-webscrape-api


Nameyoutube-webscrape-api JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/huzai786/Youtube-Scraper
SummaryWebscrape based youtube api, free of cost
upload_time2023-05-04 13:18:56
maintainer
docs_urlNone
authorMuhammad Huzaifa
requires_python
licenseMIT
keywords youtube-api youtube-scraper youtube-scrape
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Youtube-Scraper

Youtube Scraper is a simple webscraping based replacement to Youtube api v3, to get
youtube results, channel details, and channels videos, **Fast**, this project is for non-commercial use only,
 
this library ships 3 main functions: 
  *  _channels_videos_ 
  * _youtube_results_
  * _channels_about_

## Installation
***
```sh
pip install youtube-webscrape-api==0.0.2
```
## Usage
***
channels_videos()
```python
>>> from yt_scrape import channels_videos   
>>> videos = channels_videos("@TheThinkersOfficial")
>>> for video in videos:
...     print(video)
{'vid_id': '8Q80l3j5x0E', 'thumbnail': 'https://i.ytimg.com/vi/8Q80l3j5x0E/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLApcmw1_uXXAY5wXOmDTCSGQgAH-g', 'title':
 'Dopamine, Oxytocin, Serotonin and Melatonin Explained by Sahil Adeem - @TheThinkersOfficial', 'description_snippet': 'Dopamine, oxytocin, serotonin, and melatonin are important neurotransmitters a
nd hormones that play various roles in the human body. Dopamine is a neurotransmitter that is associated with pleasure...', 'length': '7:30', 'publish_time': '5 hours ago', 'view_count': '786 views'
}
{'vid_id': 'X77PaK-dfFg', 'thumbnail': 'https://i.ytimg.com/vi/X77PaK-dfFg/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLBfeXwTZfzPYoXijy8kTyC85kSLwQ', 'title':
 'This Video Will Change Your Perception About Imran Khan - Sahil Adeem - New Video 2023', 'description_snippet': 'In this video Sahil Adeem is going to talk about the system of Islam. The system of
 Islam is built around the belief in one God, Allah, and following the teachings of the Quran, the holy book...', 'length': '21:42', 'publish_time': '1 day ago', 'view_count': '8,809 views'}        
...
...
{'vid_id': 'ui4s-5SpgZw', 'thumbnail': 'https://i.ytimg.com/vi/ui4s-5SpgZw/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLChKjCqljy4xUyGwPKLnf8GoAgEUA', 'title':
 'Joint Family System Say B Bara Masla - Explained by SAhil Adeem - @TheThinkersOfficial', 'description_snippet': 'Why the arrogance of of our last generation is so big? How to tackle that arrogance
 and what steps youth should must take to handle and tackle that arrogance? Why our youth in IT industry must...', 'length': '15:22', 'publish_time': '3 weeks ago', 'view_count': '3,772 views'} 
```
***

youtube_results()
```python
>>> results = youtube_results("dota 2")
>>> print(len(results))
20
>>> print(results[:3]) 
[{'vid_id': 'KguZit1F8bk', 'thumbnail': 'https://i.ytimg.com/vi/KguZit1F8bk/hq720.jpg?sqp=-oaymwEjCOgCEMoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLDvQCUEpe_u4QJp2NAIbJA7FZzy9w', 'title': 'O
G vs GAIMIN GLADIATORS - MAJOR CHAMPIONS - DPC WEU SPRING 2023 DOTA 2', 'publish_time': '4 hours ago', 'vid_length': '10:39', 'views': '19,856 views', 'channel_url': '/@NoobFromUA', 'channel_name': 
'NoobFromUA'}, {'vid_id': 'TQjdmrOXquk', 'thumbnail': 'https://i.ytimg.com/vi/TQjdmrOXquk/hq720.jpg?sqp=-oaymwEjCOgCEMoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLADEOBPzu54sdqwq2Uklm6Kg-UQ0Q
', 'title': 'OLD G vs BETRAYED - QUALIFIER FINAL - DPC WEU SPRING 2023 DOTA 2', 'publish_time': '8 hours ago', 'vid_length': '16:54', 'views': '80,996 views', 'channel_url': '/@NoobFromUA', 'channel
_name': 'NoobFromUA'}, {'vid_id': '', 'thumbnail': '', 'title': '', 'publish_time': '', 'vid_length': '', 'views': '', 'channel_url': '', 'channel_name': ''}]
```
***
channels_about()
```python
>>> from yt_scrape import channels_about
>>> details = channels_about("@RightSpeaking")
>>> print(details) 
{'channel_name': 'Right Speaking', 'views_count': '3,380,715 views', 'channel_thumbnail': 'https://yt3.googleusercontent.com/KGWLOEnAtGewyZllYfZenEDgsJI3j2AQ7fJpIwO9JBB0KamQbA-D0VL6oHKkK0zHKjggTHzkL
w=s200-c-k-c0x00ffffff-no-rj?days_since_epoch=19438', 'channel_url': 'http://www.youtube.com/@RightSpeaking', 'description': "Speak for Right - True Islamic Argument - Sahil Adeem\nLet's bring Islam
ic System into the country.\n", 'banner': 'https://yt3.googleusercontent.com/1a-KQDvr6-JyGjEB0gEJ4edQ1G3CePSIA7T47U-TGmfs-FXu7IMe7Mk1bSqkIg3bVkwpDmNxFA=w1060-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff
-no-nd-rj', 'channel_id': 'UC7LdpA6FnHj6wfVwvcHApPw', 'videos_count': '367', 'subscribers': '23K subscribers', 'joined': 'Joined  Dec 4, 2021', 'country': 'Pakistan'}
```
***

## Features
- Get Search Youtube results (max 20)
- get Channels about section data
- get Channels Videos (max 30)

## Fields

data available in each function.
* youtube_results:
   * title
   * publish_time
   * thumbnail_link
   * video_length
   * views
   * vid_id
   * channel_url
   * channel_name


* channels_about: 
   * channel_name
   * views_count
   * channel_thumbnail
   * channel_url
   * description
   * banner
   * channel_id
   * videos_count
   * subscribers
   * joined
   * country


* channels_videos:
   * vid_id
   * thumbnail
   * title
   * description_snippet
   * length
   * view_count
   * publish_time

## Exception
possible exception are:
```python
>>> from yt_scrape.exceptions import TooManyRequests, ChannelDeleted, NoVideoFound
```


## License
[MIT](https://choosealicense.com/licenses/mit/)

## Contributing
Contributions are always welcome!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/huzai786/Youtube-Scraper",
    "name": "youtube-webscrape-api",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "youtube-api,youtube-scraper,Youtube-scrape",
    "author": "Muhammad Huzaifa",
    "author_email": "muhammadhuzaifagamer123@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/e0/a0/cb0cba6ec2d7bf1bddaa685e211ae35313b5a5e0145926730cde827d7969/youtube-webscrape-api-0.0.3.tar.gz",
    "platform": null,
    "description": "\r\n# Youtube-Scraper\r\n\r\nYoutube Scraper is a simple webscraping based replacement to Youtube api v3, to get\r\nyoutube results, channel details, and channels videos, **Fast**, this project is for non-commercial use only,\r\n \r\nthis library ships 3 main functions: \r\n  *  _channels_videos_ \r\n  * _youtube_results_\r\n  * _channels_about_\r\n\r\n## Installation\r\n***\r\n```sh\r\npip install youtube-webscrape-api==0.0.2\r\n```\r\n## Usage\r\n***\r\nchannels_videos()\r\n```python\r\n>>> from yt_scrape import channels_videos   \r\n>>> videos = channels_videos(\"@TheThinkersOfficial\")\r\n>>> for video in videos:\r\n...     print(video)\r\n{'vid_id': '8Q80l3j5x0E', 'thumbnail': 'https://i.ytimg.com/vi/8Q80l3j5x0E/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLApcmw1_uXXAY5wXOmDTCSGQgAH-g', 'title':\r\n 'Dopamine, Oxytocin, Serotonin and Melatonin Explained by Sahil Adeem - @TheThinkersOfficial', 'description_snippet': 'Dopamine, oxytocin, serotonin, and melatonin are important neurotransmitters a\r\nnd hormones that play various roles in the human body. Dopamine is a neurotransmitter that is associated with pleasure...', 'length': '7:30', 'publish_time': '5 hours ago', 'view_count': '786 views'\r\n}\r\n{'vid_id': 'X77PaK-dfFg', 'thumbnail': 'https://i.ytimg.com/vi/X77PaK-dfFg/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLBfeXwTZfzPYoXijy8kTyC85kSLwQ', 'title':\r\n 'This Video Will Change Your Perception About Imran Khan - Sahil Adeem - New Video 2023', 'description_snippet': 'In this video Sahil Adeem is going to talk about the system of Islam. The system of\r\n Islam is built around the belief in one God, Allah, and following the teachings of the Quran, the holy book...', 'length': '21:42', 'publish_time': '1 day ago', 'view_count': '8,809 views'}        \r\n...\r\n...\r\n{'vid_id': 'ui4s-5SpgZw', 'thumbnail': 'https://i.ytimg.com/vi/ui4s-5SpgZw/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLChKjCqljy4xUyGwPKLnf8GoAgEUA', 'title':\r\n 'Joint Family System Say B Bara Masla - Explained by SAhil Adeem - @TheThinkersOfficial', 'description_snippet': 'Why the arrogance of of our last generation is so big? How to tackle that arrogance\r\n and what steps youth should must take to handle and tackle that arrogance? Why our youth in IT industry must...', 'length': '15:22', 'publish_time': '3 weeks ago', 'view_count': '3,772 views'} \r\n```\r\n***\r\n\r\nyoutube_results()\r\n```python\r\n>>> results = youtube_results(\"dota 2\")\r\n>>> print(len(results))\r\n20\r\n>>> print(results[:3]) \r\n[{'vid_id': 'KguZit1F8bk', 'thumbnail': 'https://i.ytimg.com/vi/KguZit1F8bk/hq720.jpg?sqp=-oaymwEjCOgCEMoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLDvQCUEpe_u4QJp2NAIbJA7FZzy9w', 'title': 'O\r\nG vs GAIMIN GLADIATORS - MAJOR CHAMPIONS - DPC WEU SPRING 2023 DOTA 2', 'publish_time': '4 hours ago', 'vid_length': '10:39', 'views': '19,856 views', 'channel_url': '/@NoobFromUA', 'channel_name': \r\n'NoobFromUA'}, {'vid_id': 'TQjdmrOXquk', 'thumbnail': 'https://i.ytimg.com/vi/TQjdmrOXquk/hq720.jpg?sqp=-oaymwEjCOgCEMoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLADEOBPzu54sdqwq2Uklm6Kg-UQ0Q\r\n', 'title': 'OLD G vs BETRAYED - QUALIFIER FINAL - DPC WEU SPRING 2023 DOTA 2', 'publish_time': '8 hours ago', 'vid_length': '16:54', 'views': '80,996 views', 'channel_url': '/@NoobFromUA', 'channel\r\n_name': 'NoobFromUA'}, {'vid_id': '', 'thumbnail': '', 'title': '', 'publish_time': '', 'vid_length': '', 'views': '', 'channel_url': '', 'channel_name': ''}]\r\n```\r\n***\r\nchannels_about()\r\n```python\r\n>>> from yt_scrape import channels_about\r\n>>> details = channels_about(\"@RightSpeaking\")\r\n>>> print(details) \r\n{'channel_name': 'Right Speaking', 'views_count': '3,380,715 views', 'channel_thumbnail': 'https://yt3.googleusercontent.com/KGWLOEnAtGewyZllYfZenEDgsJI3j2AQ7fJpIwO9JBB0KamQbA-D0VL6oHKkK0zHKjggTHzkL\r\nw=s200-c-k-c0x00ffffff-no-rj?days_since_epoch=19438', 'channel_url': 'http://www.youtube.com/@RightSpeaking', 'description': \"Speak for Right - True Islamic Argument - Sahil Adeem\\nLet's bring Islam\r\nic System into the country.\\n\", 'banner': 'https://yt3.googleusercontent.com/1a-KQDvr6-JyGjEB0gEJ4edQ1G3CePSIA7T47U-TGmfs-FXu7IMe7Mk1bSqkIg3bVkwpDmNxFA=w1060-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff\r\n-no-nd-rj', 'channel_id': 'UC7LdpA6FnHj6wfVwvcHApPw', 'videos_count': '367', 'subscribers': '23K subscribers', 'joined': 'Joined  Dec 4, 2021', 'country': 'Pakistan'}\r\n```\r\n***\r\n\r\n## Features\r\n- Get Search Youtube results (max 20)\r\n- get Channels about section data\r\n- get Channels Videos (max 30)\r\n\r\n## Fields\r\n\r\ndata available in each function.\r\n* youtube_results:\r\n   * title\r\n   * publish_time\r\n   * thumbnail_link\r\n   * video_length\r\n   * views\r\n   * vid_id\r\n   * channel_url\r\n   * channel_name\r\n\r\n\r\n* channels_about: \r\n   * channel_name\r\n   * views_count\r\n   * channel_thumbnail\r\n   * channel_url\r\n   * description\r\n   * banner\r\n   * channel_id\r\n   * videos_count\r\n   * subscribers\r\n   * joined\r\n   * country\r\n\r\n\r\n* channels_videos:\r\n   * vid_id\r\n   * thumbnail\r\n   * title\r\n   * description_snippet\r\n   * length\r\n   * view_count\r\n   * publish_time\r\n\r\n## Exception\r\npossible exception are:\r\n```python\r\n>>> from yt_scrape.exceptions import TooManyRequests, ChannelDeleted, NoVideoFound\r\n```\r\n\r\n\r\n## License\r\n[MIT](https://choosealicense.com/licenses/mit/)\r\n\r\n## Contributing\r\nContributions are always welcome!\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Webscrape based youtube api, free of cost",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/huzai786/Youtube-Scraper"
    },
    "split_keywords": [
        "youtube-api",
        "youtube-scraper",
        "youtube-scrape"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0b32ad584258b24b749ed69cfef9172c1b354855088e4d8d2dbb90f86b394fb9",
                "md5": "2da13a5f6e29dcad3043afd44d856578",
                "sha256": "107f38c0bdaf62aba3782fe62337dc87e903913befe483dbf5c8eccbbc8356a0"
            },
            "downloads": -1,
            "filename": "youtube_webscrape_api-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2da13a5f6e29dcad3043afd44d856578",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7868,
            "upload_time": "2023-05-04T13:18:54",
            "upload_time_iso_8601": "2023-05-04T13:18:54.265786Z",
            "url": "https://files.pythonhosted.org/packages/0b/32/ad584258b24b749ed69cfef9172c1b354855088e4d8d2dbb90f86b394fb9/youtube_webscrape_api-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e0a0cb0cba6ec2d7bf1bddaa685e211ae35313b5a5e0145926730cde827d7969",
                "md5": "da53382c928c2295d37b05bde8d5eb09",
                "sha256": "38c6c4f9e19feeaed0f05dfbfc508836371d7f34ca1cd0d460ad1524abf4259d"
            },
            "downloads": -1,
            "filename": "youtube-webscrape-api-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "da53382c928c2295d37b05bde8d5eb09",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7459,
            "upload_time": "2023-05-04T13:18:56",
            "upload_time_iso_8601": "2023-05-04T13:18:56.505585Z",
            "url": "https://files.pythonhosted.org/packages/e0/a0/cb0cba6ec2d7bf1bddaa685e211ae35313b5a5e0145926730cde827d7969/youtube-webscrape-api-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-04 13:18:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "huzai786",
    "github_project": "Youtube-Scraper",
    "github_not_found": true,
    "lcname": "youtube-webscrape-api"
}
        
Elapsed time: 0.07806s