No description
- JavaScript 60.9%
- Kotlin 39.1%
| .idea | ||
| app | ||
| gradle | ||
| metadata/images | ||
| .gitignore | ||
| build.gradle.kts | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| README.md | ||
| settings.gradle.kts | ||
News Reader
A simple client for reading new posts from Ycombinator News. Instead of using an API, it is implemented using web scraping. While scrolling down the list of posts, new pages are fetched and parsed automatically.
![]() |
![]() |
| Fig. 1: Posts list screen | Fig. 2: Reader mode |
Motivation
The Android Programming class mini project assignment. Also, I wanted to study/try the following things which are also incorporated in the app:
- Typesafe navigation
- Manual dependency injection and repository pattern
- Themed app icon
- Readabilty
Some caveats
- The LazyColumn is a bit laggy in debug builds but very performant in release builds
- Sometimes posts move from one page to the next before the next page is scraped
- This means a post sometimes appears multiple times in the list (though with a different rank) and is expected
- Sometimes requests get rate limited
Potential improvements
- Actually scrape/parse and display post contents instead of using a webview
- Using Readability4JExtended like in this example instead
- Alternatively, posts could also be loaded in a webview in the background and then scraped
- Handle colors and styles in webview better instead of hardcoding them
- Parse and display comments
- Fix some of the ugly hacks and handle unexpected behavior and errors better
- Tests
- Performance improvements
- Support things like links to PDFs

