Main Interface

The 5 functions given here should handle most use cases.

vidscraper.auto_scrape(url, fields=None, api_keys=None)

Returns a Video instance with data loaded.

Parameters:
  • url – A video URL. Video website URLs generally work; more obscure urls (like API urls) might work as well.
  • fields

    A list of fields to be fetched for the video. Limiting this may decrease the number of HTTP requests required for loading the video.

  • api_keys – A dictionary of API keys for various services. Check the documentation for each suite to find what API keys they may want or require.
Raises :

UnhandledVideo if no suite can be found which handles the video.

vidscraper.auto_feed(self, url, last_modified=None, etag=None, start_index=1, max_results=None, video_fields=None, api_keys=None)

For each registered suite, calls get_feed() with the given parameters, until a suite returns a feed instance.

Returns:An instance of a specific suite’s feed_class with no data loaded.
Raises :UnhandledFeed if no registered suites know how to handle this url.

For each registered suite, calls get_search() with the given parameters.

Returns:a list of iterators over search results for suites which support the given parameters.
vidscraper.handles_video()

Returns True if any registered suite can make a video with the given parameters, and False otherwise.

vidscraper.handles_feed()

Returns True if any registered suite can make a feed with the given parameters, and False otherwise.

Project Versions

Previous topic

Getting Started

Next topic

Exceptions

This Page