Comments (10)
Sure I can add something like this! 👍
from chat-downloader.
Hi, I'm actually not sure what to do if the code becomes buggy after I tamper with it, so I'll just wait for the feature. Sorry to bother you, though.
from chat-downloader.
Hi, I'm actually not sure what to do if the code becomes buggy after I tamper with it, so I'll just wait for the feature. Sorry to bother you, though.
No worries. I am currently working on improving documentation (and some other improvements), but I will get to it as soon as possible. If you don't mind, can you take a look at #61 (comment)? Just so I can close that issue. Thanks!
from chat-downloader.
I already posted this, but I'm not sure if I accidentally deleted my post or if there's a network bug.
I made this shell script to achieve what you're trying to do.
#!/bin/sh
channel="$1"
get_live_url() {
_channel="$1"
_video_code=$(youtube-dl --list-formats --playlist-end 1 "$_channel/live" | grep MPD)
if [ -n "$_video_code" ]; then
_url=${_video_code#*be] }
_url="https://www.youtube.com/watch?v=${_url%:*}"
echo "$_url"
fi
}
while live_url=$(get_live_url "$channel"); do
if [ -n "$live_url" ]; then
chat_downloader "$live_url"
else
sleep 60
fi
done
from chat-downloader.
Cool, I'll check it tomorrow, thanks for the reply!
from chat-downloader.
Great stuff @alnj 😃
This functionality has actually already been implemented in the docs branch and will be released as soon as possible. It currently works with a channel url/id (e.g. https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow or just UCSJ4gkVC6NrvII8umztf0Ow), and I will add support for custom urls shortly (e.g. https://www.youtube.com/c/chilledcow or https://www.youtube.com/user/xxx)
from chat-downloader.
@alnj I'll be honest, I have no idea how to work this script out, where should I put the channel / video url?
@xenova When is this gonna be ready? And will it work with only the channel url, like the next upcoming livestream will automatically be saved? If yes, that sounds like the perfect feature for me, so thank you.
from chat-downloader.
I am quite busy during the week with university work, so I can only continue working on it over the weekend. I will try get it included as soon as possible.
from chat-downloader.
@artiction I initially made it for myself so it's a shell script that won't work on Windows (not sure what OS you're using).
After making it executable with chmod +x filename.sh
you can call it with ./filename.sh [channel URL goes here]
. This will run continuously, running chat_downloader on every public video, but you can also make it run on just the next one if you add a break
or return
in a new line after the chat_downloader line.
from chat-downloader.
Sorry for the long wait... but I finally got around to adding this to the latest version (it was in the beta for the past few months).
You can now use the channel id of a user to search for live streams. If they are not streaming (i.e., no upcoming live stream or ongoing live stream), you will get the following message:
[INFO] There are no active or upcoming livestreams with a live chat. Retrying again in 30 seconds.
For example,
$ python -m chat_downloader https://www.youtube.com/channel/UC-lHJZR3Gqxm24_Vd_AJ5Yw
[INFO] Site: youtube.com
[INFO] Retrieving chat for "UC-lHJZR3Gqxm24_Vd_AJ5Yw".
[INFO] There are no active or upcoming livestreams with a live chat. Retrying again in 30 seconds.
Every 30 seconds, it retries and once the channel goes live, the chat will be captured.
Let me know if you have any further questions! 😃
from chat-downloader.
Related Issues (20)
- [BUG] On my pc it works but on my friend's it doesn't HOT 5
- how can stop sesion chat?
- [QUESTION] How do I get chat log from start of live youtube broadcast? HOT 3
- REMOVE THIS, THANKS
- Incomplete Parsing of Fundraising Donation Messages in Live Chat HOT 2
- [QUESTION] Title goes here
- ModuleNotFoundError: No module named 'chardet'
- [QUESTION] How can I stop chat downloader if the livestreaming is offline
- [FEATURE] [Twitch] Add `{datetime}` in ouput operation
- [FEATURE] [Youtube] Add filter for stream announce
- [FEATURE] create_clip function
- [BUG] Filename string after --output cannot begin with dash(-) due to mis-interpretated as option HOT 5
- [BUG] socs.value missing from cookies
- CHAT STOPED AFTER ANY TIME HOT 2
- [QUESTION] How to replace shorthand emotes, like :confounded_face:, with UTF, like 😖 ?
- [BUG] YouTube URL parsing error
- [FEATURE] errorlevel 0
- inactivity_timeout HOT 1
- [FEATURE] Kick support
- [QUESTION] Module Hook?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chat-downloader.