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.

Note

This does all the work of creating a video, then discards it. If you are going to use a video instance if one is created, it would be more efficient to use auto_scrape() directly.

vidscraper.handles_feed()

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

Note

This does all the work of creating a feed, then discards it. If you are going to use a feed instance if one is created, it would be more efficient to use auto_feed() directly.

Read the Docs v: latest
Versions
latest
1.0.1
0.5.2
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.