Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small readme update #863

Merged
merged 1 commit into from Aug 12, 2022
Merged

small readme update #863

merged 1 commit into from Aug 12, 2022

Conversation

ohxxm
Copy link
Contributor

@ohxxm ohxxm commented Aug 10, 2022

title

@port19x
Copy link
Collaborator

port19x commented Aug 11, 2022

🤔

@justchokingaround
Copy link
Collaborator

doesn't work on mac + not shell + ratio

@justchokingaround
Copy link
Collaborator

#!/bin/sh

base="https://ustvgo.tv/"
selection=$(curl -s "$base"|sed 's_<li>_\n_g'|sed -nE 's_.*a href="([^"]*)">([^<]*) <.*_\1\t\2_p'|
  fzf --with-nth 2.. --reverse --header "Select a channel to watch" --height=40% --border)
title=$(printf "%s" "$selection"|cut -f2)
url=$(printf "%s" "$selection"|cut -f1)
iframe=$(curl -s "$url"|sed -nE "s_.*iframe src='([^']*)'.*_\1_p")
hls_link=$(curl -s -e "$url" "$base$iframe"|sed -nE "s@.*hls_src='([^']*)'.*@\1@p")
[ -z "$hls_link" ] && echo "No HLS link found" && exit 1
mpv --force-media-title="$title" "$hls_link"

you can even write an alias for this, it's not hard to make it even shorter, i only made it more verbose so it's more understandable and readable

@port19x
Copy link
Collaborator

port19x commented Aug 11, 2022

Yeah, it's an inferior lobster.
I'm still looking for a good reddit scraper if you're up to the challenge

@justchokingaround
Copy link
Collaborator

tv-cli is for live tv channels, not movies & tv shows. i just don't see why python would be necessary, it's very basic

@CoolnsX
Copy link
Collaborator

CoolnsX commented Aug 11, 2022

Yeah, it's an inferior lobster. I'm still looking for a good reddit scraper if you're up to the challenge

added to my todo list

@ohxxm
Copy link
Contributor Author

ohxxm commented Aug 11, 2022

tv-cli is for live tv channels, not movies & tv shows. i just don't see why python would be necessary, it's very basic

will rewrite ig

@ohxxm
Copy link
Contributor Author

ohxxm commented Aug 11, 2022

https://github.com/Spaxly/tv-cli

now in shell script.

@port19x
Copy link
Collaborator

port19x commented Aug 12, 2022

Oh, if it's for live tv channels sure

@port19x port19x merged commit 7073f50 into pystardust:master Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants