TV_GRAB_NA_DTV(1p)

πŸ“¦
version 1.2.1 Β· 2 versions
, in debian bookworm

πŸ’– 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 --configure writes 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 is 240 seconds.
  • --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. 8 is 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 HOME can be set to change where configuration files are stored. all configuration is stored in $HOME/.xmltv/. on Windows, it might be necessary to set HOME to a path without spaces in it.
  • TEMP or TMP, 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