Skip to main content

searches youtube for videos without using the official api

Project description

youtube websearch libary

  • no api key required
  • no api limit

search through via web scraping

if you know how to test something like this, feel free to make as issue/pull request

Example Usage

open we will rock you in a webbrowser:

import youtube_websearch as yt
import webbrowser

yt_basis = "https://www.youtube.com/watch?v="

search_results = yt.search('we will rock you')
# search_results = yt.search('we will rock you', useragent="something")  # you can set your own useragent
videoId = search_results[0]["videoId"]

webbrowser.open(yt_basis + videoId)

pip install youtube-websearch

this libary provides multiple depths of search:

video_search

This function only returns the videos with this data:

  • videoId
  • title
  • publishedTimeText
  • lengthText
  • viewCountText

if you need more videodata like thumbnails etc. use messy_video_search if you think there is data this function should return, feel free and make a issue/pull request

messy_video_search

This functions returns the plain video search data.

if you need meta information about your search use plain_search

plain_search

This function returns the whole search json. its a very messy thing with a lot of irrelevant data

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_websearch-1.0.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

youtube_websearch-1.0.0-py2.py3-none-any.whl (15.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file youtube_websearch-1.0.0.tar.gz.

File metadata

  • Download URL: youtube_websearch-1.0.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for youtube_websearch-1.0.0.tar.gz
Algorithm Hash digest
SHA256 45d5daa0e08d2b9ea8c42130f1f8b9029c86af2956a1f5873ecd0d733ff294db
MD5 2ee7fb3d97fa70a6126866e2341abb3a
BLAKE2b-256 3875f5947f5c02d28062245097fc9be43d15b3947d3031a516e25168cf7efebc

See more details on using hashes here.

File details

Details for the file youtube_websearch-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: youtube_websearch-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for youtube_websearch-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 581e99c290943137b47c04ee560396d04a9c548d420592cfb2b81f038c1f8535
MD5 e6bf85701d57aef66d737302e10a99a2
BLAKE2b-256 5218360edbc502b996358a9c12f66643fe4186fc4307ebd4a2c28796112866f1

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