Youtube data api search issue, next page results contain ...
文章推薦指數: 80 %
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
延伸文章資訊
- 1#101 使用YouTube Data API 抓取有趣的Youtuber 影片& MV
YouTube 上有那麼多精彩的影片,有沒有可能我們自己寫個App,串接它豐富的資料呢? 當然可以,透過YouTube Data API,我們不只能從YouTube 回傳的JSON 取得影片的相...
- 2JavaScript Quickstart | YouTube Data API - Google Developers
This quickstart guide explains how to set up a simple page that makes requests to the YouTube Dat...
- 3Youtube Data API 使用手札 - HackMD
在此紀錄, Youtube Data API In Node.js 的實做過程, 以免下一次忘記如何做! ... 如果想要限制API 金鑰, 可自行設定, 本文建議先測通 Youtube Sea...
- 4How to Get a YouTube API Key [Tutorial + Examples]
On the Credentials window, select YouTube Data API v3 for the first blank space, Web server (e.g....
- 5JavaScript YouTube API Course - Udemy
Explore how to connect to web API's like YouTube and get data from the API place it on your web p...