Skip to main content

Scraper for Czech TV subtitles.

Project description


Scraper of hidden subtitles from Czech TV pages into SRT format.


To create SRT file with subtitles scraped from the webpage type following

# first episode of Most! series
url = ''

# scrape and save
import CzechTVSrt as CTsrt
CTsrt.scrape_srt(url, '')

By default requests library is used for fetching. In order to use Selenium, it needs to be installed separately (manually) as well as the browser driver. By default, Chrome is used.

To use Selenium, type

import CzechTVSrt as CTsrt
CTsrt.scrape_srt(url, '', use_selenium = True)

To use Selenium and Firefox as the browser type

import CzechTVSrt as CTsrt
CTsrt.scrape_srt(url, '', use_selenium = True, browser = 'firefox')

The subtitles have specified only the start point, so the threshold for length can be set so it is well timed, by default it is 10 s. Set the threshold in seconds with

import CzechTVSrt as CTsrt
CTsrt.scrape_srt(url, '', max_duration = 7)


Author: Martin Benes

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for CzechTVSrt, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size CzechTVSrt-0.1.0-py3-none-any.whl (5.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size CzechTVSrt-0.1.0.tar.gz (4.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page