Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Using new YouTube search API #75

Closed
wants to merge 5 commits into from

Conversation

skick1234
Copy link
Contributor

@skick1234 skick1234 commented Oct 25, 2020

This is my temporary solution to fix #71
I have not used getFilters and other options so I cannot upgrade ytsr to v2
I hope you have time to rewrite v2 soon

And fix nullable properties temporary
Need axios to make post requests for interacting with API
@lgtm-com
Copy link

lgtm-com bot commented Oct 25, 2020

This pull request fixes 2 alerts when merging e17324b into 11eec15 - view on LGTM.com

fixed alerts:

  • 2 for Unused variable, import, function or class

@lgtm-com
Copy link

lgtm-com bot commented Oct 25, 2020

This pull request fixes 2 alerts when merging b91de23 into 11eec15 - view on LGTM.com

fixed alerts:

  • 2 for Unused variable, import, function or class

@Ragzouken
Copy link
Contributor

Ragzouken commented Oct 25, 2020

EDIT: actually i suppose i may just not understand what is expected to happen in this case--it's the placeholder result for a scheduled live event that hasn't happened yet

seems not to correctly detect live e.g when searching hello i get this:

{
  type: 'video',
  live: false,
  title: 'Hello Halloween - A Special Hello Neighbor Event',
  thumbnail: 'https://i.ytimg.com/vi/4SIC3FeKGX0/hq720.jpg?sqp=-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLA6oxs-fSn8iK7WCDNZDJXpoKvFkQ',
  upcoming: 1603650600000,
  author: {
    name: 'tinyBuildGAMES',
    ref: 'https://www.youtube.com/user/tinyBuildGAMES',
    verified: true
  },
  description: 'We will be talking about Hello Neighbor 2 & Secret Neighbor Halloween events, and revealing something something completely ...',
  views: null,
  duration: null,
  uploaded_at: null
}

however despite that i was able to filter based on the lack of a duration and use this as a drop-in replacement for the current npm package, so thank you!

@skick1234
Copy link
Contributor Author

skick1234 commented Oct 25, 2020

This is scheduled live, you can see upcoming value.

EDIT: I didn't see your EDIT till I comment this :>

@TimeForANinja
Copy link
Owner

looks to me like you're using youtubes official api which requires an api key
this is not the scope of this project - which is basically a web-scraper 🤔

@skick1234
Copy link
Contributor Author

looks to me like you're using youtubes official api which requires an api key
this is not the scope of this project - which is basically a web-scraper 🤔

But with new youtube search, I cannot get continuation results with get request. And if the first content is an ads (example keywords: toy, frozen, car,...), I cannot get any results.

@TimeForANinja
Copy link
Owner

🤔 might not like switching to api-tokens but don't see how else i would fetch continuation

@skick1234 skick1234 closed this Oct 30, 2020
@skick1234 skick1234 deleted the v2 branch November 25, 2020 15:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants