Skip to content

Commit 219e426

Browse files
authored
Fix regex to extract channel name from YouTube data
1 parent ad174f4 commit 219e426

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scrapers/youtube.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = ["youtube", async function (id) {
44
const {data} = await axios.get(`https://youtube.com/channel/${id}`);
55

66
const avatar = data.match(/channelMetadataRenderer.*?avatar.*?thumbnails.*?url".*?"(.*?)"/s)[1];
7-
const name = data.match(/channelMetadataRenderer.*?title".*?"(.*?)"/s)[1];
7+
const name = data.match(/metadata.*?channelMetadataRenderer.*?title".*?"(.*?)"/s)[1];
88

99
const {data: livedata} = await axios.get(`https://youtube.com/channel/${id}/live`);
1010
let live, title;

0 commit comments

Comments
 (0)