Is there a way to bring your favorites into the explore tab?

Is there a way to bring up the observations you have favorited in the explore tab? I’d like to be able to do this so I can apply addition filters to search through my favorites.

2 Likes

The explore tab can’t do that. It can filter for favourite observation by clicking popular, but that will include observations that others have favourited. You can also sort by faves.

That may not be what you want but you can get a list of all the observations that you favourited on your home page on iNaturalist. Click ‘Favorites’ second from right. Unfortunately, you can’t apply any filters here and adding url tags after does nothing (e.g. https://inaturalist.ca/faves/yourname?d1=2024-06-01). I don’t think the iNaturalist API could do it either.

these are your your current favorited observations:
https://www.inaturalist.org/observations?place_id=any&verifiable=any&id=224081846,224179935,221135470,221135011,220815007,213198150,212922578,209979191,207792305,207426738,206765538,109119304,204845805,204816577,178072809,204008357,202493152,164885355,41162677,167787993,199153475,198838686,146252716,106254127,197423606,196672942,196075321,193912787,193761549,193131603,124449645,154195559,122667610,181744444,181633397,94582849,180531317,179540855,150173378,171820492,171254638,170159224,168663602,165940871,164980609,164085757,155734455,154352223,151101810,148573880,147725481,146595919,146178145,145740170,145740161,122948688,106181024,138170829,136867806,132224526,82301898,129712234,128916089,127443440,127415565,127195289,125642832,102488427,124413802,123142714,117802399,115056703,113465184,111356914,110011907,107502102,106022777,105862874,105145349,69629262,102565317,101256282,101191036,101008944,98422477,96703134,96703144,96703148,95503899,94971829,92625605,92431517,91429798,91277371,91336286,89867506,89874933,87553547,86125377,83781792,79117825,74871822,70057661,69391483,69122873,69036202,69007696,66739581,66246140,65949861,64213611,63803502,62914291,60967234,62530719,62537730,61925181,61349178,60157359,59715680,58651167,57019180,56179556,54645524,29827702,41942478,4918117,49959043,49508590,45780328,39724566,21216762,6492124,9145650,8289094,7547998,7658742,7551564,7537418

Ah, I can save this link and update it anytime I add a favorite. Thanks for your help!

1 Like

in case anyone is interested, i extracted the list of favorited observation IDs using Power Automate Desktop (built into Windows 11). below is the flow definition that i used. to add this into your own instance of Power Automate Desktop, you could create your own blank flow and then just copy and paste the code below into your flow.

Display.InputDialog Title: $'''User ID''' Message: $'''Input an iNaturalist User ID''' DefaultValue: $'''kueda''' InputType: Display.InputType.SingleLine IsTopMost: True UserInput=> UserInput ButtonPressed=> ButtonPressed
WebAutomation.LaunchEdge.LaunchEdge Url: $'''https://www.inaturalist.org/faves/%UserInput%''' WindowState: WebAutomation.BrowserWindowState.Normal ClearCache: False ClearCookies: False Timeout: 60 BrowserInstance=> Browser
WebAutomation.ExtractData.ExtractListUsingPagingFromAllPages BrowserInstance: Browser Control: $'''html > body > div:eq(0) > div:eq(1) > div > div:eq(1) > div > div:eq(1) > div''' ExtractionParameters: {[$'''div:eq(1) > div > a:eq(0)''', $'''Href''', $''''''] } UsePhysicalClick: False PagerCssSelector: $'''div[id=\"wrapper\"] > div > div:eq(1) > div > div:eq(2) > a[class=\"next_page\"], html > body > div:eq(0) > div:eq(1) > div > div:eq(1) > div > div:eq(2) > a[class=\"next_page\"]''' PostProcessData: False TimeoutInSeconds: 60 ExtractedData=> DataFromWebPage
Variables.CreateNewList List=> listOuput
LOOP FOREACH CurrentItem IN DataFromWebPage
    Text.GetSubtext.GetSubtextFrom Text: CurrentItem CharacterPosition: 41 Subtext=> Subtext
    Variables.AddItemToList Item: Subtext List: listOuput
END
Text.JoinText.JoinWithCustomDelimiter List: listOuput CustomDelimiter: $''',''' Result=> JoinedText
Clipboard.SetText Text: JoinedText
WebAutomation.CloseWebBrowser BrowserInstance: Browser
Display.ShowMessageDialog.ShowMessage Title: $'''Done''' Message: $'''Copied comma-separated list of favorited observation IDs to Clipboard!''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed2
1 Like

as an alternative to the Power Automate flow above, if you’re willing to run stuff directly from your web browser’s console, you can open up the console while you’re on any inaturalist.org page, and run the code below (making sure you change the user_id value to whichever user you’re interested in).

as with the Power Automate flow, it effectively scrapes the user’s faves pages. but with this code, you won’t need anything beyond your web browser, and it’ll run a little faster / more efficiently.

async function getFavesBatch(user_id, page=1) {
  return fetch(`https://www.inaturalist.org/faves/${user_id}?page=${page}`)
  .then((response)=>{ return response.text(); })
  .then((text)=>{
    let parser = new DOMParser();
    let doc = parser.parseFromString(text,'text/html');
    let observations = doc.getElementsByClassName('observation');
    let list = [];
    for (let obs of observations) { list.push(obs.id.replace('observation-','')); };
    let navigationChildren = doc.querySelector('[role=navigation]')?.children;
    let maxBatch = ((typeof navigationChildren !== 'undefined') ? (navigationChildren[navigationChildren.length-2].innerText) : 1);
    if (page===1) { console.log(`total pages: ${maxBatch}`); };
    return {obsList:list, maxPage:maxBatch};
  });
};
let user_id = 'kueda'
let obsList = [];
for (let [i,maxPage] = [1,1]; i<=maxPage; i++) {
  let batchData = await getFavesBatch(user_id,i);
  obsList.push(...batchData.obsList);
  maxPage = batchData.maxPage;
  console.log(`extracted page ${i}`);
};
console.log(obsList.join(','));
1 Like