TV_GRAB_NA_DTV(1p)
π tv_grab_na_dtv(1p) π
okay bestie, so this is a User Contributed Perl Documentation page for tv_grab_na_dtv, which is a little Perl grabber that pulls TV listings from DirecTV. it lives in section 1p of the manual, and honestly? it's giving scraper energy. let's get into it π«Ά
β¨ NAME β¨
tv_grab_na_dtv β grab TV listings from DirecTV.
like, that's the whole vibe. it grabs listings. from DirecTV. slay.
π SYNOPSIS π
here's how you actually call it, no cap:
tv_grab_na_dtv --help
tv_grab_na_dtv --configure [--config-file FILE]
tv_grab_na_dtv [--config-file FILE] [--output FILE]
[--days N] [--offset N] [--processes N]
[--timeout N] [--agent STRING]
[--quiet | --debug]
tv_grab_na_dtv --list-channels [--config-file FILE]
[--output FILE] [--quiet | --debug]
π DESCRIPTION π
so what it does is: it outputs TV shows and listings in XMLTV format straight from directv.com. iconic behavior.
first things first, bestie β you have to run tv_grab_na_dtv --configure to pick which stations you actually want to receive. no config, no listings, periodt.
then, once you've done that, running tv_grab_na_dtv with no arguments at all gets you listings for the stations you chose, for five days including today. cute, right?
π OPTIONS π
okay this is the part where we go through every single flag. no skipping, i don't play that. π§
--configureβ prompts you for which stations to download, and writes the configuration file. this is the first step, don't skip it.--config-file FILEβ sets the name of the configuration file. the default is~/.xmltv/tv_grab_na_dtv.conf. this is the file that--configurewrites and that gets read when you're grabbing.--output FILEβ when grabbing, write the output to FILE instead of standard output.--days Nβ when grabbing, grab N days instead of the usual 5.--offset Nβ start grabbing at today + N days.--timeout Nβ set the request timeout in seconds. default is240seconds.--agent STRINGβ specify the browser agent string, exactly as it gets provided to the remote server.--processes Nβ number of processes to run to fetch program details.8is a good number to try. you could try more if you've got plenty of CPU and bandwidth. more processes will reduce the time it takes to fetch your listings. but be warned: the benefit might not be as much as you think, and the more processes you initiate, the more you are making it obvious you are scraping, and the more likely you are to get banned by the source site. a "fast" website scraper is an oxymoron!--quietβ only print error-messages on STDERR.--debugβ provide more information on progress to stderr to help in debugging.--list-channelsβ output a list of all channels that data is available for. the list is in xmltv-format.--capabilitiesβ show which capabilities the grabber supports.--versionβ show the version of the grabber.--helpβ print a help message and exit.
π ERROR HANDLING π
if the grabber fails to download data, it will print an error message to STDERR and then exit with a status code of 1 to indicate that the data is missing. so like, if you see a 1, that's the data ghosting you. π
πΈ ENVIRONMENT VARIABLES πΈ
- the environment variable
HOMEcan be set to change where configuration files are stored. all configuration is stored in$HOME/.xmltv/. on Windows, it might be necessary to setHOMEto a path without spaces in it. TEMPorTMP, if present, will override the directory used to contain temporary files. default is"/tmp", so under Windows one of these is required.
π CREDITS π
grabber written by Rod Roark (http://www.sunsetsystems.com/), modified by Adam Lewandowski (adam@alewando.com) (January 2011, October 2014) to account for DirecTV site/API changes. we love a maintenance era. π
π BUGS π
like any screen-scraping grabber, this one will break regularly as the web site changes, and you should try to fetch a new one from the project's repository. at some point the breakage might not be fixable, or it may be that nobody wants to fix it. sane people should use Schedules Direct instead.
fr fr, if you're out here screen-scraping in the year of our lord, that's a choice. iykyk. π
and that's the whole page, bestie β¨ it's from perl v5.36.0, dated 2023-02-24, and yeah β that footer is the source and version right there. go grab those listings, but maybe consider Schedules Direct. π¦π
π¦ where this page comes from
- debian bookworm: xmltv-util 1.2.1-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms