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

[BUG] Android Sample does not run. Github html updated to remove class. #165

Open
mufasa08 opened this issue Oct 1, 2021 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@mufasa08
Copy link

mufasa08 commented Oct 1, 2021

Describe the bug
Changes to github html uses in sample android application breaks current sample.

Classes have been changed.

Code Sample

                        withClass = "follow-list"
                        li {
                            findAll {
                                map {
                                    User(
                                        name = it.h3 {
                                            withClass = "follow-list-name"
                                            findFirst { text }
                                        },
                                        imageUrl = it.img {
                                            withClass = "avatar-user"
                                            findFirst { attribute("src") }
                                        }
                                    )
                                }
                            }
                        }
                    } 

The above code no longer works.

Expected behavior
Proper parsing of github page

Additional context
I've created a branch and updated and would like permission to open a pull request to fix this issue.
Alternatively the solution I propose is as follows.

                htmlDocument {
                    div {
                        withId = "repos"
                    ol {
                        li {
                            findAll {
                                map {
                                    User(
                                        name = it.h3 {
                                            findFirst { text }
                                        },
                                        imageUrl = it.img {
                                            withClass = "avatar-user"
                                            findFirst { attribute("src") }
                                        }
                                    )
                                }
                            }
                        }
                    }
                }
                }
            }```
@mufasa08 mufasa08 added the bug Something isn't working label Oct 1, 2021
@christian-draeger
Copy link
Collaborator

Cool thx a lot :) just open a PR, you are welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants