Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

female coder collector #409

Merged
merged 10 commits into from
Apr 25, 2024
Merged

female coder collector #409

merged 10 commits into from
Apr 25, 2024

Conversation

mahdikhashan
Copy link
Contributor

resolves #346

@mahdikhashan mahdikhashan self-assigned this Apr 23, 2024
@mahdikhashan mahdikhashan requested a review from kadhonn April 24, 2024 12:12
@mahdikhashan
Copy link
Contributor Author

the problem is the image on the female coder website is in "webp" format and when I ingested the collector on my local, it could not respond any image.

@mahdikhashan mahdikhashan marked this pull request as ready for review April 24, 2024 12:13
val eventUrls = mutableListOf<String>()
val document = Jsoup.parse(fetcher.fetchUrl(baseUrl))

document.select("div.et_pb_section_3 .event_details")
Copy link
Member

Choose a reason for hiding this comment

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

it is fine as it is, but you could rewrite this forEach loop with a .map operation

then it would look something like

val eventUrls = document.select("div.et_pb_section_3 .event_details")
      .map {
        it.select("a").first().attr("href")
      }

val currentYear = LocalDate.now().year

val localDate = LocalDate.parse("$date $currentYear", DateTimeFormatter.ofPattern("MMMM dd yyyy", Locale.ENGLISH))
val localStartTime = LocalTime.parse(startTime.uppercase(Locale.getDefault()), DateTimeFormatter.ofPattern("hh:mm a"))
Copy link
Member

Choose a reason for hiding this comment

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

please do not use Locale.getDefault(), use english or german

@mahdikhashan mahdikhashan requested a review from kadhonn April 25, 2024 11:29
@mahdikhashan mahdikhashan merged commit b22183c into main Apr 25, 2024
1 check passed
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.

add female coders events
2 participants