dragnet
parser
dragnet | parser | |
---|---|---|
5 | 12 | |
1,223 | 5,254 | |
0.7% | 1.8% | |
0.0 | 1.1 | |
10 months ago | 7 months ago | |
Python | JavaScript | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
dragnet
-
Features to add to a web scraping project
Iāve had good luck with dragnet in the past for extracting content from html: https://github.com/dragnet-org/dragnet
- See version number
-
Compatibility issues with Dragnet
I am trying to work on a Python tool which makes use of Dragnet as a dependency. After quite a bit of issues I think I am starting to get a better picture that Dragnet will not be very easy to work with. The GitHub page says it was built for Python 2.7 āwith recent support for Python 3ā. The repo hasnāt been updated in 12 months; many of the other updates are from 3-4 years ago. A normal pip installation is not working. Their Issues page is full from posts from one year ago about various installation problems.
-
How does Firefox's Reader View work?
It's really nice that browsers offer reader modes, but they are frustratingly incomplete.
Really, let's switch to a user perspective once and consider - what if I always want reader mode? This is technologically complete impossible and all the solutions are a band-aid.
Firefox and others' attempts rely on the page authors' goodwill. But some pages will always attempt to frustrate reader modes.
Alternative approaches for content extraction use machine learning such as [1], but they of course need to be updated for culture- language- and technology-specific changes.
It's a mess and will remain so for the foreseeable future.
[1] https://github.com/dragnet-org/dragnet
-
[Discussion] good html tokenization libraries?
You can take a look into how dragnet preprocess html block ( the Blockifier function ), it's certainly not the best since it collapse the tree structure into one sequential flow but I think is easier to work with once you know how to modify the code for your own need. While the hard way is use lxml and write the parsing yourself, which is also what's happening under dragnet.
parser
-
Show HN: I made a tool to clean and convert any webpage to Markdown
Thoroughly scraping is challenging, especially in an environment where you donāt have (or want) a JavaScript runtime.
For content extraction, I found the approach the Postlight library takes quite neat. It scores individual html nodes based on some heuristics (text length, link density, css classes). It the selects the nodes with the highest score. [1] I ported it to Swift for a personal read later app.
[1] https://github.com/postlight/parser
-
Trouble Building Chrome Extension to Get News Article Content
I've been working on an enhanced reader mode extension for the last few months. I found that Mercury Reader's parser tool is useful for extracting content. If that's not exactly what you're looking for, readibility is another good option. It's a library used inside Firefox's reader moder that you can use in any project.
-
What Are The Coolest Virtual Machines You Currently Run 24/7?
I currently have it turned off while I search for better sources, but I have a VM that runs a custom cron script that combines a custom RSS reader, podfox, mercury-parser, and coqui-ai to generate audio podcasts from RSS news feeds. I should probably clean it up and release the script/setup process. With a few tweaks and some AI text-to-speech and a little machine learning audio processing you can get a really good podcast experience from text posts.
-
Extracting Text button no longer works
It looks like Relay could be updated to convert it locally though, since the parser that it uses appears to be open source.
-
Which are some open-source Chrome extensions you want to use on Firefox?
https://github.com/postlight/mercury-parser The only one I need, shit's too good
-
API for getting news fulltext
An alternative would be to extract the plain text from the article's page with either some "readability" API or a library like Mercury Parser: https://github.com/postlight/mercury-parser
-
How does Firefox's Reader View work?
I havenāt directly compared them, but I have also found mercury parser (https://github.com/postlight/mercury-parser) to be very reliable.
Since it turns a website into very plain (X)HTML itās fairly easy to use it to make a browsing proxy or automatically produce epub files for e-readers, which is what I do.
-
Build your self-hosted Evernote
Make sure that at the end of the process you have the node and npm executables installed - the http.webpage integration uses the Mercury Parser API to convert web pages to Markdown.
-
Reading from the web offline and distraction-free
Good luck! Those HTML issues you're coming across are tough and so varied across the web!
I was working with Mercury Parser (pluggable parsing for different sites) in the past.
https://github.com/postlight/mercury-parser
- The most underused browser feature
What are some alternatives?
unclutter - A modern reader mode and article library for your browser.
readability - A standalone version of the readability lib
go-dateparser - go parser for human readable dates ported from the dateparser python package
hn-search - Hacker News Search
dom-distiller - Distills the DOM
Just-Read - A customizable read mode web extension.
htmldate - Fast and robust date extraction from web pages, with Python or on the command-line
FParsec - A parser combinator library for F#
arc90-readability - A copy of the original Arc90 repo with links to many of the current ports.
tidy-html5 - The granddaddy of HTML tools, with support for modern standards
go-trafilatura - go-trafilatura is a Go port of the trafilatura Python library.
rdrview - Firefox Reader View as a command line tool