Reference for youtube_dl_scraper/core/scraper_manager.py
¶
youtube_dl_scraper.core.scraper_manager.ScraperManager
¶
Manages the collection of video and caption scrapers, allowing retrieval and listing of scrapers.
Attributes:
Name | Type | Description |
---|---|---|
video_scrapers |
dict
|
A dictionary of video scrapers. |
caption_scrapers |
dict
|
A dictionary of caption scrapers. |
Source code in youtube_dl_scraper/core/scraper_manager.py
get_scraper_class
¶
Retrieve a specific scraper class by its type and name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scraper_type
|
str
|
The type of scraper, either 'video' or 'caption'. |
required |
name
|
str
|
The name of the specific scraper to retrieve. |
required |
Returns:
Name | Type | Description |
---|---|---|
BaseScraper |
BaseScraper
|
The scraper class corresponding to the given type and name. |
Raises:
Type | Description |
---|---|
ValueError
|
If no scraper is found with the provided name and type. |
Source code in youtube_dl_scraper/core/scraper_manager.py
list_scrapers
¶
List all available scrapers by type.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing lists of available video and caption scrapers under the keys "video_scrapers" and "caption_scrapers". |