Better HN
topnewbestaskshowjobs
Log inSign up

adbarba

50 karma · joined Aug 15, 2023 (3y ago) · 6 submissions

github.com/adbar
Submissions

1.

The Rick Roll programming language(github.com ↗)

1 points · by adbarba · 3y ago · discuss

2.

Collection of stand-alone Python machine learning recipes (2021)(github.com ↗)

84 points · by adbarba · 3y ago · 8 comments

comment 3y ago · link · parent

Thanks! Here is what I put together in the docs, you could basically preprocess/render/filter the webpages with the software of your choice and then pass the result to trafilatura: https://trafilatura.readthedocs.io/en/latest/troubleshooting...

comment 3y ago · link · parent

Concerning tooling I'd say you have two different worlds, JavaScript and Python, each with a series of tools to tackle such tasks. It's not easy to compare them directly because of varying software environments and I haven't had a chance to test JS tools thoroughly.

For the sake of completeness: Mozilla's Readability [1] is obviously a reference in the JS world.

[1]: https://github.com/mozilla/readability

comment 3y ago · link · parent

Regarding content extraction it's more accurate than newspaper3k (especially for languages other than English) and it entails more information: metadata, text, and comments. It works out of the box in most cases so no need to write a particular scraper for a given websites, which saves time. If you care about 2-3 websites and are willing to write and maintain scraping scripts then bs4/lxml/whatever is also fine.

It also features functions and a command-line interface to collect data on your own (say find recent news using feeds). So it's not merely about text extraction in the end but also text discovery.

comment 3y ago · link · parent

Author here, nice to see the package on the HN's front page this morning and thanks for the kind words! Just created an account to participate in the discussion, I'll try to answer your questions.