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

[YouTubeCommunityTabBridge] Add Bridge #1594

Merged
merged 20 commits into from
Mar 25, 2022
Merged

[YouTubeCommunityTabBridge] Add Bridge #1594

merged 20 commits into from
Mar 25, 2022

Conversation

VerifiedJoseph
Copy link
Contributor

@VerifiedJoseph VerifiedJoseph commented Jun 8, 2020

Adds a bridge for YouTube channel community tabs. Closes #1581

@em92
Copy link
Contributor

em92 commented Jun 13, 2020

Why not adding feature to existing YoutubeBridge?

Copy link
Contributor

@em92 em92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VerifiedJoseph VerifiedJoseph marked this pull request as draft February 28, 2021 14:35
@VerifiedJoseph VerifiedJoseph marked this pull request as ready for review March 10, 2021 21:31
@em92
Copy link
Contributor

em92 commented Mar 30, 2021

gj @VerifiedJoseph !

@dvikan
Copy link
Contributor

dvikan commented Mar 24, 2022

@VerifiedJoseph Could not get this working. Maybe they changed the json structure?

@VerifiedJoseph
Copy link
Contributor Author

Odd, works ok here. What channel id or username did you use?
The Bridge only supports "old" style usernames from URLs like https://www.youtube.com/user/enyay and not the "new" ones like https://www.youtube.com/c/TomScottGo.

@dvikan
Copy link
Contributor

dvikan commented Mar 25, 2022

I tried this channel: https://www.youtube.com/channel/UCLzE7jLdn7dqxK-0OdXeuaw

github-actions bot added a commit that referenced this pull request Mar 25, 2022
@github-actions
Copy link

github-actions bot added a commit that referenced this pull request Mar 25, 2022
@Bockiii
Copy link
Contributor

Bockiii commented Mar 25, 2022

I know its blowing my own horn, but i friggin love the preview ^^

The timestamps cant be scraped right? I checked the yt page and it just has the text "2 days ago" or so in there, the actual post-date isnt available, right?

@VerifiedJoseph
Copy link
Contributor Author

I know its blowing my own horn, but i friggin love the preview ^^

Its a great addition to the work flow.

The timestamps cant be scraped right? I checked the yt page and it just has the text "2 days ago" or so in there, the actual post-date isnt available, right?

YouTube only returns the time ago text.

@Bockiii
Copy link
Contributor

Bockiii commented Mar 25, 2022

I thought so. Great addition, thanks!

@Bockiii Bockiii merged commit 7f4a0fa into RSS-Bridge:master Mar 25, 2022
@dvikan
Copy link
Contributor

dvikan commented Mar 26, 2022

I don't think it's working properly. Please provide some test values.

@Bockiii
Copy link
Contributor

Bockiii commented Mar 26, 2022

The example values work

@dvikan
Copy link
Contributor

dvikan commented Mar 28, 2022

They are doing geoip stuff. This change was necessary for it to work for me:

diff --git a/bridges/YouTubeCommunityTabBridge.php b/bridges/YouTubeCommunityTabBridge.php
index 39ef46d..2fb1a81 100644
--- a/bridges/YouTubeCommunityTabBridge.php
+++ b/bridges/YouTubeCommunityTabBridge.php
@@ -153,7 +153,7 @@ class YouTubeCommunityTabBridge extends BridgeAbstract {
        private function hasCommunityTab($json) {
 
                foreach ($json->contents->twoColumnBrowseResultsRenderer->tabs as $tab) {
-                       if (isset($tab->tabRenderer) && $tab->tabRenderer->title === 'Community') {
+                       if (isset($tab->tabRenderer) && $tab->tabRenderer->title === 'Fellesskap') {
                                return true;
                        }
                }
@@ -167,7 +167,7 @@ class YouTubeCommunityTabBridge extends BridgeAbstract {
        private function getCommunityPosts($json) {
 
                foreach ($json->contents->twoColumnBrowseResultsRenderer->tabs as $tab) {
-                       if ($tab->tabRenderer->title === 'Community') {
+                       if ($tab->tabRenderer->title === 'Fellesskap') {
                                return $tab->tabRenderer->content->sectionListRenderer->contents[0]->itemSectionRenderer->contents;
                        }
                }

@VerifiedJoseph VerifiedJoseph deleted the YouTubeCommunityTabBridge branch June 11, 2022 22:52
Kwbmm pushed a commit to Kwbmm/rss-bridge that referenced this pull request Jun 17, 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.

Community tab - YouTube
4 participants