-
Notifications
You must be signed in to change notification settings - Fork 66
Unexpected token < in JSON at position 0 #71
Comments
looks like a major rework from youtube's side i know it's a problem that the library crashes but i'm unsure if it makes sense to adopt at fastest speed possible |
Same issue |
None of my searches are working anymore because of this and I really need this library for my Discord Bot :( |
Same issue, but the problem doesn't occur in a consistent way. Sometime the same search query and option pass while sometimes it doesn't |
Would it be possible to have the current way and if it fails, attempt a more temporary duct-tape fix until we know for sure if the new API formatting will stay? Or at least something we can do locally to force it to work upon a fail? |
Same problem, 75% of requests returns this |
Same problem |
started working on it in https://github.com/TimeForANinja/node-ytsr/tree/wip-api-adjustments but have problems finding the time |
same problem |
1 similar comment
same problem |
ive been getting this alot and while testing I realized its arbitrary one minute it I get it one minute I dont |
Hi all, until the bug is fixed I suggest this work around: in your script/app when you receive this error, clear the cookies in your http connection and retry. Do this until you get a working search, then keep the cookies. |
How can I do this programmatically in an app running server side ? |
😿 I'm having the same issue. Do you have any tips on how to hotfix this running inside Node environment? |
that's the only hotfix i can provide for now |
@TimeForANinja Have a look at https://github.com/SoulHarsh007/youtube-scrape/blob/master/scraper.js, I hope it helps you 😄 |
Seems like its happening 100% of the time now |
i'd count that as a good sign |
Yeah the problem occurs 100% all the time... :c |
For now I am using YT Data API and waiting for this bug to resolve. |
funny enough another API I found had a similar problem. If I get time ill try to help out. |
I have a similar problem too ngl. Is there a way to fix this faster than the devs? I don't want to wait another month :( |
Then help these devs to get fix faster |
They were asking if it was faster. |
It is, I think the dev said theyre short on time so if you can spend time on the repo that would be good ❤️ |
Ok thx, I will wait then. |
@1Conan |
Is there an update on the status? |
Nope! I will try to help the devs but I have to work sry this project where I need this lib is just a side project for my own satisfaction. |
Any update? |
try the wip: |
has any usage doc changed, because im getting "search string is mandatory" error. @TimeForANinja |
Yep, quite a few things changed For your use case I'd have to guess without more intel |
thanks @TimeForANinja for anyone want to use new api
|
- [x] fix requests - [x] update exaple responses - [x] update typings - [x] update documentation / README - [x] rewrite tests closes #87 closes #71 closes #62 # Porting code * The Filters provided by `ytsr#getFilters` are now provided as Map of Maps instead of a Map of Arrays * `result#originalQuery` and `result#correctedQuery` were introduced to differentiate the query that we asked for and the query that youtube provided results for * all refinements are now found at `result#refinements` - sorted by relevance - instead of mixed into `result#items` * `result#active` was renamed to `result#activeFilters` * request options for miniget were moved to `options#requestOptions` * nextpageRef was replaced by the continuation feature => check the README for more information * boolean variables like `live` and `upcoming` were renamed to `isLive` and `isUpcoming` * `ShelfCompact` and `ShelfVertical` were merged into a single type `shelf` which contains an array of any kind of other item - this required the addition of the `GridMovie`-Type (short version of `Movie`) * The `show`-Type was added * `playlist#author` was renamed to `playlist#owner` * for the types `playlist` and `mix` the way thumbnail & firstItem are handled changed => check the typings or example responses * `pages` was added as a more request-efficient alternative to `limit` * all thumbnails are now `Image`-Objects with `url`, `width` and `height` properties - arrays of images are always sorted by descending resolution * all links have been renamed from `ref` to `url` to keep it consistend across all libraries * all snake_case variables were replaced by CamelCase * all users/channels feature both the `channelID` as well as a canonical `url`
Some searches are returning this error... probably something related to JSON.parse() function.
The text was updated successfully, but these errors were encountered: