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

Fixed related videos returning empty array #481

Merged
merged 30 commits into from Sep 11, 2019
Merged

Conversation

ashikmeerankutty
Copy link
Contributor

@ashikmeerankutty ashikmeerankutty commented Aug 30, 2019

Fixes #479
Before
Screenshot 2019-08-30 at 11 53 18 PM
After
Screenshot 2019-08-30 at 11 53 48 PM


IssueHunt Summary

Referenced issues

This pull request has been submitted to:


IssueHunt has been backed by the following sponsors. Become a sponsor

@NightScript370
Copy link

Can you include a link to the author as well? It'd be really useful

@ashikmeerankutty
Copy link
Contributor Author

ashikmeerankutty commented Aug 31, 2019

Can you include a link to the author as well? It'd be really useful

ucid contains the youtube channel id. using the id you can create the channel URL.

image

Copy link
Owner

@fent fent left a comment

Choose a reason for hiding this comment

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

Hey, thank you for taking the time to make the PR. I added some comments to the changes.

one thing I noticed is the formatting of the code added. I try to keep the formatting for all files using the same style. in this case, a space after a comma, and using camelCase for variables. linting should probably be added to the build process so it warns about these things, but I can do that later

lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
Copy link
Owner

@fent fent left a comment

Choose a reason for hiding this comment

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

also, add semicolons wherever missing

lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
@cloudrac3r
Copy link

Seems like YouTube's changed something yet again. You should check again that this works.

lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
@fent
Copy link
Owner

fent commented Sep 8, 2019

Seems like YouTube's changed something yet again. You should check again that this works.

I just checked with a few videos, seems to work

@fent
Copy link
Owner

fent commented Sep 8, 2019

just noticed a few issues

Screen Shot 2019-09-07 at 11 05 36 PM

  • view_count contains commas, that can easily be fixed with a .replace().
  • length_seconds should be in seconds, not in time format. you can parse this with the humanStr() function from the m3u8stream module. it's used here:
    format.url += '&begin=' + parseTime.humanStr(options.begin);
    , it returns milliseconds btw
  • short_view_count_text can be parsed too with parseTime.durationStr(), should add another property to the object and call it short_view_count

@ashikmeerankutty
Copy link
Contributor Author

  • short_view_count_text can be parsed too with parseTime.durationStr(), should add another property to the object and call it short_view_count

when I tried parseTime.durationStr() on short_view_count_text i'm getting these results

image

lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
@fent
Copy link
Owner

fent commented Sep 8, 2019

when I tried parseTime.durationStr() on short_view_count_text i'm getting these results

image

ah, sorry, my mistake. durationStr() is for parsing time strings. I'm ok with keeping it this way, since it was previously in this format anyway.

lib/info-extras.js Outdated Show resolved Hide resolved
lib/info-extras.js Outdated Show resolved Hide resolved
@fent fent merged commit a24c8f8 into fent:master Sep 11, 2019
@fent
Copy link
Owner

fent commented Sep 11, 2019

thank you! and thank you for the patience with my comments

@ashikmeerankutty
Copy link
Contributor Author

:

thank you! and thank you for the patience with my comments

Thank you for your comments, that helped me a lot 👍

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.

related_videos is always empty
5 participants