Youtube data api search issue, next page results contain ...

文章推薦指數: 80 %
投票人數:10人

I used youtube data api returning search result. And to get more result, I used nextPageToken as param. => when a btn i made clicked, ... Home Public Questions Tags Users Companies Collectives ExploreCollectives Teams StackOverflowforTeams –Startcollaboratingandsharingorganizationalknowledge. CreateafreeTeam WhyTeams? Teams CreatefreeTeam Collectives™onStackOverflow Findcentralized,trustedcontentandcollaboratearoundthetechnologiesyouusemost. LearnmoreaboutCollectives Teams Q&Aforwork Connectandshareknowledgewithinasinglelocationthatisstructuredandeasytosearch. LearnmoreaboutTeams Youtubedataapisearchissue,nextpageresultscontainpreviouspage'svideos AskQuestion Asked 3monthsago Modified 3monthsago Viewed 63times 0 Iusedyoutubedataapireturningsearchresult.Andtogetmoreresult,IusednextPageTokenasparam.=>whenabtnimadeclicked,showingnextpage's5videos. Itactuallyworks,butsomenextpageresultscontainpreviouspage'svideos. Iexpectedif3rdpagevideosarea,b,c,d,e,4thpageitemsaref,g,h,i,j. but4thpage'slikea,f,g,h,iorsomething.I'mnotsurethereisanyrulesornot. search=async(input)=>{ constresponse=awaitfetch( `https://youtube.googleapis.com/youtube/v3/search?part=snippet&q=${input}&type=video&maxResults=15&key=${this.key}`, this.requestOptions ); returnawaitresponse.json(); }; loadMore=async(searchToken,inputValue)=>{ constresponse=awaitfetch( `https://youtube.googleapis.com/youtube/v3/search?part=snippet&q=${inputValue}&type=video&pageToken=${searchToken}&key=${this.key}`, this.requestOptions ); returnawaitresponse.json(); }; hasanyoneexperiencedandsolvedthisproblems? javascriptsearchpaginationyoutube-apiyoutube-data-api Share Improvethisquestion Follow editedMay2at4:59 RoAringTigeR askedMay2at3:41 RoAringTigeRRoAringTigeR 111bronzebadge 3 Pleaseclarifyyourspecificproblemorprovideadditionaldetailstohighlightexactlywhatyouneed.Asit'scurrentlywritten,it'shardtotellexactlywhatyou'reasking. – Community Bot May2at3:45 Howareyoucallingasync(searchToken,inputValue)areyousureyournotsendingprevPageToken – DaImTo May2at6:52 Icheckeditwithconsolebefore,thereisnoproblem.newitemsarenotexactlysamewithpreviouspage,butincludingsomeitems. – RoAringTigeR May2at22:49 Addacomment  |  0 Sortedby: Resettodefault Highestscore(default) Trending(recentvotescountmore) Datemodified(newestfirst) Datecreated(oldestfirst) Knowsomeonewhocananswer?Sharealinktothisquestionviaemail,Twitter,orFacebook. YourAnswer ThanksforcontributingananswertoStackOverflow!Pleasebesuretoanswerthequestion.Providedetailsandshareyourresearch!Butavoid…Askingforhelp,clarification,orrespondingtootheranswers.Makingstatementsbasedonopinion;backthemupwithreferencesorpersonalexperience.Tolearnmore,seeourtipsonwritinggreatanswers. Draftsaved Draftdiscarded Signuporlogin SignupusingGoogle SignupusingFacebook SignupusingEmailandPassword Submit Postasaguest Name Email Required,butnevershown PostYourAnswer Discard Byclicking“PostYourAnswer”,youagreetoourtermsofservice,privacypolicyandcookiepolicy Browseotherquestionstaggedjavascriptsearchpaginationyoutube-apiyoutube-data-apioraskyourownquestion. TheOverflowBlog Howtointerrogateunfamiliarcode Ahistoryofopen-sourcelicensingfromalawyerwhohelpedblazethetrail... FeaturedonMeta Recentsiteinstability,majoroutages–July/August2022 StagingGroundWorkflow:QuestionLifecycle AnnouncingDesignAccessibilityUpdatesonSO Shouldweburninatethe[maintenance]tag? Linked 0 YoutubeDataAPISearchReturningRepeatingItems Related 76 Retrieveallvideosfromyoutubeplaylistusingyoutubev3API 4 YouTubeAPIV3search,relatedvideossortorderdoesn'twork 0 Youtubeapiv3forgetChannel'svideos 3 CannotpagethroughallresultsusingnextPageTokenonYouTubesearchAPIv3 0 YouTubeDataAPI(v3)searchpagination,return"items"empty 0 YouTubeDataAPInotreturningcorrectvideosforlanguagequeryusingrelevanceLanguage=en HotNetworkQuestions Visualizethephaseofcomplexsquarerootwithcomplicatedcut Spendablebymeordeposittoexchangeafter5years? IsthereawordforthebeliefsofBaptists? Howarefighterjetsabletobeflownbyonepilotevenwithmaximumtakeoffweightsexceeding12,500lb? Gowasteorgowasted? InVermont,whatdetermineswhichprisondoesanon-binarypersongoesto? HowcanIshiftacharacterunderasuperscript? Isthereagoodgeometricanalogyfora'trap'dimensionthatyoucanstumbleintoeasilybutisveryhardtoexit? WhatdoesthiscodemeaninthefinaleofBetterCallSaul? OnconjecturesaboutthearithmeticfunctionthatcountsthenumberofSophieGermainprimes Howtoselectallpolygonswithinaselectededgeperimeter? WordleGameclone WhattypeofEuleranglesisusedinBlender? Whatiswrongwithmygrep? Howwouldablindintelligentspeciesnavigatespace? Anotherpseudo-IQquestion CanaUSdistrictcourtallowedtoawardpunitivedamagesbasedonotherstate'slaw? Istheword"ball"omittedinthissentence? Areoptimizationresultsstochastic? CanaMastergraduatedstudentbeaparticipantinascientificconference? CanadianworkertravellingtotheUS--canIworkfor1-2daysformyCanadianemployer? Canheat(?)flowfromacoldobjecttohotobject? WhydidFeynmansaythedoubleslitexperiment"containstheonlymystery"ofquantummechanics? WhydotheDunedainwearFëanorianstars? morehotquestions Questionfeed SubscribetoRSS Questionfeed TosubscribetothisRSSfeed,copyandpastethisURLintoyourRSSreader. lang-js Yourprivacy Byclicking“Acceptallcookies”,youagreeStackExchangecanstorecookiesonyourdeviceanddiscloseinformationinaccordancewithourCookiePolicy. Acceptallcookies Customizesettings  



請為這篇文章評分?