Skip to content

Tootoot.fm Scraper - #1

Open
JMatej wants to merge 5 commits into
masterfrom
review
Open

Tootoot.fm Scraper#1
JMatej wants to merge 5 commits into
masterfrom
review

Conversation

@JMatej

@JMatej JMatej commented Sep 29, 2025

Copy link
Copy Markdown
Owner

@JMatej JMatej self-assigned this Sep 29, 2025

@metalwarrior665 metalwarrior665 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good and clean. Please go through the comments and either implement the proposed changes or argue for different solution :)

Comment thread .actor/input_schema.json Outdated
Comment thread README.md Outdated
Comment thread src/const.ts Outdated
Comment thread src/utils.ts Outdated
Comment thread src/main.ts Outdated
Comment thread src/utils.ts Outdated
Comment thread src/utils.ts
*
* Returns `undefined` when `rawDate` is missing or invalid.
*/
export function rawToLocalISOString(rawDate: string | undefined, endOfDay = false): string | undefined {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should better explain to both users and readers of the code but you are approaching the event times. As I understand it, you get the event time in the local timezone since that is really the only relevant time for the event.

I didn't really understand the full time conversion logic you are doing but for filtering event time with since and till, I think it is easier to take the current UTC time and then convert each event time to UTC time (since each event can technically have different timezone, right?). Then you just work in UTC which is the standard.

Comment thread src/routes.ts Outdated
Comment thread src/routes.ts
}

const nextPage = request.userData.page + 1;
await addRequests([

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. There is no way to know if there any more events on the next page? Currently, you have to do one more request to see if there are 0 results. You should be able to count the current events on the page or maybe there is some total events indiciation in the response.
  2. If you would know the total, you could theoretically enqueue all the pages upfront here to speed up scraping. But it is probably already very fast.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I haven't found any indication.
  2. Yes, makes sense, but I don't know them upfront. It is really fast either way 😄

Comment thread tsconfig.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants