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

[YoutubeBridge] Fix bridge #2208

Merged
merged 24 commits into from
Sep 11, 2021
Merged

[YoutubeBridge] Fix bridge #2208

merged 24 commits into from
Sep 11, 2021

Conversation

csisoap
Copy link
Contributor

@csisoap csisoap commented Jul 10, 2021

  • Add support for custom channel name (as request [YoutubeBridge] Channel slug input support #2206).
  • Add new method to fetch JSON data.
  • Search, listing now parsing data through JSON, HTML is not work anymore.
  • Remove page number input on the Search endpoint.
  • Merge two parseJSON function into one.
  • Add ability to get better timestamp.
  • Fix regex on duration limit.
  • Add anchor on some link in the description text.
  • Add URL on the getURI() for each context.
    UPDATE 20/07/2021:
  • Add support for Youtube Data API v3. => Temporary remove API support, going to create a new PR after this PR merged.
  • Fix playlists that have more than 15 items not display correctly.
  • Add new custom name parameter.
  • Fix sorting on playlist not function correctly if use API.
  • Fix duration when try to get timestamp from Premiering video. (I haven't tested this on API)
  • Update regex for URL.

Notes: This bridge will handle the case like Video, Livestream. Other videos like Premiering stuff not tested.

@csisoap csisoap marked this pull request as draft July 11, 2021 11:51
csisoap added 3 commits July 11, 2021 19:13
- Merge two parseJSON into one.
- Remove ytBridgeParseHtmlParsing() due to YouTube not populating HTML in the first run.
- Add ability to get better timestamp.
- Handle the case of 'Livestream' video.
@csisoap csisoap marked this pull request as ready for review July 12, 2021 03:22
@em92 em92 linked an issue Jul 12, 2021 that may be closed by this pull request
Copy link
Contributor

@em92 em92 left a comment

Comment on lines 42 to 46
),
'pa' => array(
'name' => 'page',
'type' => 'number',
'exampleValue' => 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Deleting this parameter will make previous generated feed links invalid. As for now, I suggest to leave it as for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@em92 I've pushed new commit that fixed.

- Fix condition error that make some feed stop working.
- Fix feed name in the search feed.
- Add back the page number parameter on the search feed.
@em92
Copy link
Contributor

em92 commented Jul 13, 2021

https://feed.eugenemolotov.ru/pr2208/?action=display&bridge=Youtube&context=By+playlist+Id&p=PLaDrN74SfdT7Ueqtwn_bXo1MuSWT0ji2w&duration_min=&duration_max=&format=Html

Item timestamps are incorrect. All videos show July 13 (today) with different years.

Previous version of timestamp fetching worked fine. Isn't it?

Comment on lines 224 to 227
$count++;
if($count == 20) {
break;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Playlist can have videos sorted by ascending (oldest first) upload date. This construction will ignore latest videos, which is not good.

For example: https://www.youtube.com/playlist?list=PLaDrN74SfdT7Ueqtwn_bXo1MuSWT0ji2w

@csisoap
Copy link
Contributor Author

csisoap commented Jul 14, 2021

https://feed.eugenemolotov.ru/pr2208/?action=display&bridge=Youtube&context=By+playlist+Id&p=PLaDrN74SfdT7Ueqtwn_bXo1MuSWT0ji2w&duration_min=&duration_max=&format=Html

Item timestamps are incorrect. All videos show July 13 (today) with different years.

Previous version of timestamp fetching worked fine. Isn't it?

I looked into the video, for example like this: https://www.youtube.com/watch?v=UP091FeB-3o and see the timestamp is 2 years ago 15 minutes after extracted. So that why you see all videos show today with different years.

@csisoap
Copy link
Contributor Author

csisoap commented Jul 14, 2021

I'm going to remove those timestamp and set it back to use the meta timestamp instead.
The only way to get the corrected timestamp beside RSS feed is to using API from YouTube.

@em92
Copy link
Contributor

em92 commented Jul 20, 2021

Add support for custom channel name

This must be implemented as the other context, not as "User". For example, these channels are different:
https://www.youtube.com/c/DeathmatchTV
https://www.youtube.com/user/DeathmatchTV

Everything else looks good and ready to be merged once resolved issue above.

csisoap added 4 commits July 20, 2021 16:19
- Add support for Youtube Data API v3.
- Fix playlists that have more than 15 items not display correctly.
- Add new custom name parameter.
- Fix sorting on playlist not function correctly if use API.
@csisoap
Copy link
Contributor Author

csisoap commented Jul 28, 2021

Temporary marking this as draft until PR #2100 is merged

@csisoap csisoap marked this pull request as draft July 28, 2021 08:16
@em92
Copy link
Contributor

em92 commented Jul 28, 2021

hi, @csisoap!
How is this PR related to that PR? That PR btw is blocked by other (droping support of php 5.6 and 7.0)

@csisoap
Copy link
Contributor Author

csisoap commented Jul 28, 2021

hi, @csisoap!
How is this PR related to that PR? That PR btw is blocked by other (droping support of php 5.6 and 7.0)

Hi @em92, this PR does supported Youtube Data API v3, which requires an API key. And that PR supported using environment variable for the bridge. I'm intent to add support for getting API key from environment variable once that PR is merged to avoid people accidently commited to the public repo.

@em92 em92 linked an issue Aug 30, 2021 that may be closed by this pull request
@em92
Copy link
Contributor

em92 commented Sep 5, 2021

hi again, @csisoap!
Could you please temporary take out Youtube Data API v3 support and add new PR after I merge this PR? There are other some good features and fixes that you implemented. #2100 problably will be long to accept since RSS-Bridge needs to drop php 5.6 and 7.0.

After you take that API usage out, I will check PR again and, if everything works fine, I will accept it.

@csisoap
Copy link
Contributor Author

csisoap commented Sep 6, 2021

You can merge it now, @em92

@csisoap csisoap marked this pull request as ready for review September 6, 2021 08:20
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.

@em92 em92 merged commit a264085 into RSS-Bridge:master Sep 11, 2021
@em92
Copy link
Contributor

em92 commented Sep 11, 2021

gj!

@csisoap csisoap deleted the youtube branch September 11, 2021 11:11
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.

YouTube Feed failed to generate with error 0 [YoutubeBridge] Channel slug input support
2 participants