Skip to main content

Search Youtube videos using python requests

Project description

youtube-search-requests

Search Youtube videos using python requests without Youtube API.

youtube-search-requests can search up to 120+ videos !

Normally youtube-search-requests only extract urls, you can extract additional information by installing youtube-dl, for more information check usage below.

Simple usage:

from youtube_search_requests import YoutubeSearch

y = YoutubeSearch('fish', max_results=10)
videos = y.search()

print(videos)

also, youtube-search-requests have ability to validate videos

this to prevent UNPLAYABLE or ERROR videos

Search and validating videos usage:

from youtube_search_requests import YoutubeSearch

# by default, validate is set to True
y = YoutubeSearch('delicious fish', max_results=10, validate=True)
videos = y.search()

print(videos)

Extracting additional info videos usage:

from youtube_search_requests import YoutubeSearch

# NOTE: this require youtube-dl module
y = YoutubeSearch('fish', max_results=10, validate=True, extract_info=True)
videos = y.search

print(videos)

Search with given time usage:

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

youtube-search-requests-0.0.14.tar.gz (4.9 kB view details)

Uploaded Source

File details

Details for the file youtube-search-requests-0.0.14.tar.gz.

File metadata

  • Download URL: youtube-search-requests-0.0.14.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for youtube-search-requests-0.0.14.tar.gz
Algorithm Hash digest
SHA256 09f9ca83b60c9df84d8af72e2a9a8690c526201a8a9f0b97d2b464ee6acbab7e
MD5 3c931a3b959bd624082b72ecdb799c98
BLAKE2b-256 6c501c3dd918b5965985f093ec5393f15c2b6f9859cefc9dc8df1eb420e926de

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page