
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
A YouTube web scraper/wrapper for fetching video metadata and search results.
Warning: The user/developer is solely responsible for the use of this code, I am not responsible for copyrights and YouTube restrictions. It is for educational purposes only, do not misuse it.
pip install yt-api-wrapper
It is very simple to use and only one line. Below are some examples:
>>> from yt_api_wrapper import YouTubeAPIWrapper # Import the library
>>> yt = YouTubeAPIWrapper() # Create API wrapper
>>> yt.auto_complete('pytho') # Auto Complete example
INFO:yt_api_wrapper.yt_api_wrapper:Fetching autocomplete for query: 'pyth'
INFO:yt_api_wrapper.yt_api_wrapper:Found 14 suggestions
['python', 'pythagorean theorem', 'python download', 'python programming', 'pythagorean theorem calculator', 'python compiler', 'python online', 'python dictionary', 'pythagoras', 'python snake', 'pythagorean identities', 'python online compiler', 'pythagorean triples', 'python for loop']
>>> video = yt.get_video_info('dQw4w9WgXcQ') # Get video info with one line
INFO:yt_api_wrapper.yt_api_wrapper:Fetching video info for ID: dQw4w9WgXcQ
INFO:yt_api_wrapper.yt_api_wrapper:Successfully extracted info for video: Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)
>>> results = yt.search_videos('python course') # Search videos
INFO:yt_api_wrapper.yt_api_wrapper:Searching YouTube for videos: 'python course'
>>> channel = yt.get_channel_info('UCuAXFkgsw1L7xaCfnd5JJOw')
# Asynchronous usage
>>> import asyncio
>>> from yt_api_wrapper import AsyncYouTubeAPIWrapper
>>> yt_async = AsyncYouTubeAPIWrapper()
>>> async def main():
... # Asynchronous auto complete
... suggestions = await yt_async.auto_complete('pytho')
... print(suggestions)
... # Asynchronous video info
... video_info = await yt_async.get_video_info('dQw4w9WgXcQ')
... print(video_info)
... # Asynchronous search videos
... search_results = await yt_async.search_videos('python course')
... print(search_results)
... # Asynchronous channel info
... channel_info = await yt_async.get_channel_info('UCuAXFkgsw1L7xaCfnd5JJOw')
... print(channel_info)
>>> asyncio.run(main())
You can install this library with the orjson optional dependency for faster response parsing:
pip install yt-api-wrapper[orjson]
This will install the orjson library, which is used for faster JSON parsing. If you don't want to use orjson
, you can install the library without it:
git checkout -b feature-name
)git commit -m 'Add feature'
)git push origin feature-name
)FAQs
A YouTube web scraper/wrapper for fetching video metadata and search results.
We found that yt-api-wrapper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.