Skip to content

Commit

Permalink
Update phoronix.com custom parser (#624)
Browse files Browse the repository at this point in the history
* Remove mercury Makefile step

* Don't use abs URL to parse images

* Update mercury parser
  • Loading branch information
jocmp authored Dec 23, 2024
1 parent dce7864 commit acbf355
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ FASTLANE ?= bundle exec fastlane
assets:
$(MAKE) -C article_forge clean build

.PHONY: build-mercury
build-mercury:
$(MAKE) -C article_forge build-mercury

.PHONY: deps
deps: ## Install bumpver
pip install bumpver==2024.1130
Expand Down
2 changes: 1 addition & 1 deletion capy/src/main/assets/mercury-parser.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions capy/src/main/java/com/jocmp/capy/articles/CleanLinks.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import org.jsoup.nodes.Element

internal fun cleanLinks(element: Element) {
element.getElementsByTag("img").forEachIndexed { index, child ->
child.attr("src", child.absUrl("src"))

if (index > 0) {
child.attr("loading", "lazy")
}
Expand Down

0 comments on commit acbf355

Please sign in to comment.