Metadata-Version: 2.1
Name: youtube-search-requests
Version: 0.0.25
Summary: Search Youtube videos using python requests without Youtube API
Home-page: https://github.com/trollfist20/youtube-search-requests
Author: Rahman Yusuf
Author-email: danipart4@gmail.com
License: MIT
Download-URL: https://github.com/trollfist20/youtube-search-requests/archive/v0.0.25.tar.gz
Description: # youtube-search-requests
        ### Search Youtube videos using python requests without Youtube API.
        ~~youtube-search-requests can search up to 120+ videos !~~
        ### youtube-search-requests v0.0.2 can search unlimited videos !!!
        
        ~~Normally youtube-search-requests only extract urls, you can extract additional information by installing youtube-dl, for more information check usage below.~~.
        
        you don't need youtube-dl module anymore, 
        youtube-search-requests now extract info by itself.
        And provide a very fast search rather than old version (v0.0.1)
        
        CLI (Command Line Interface) Usage:
        ```
        
        usage: python3 -m youtube_search_requests [-h] [--max-results={Number}] [-t={Number}] [-v] [--json]
                                                  [--json-output={Filename}] [--include-related-videos]
                                                  [--safe-search]
                                                  Search terms
        
        Search Youtube videos using python requests without Youtube API
        
        positional arguments:
          Search terms          a string terms want to search (if include space, you
                                must use double quotes "")
        
        optional arguments:
          -h, --help            show this help message and exit
          --max-results={Number} 
                                maximum search results
          -t={Number} , --timeout={Number} 
                                give number of times to execute search, if times runs
                                out, search stopped & returning results
          -v , --version        show youtube-search-requests version
          --json                Return results in json format
          --json-output={Filename} 
                                Return results in output file based on json format
          --include-related-videos 
                                include all related videos each url's
          --safe-search         This helps hide potentially mature videos.
        example usage:
        
        python3 -m youtube_search_requests "fish" --json
        
        # {"urls": {'title': ..., 'url': 'https://www.youtube.com/watch?v=0gT8Ty0ClHc', thumbnails: [...], ...}}
        
        
        ```
        
        Simple usage:
        
        ```python
        
        from youtube_search_requests import YoutubeSearch
        
        y = YoutubeSearch('fish', max_results=10)
        videos = y.search()
        
        print(videos)
        ```
        
        Search with given time usage:
        ```python
        
        from youtube_search_requests import YoutubeSearch
        
        # given time 60 seconds for searching videos
        y = YoutubeSearch('fish', max_results=10, timeout=60) 
        
        # if search not complete after 60 seconds
        # force it to return results
        videos = y.search()
        
        print(videos)
        ```
        
        Search with related videos usage:
        ```python
        
        from youtube_search_requests import YoutubeSearch
        
        y = YoutubeSearch('fish', max_results=10, include_related_videos=True) 
        videos = y.search()
        
        print(videos)
        
        ```
        
        ### youtube-search-requests support safe search !!!
        ### this helps to prevent mature videos in search results.
        
        search with safe search usage:
        ```python
        
        from youtube_search_requests import YoutubeSearch
        
        y = YoutubeSearch('fish', max_results=10, safe_search=True) 
        videos = y.search()
        
        print(videos)
        
        ```
        
        ### youtube-search-requests also support asynchronous method ! (using aiohttp module)
        
        search with async usage:
        ```python
        
        import asyncio
        from youtube_search_requests import AsyncYoutubeSearch
        
        async def search():
          y = AsyncYoutubeSearch('fish', max_results=10)
          results = await y.search()
          print(results)
        
        asyncio.run(search())
        ```
        
        ## You might be wonder, how youtube-search-requests work ?
        
        ### in-short-word:
        youtube-search-requests work like Youtube in browsers (playing with POST and GET method).
        
        ### in-long-word:
        - First, youtube-search-requests create a session for Youtube. (every opened youtube page in browser have it own session id)
        - Second, youtube-search-requests search videos using "internal Youtube API" that have been used youtube for searching videos in browsers.
        - There we go, done !!! :D.
        
Keywords: youtube,youtube-search
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Description-Content-Type: text/markdown
