Comments (6)
Can you give me your example site url or html document?
from readability.
@keepcosmos for example https://www.douban.com/note/603462275/
from readability.
Also crashes with the same error on many english pages, for example any article I tried from The New York Times https://www.nytimes.com/2017/01/30/us/immigration-ban-locations.html?_r=0
from readability.
@rupertqin Thanks for reporting. It fixed. Try v 0.7.0
@JosephHalter Your error also fixed. But it was different case. Your url return 303. Maybe it is httpoison issue. Plz check here
from readability.
v0.8.0
In most case, Readability.summarize
is always work, but in my case, I need Readability.article
, it's my code:
case HTTPoison.get("http://zh.html.net/tutorials/css/lesson3.php", @headers, @request_options) do
{:ok, response} ->
case response.status_code do
200 ->
response.body
|> IO.inspect
|> Readability.article
|> IO.inspect
_ ->
"no match"
end
{:error, _response} ->
IO.inspect "BAD LINK 4xx"
_ ->
IO.inspect "BAD LINK 5xx"
end
when the url = "http://zh.html.net/tutorials/css/lesson3.php", it fails, and alarm:
** (FunctionClauseError) no function clause matching in Floki.HTMLTree.build/1
(floki) lib/floki/html_tree.ex:14: Floki.HTMLTree.build(nil)
(floki) lib/floki/finder.ex:48: Floki.Finder.find_selectors/2
(floki) lib/floki/filter_out.ex:17: Floki.FilterOut.filter_out/2
(floki) lib/floki.ex:210: Floki.text/2
(readability) lib/readability/helper.ex:75: Readability.Helper.text_length/1
(readability) lib/readability/article_builder.ex:36: Readability.ArticleBuilder.build/2
when the url = "http://html.net/tutorials/css/lesson3.php", it works well.
so it seems support Chiness not well.
from readability.
It's a very old issue, and for me it works with the newest version just fine (v0.12.0). Closing as no longer relevant, please open a new issue if something doesn't work as expected.
from readability.
Related Issues (20)
- XML version tag seems to break summarize HOT 3
- Title suffix detection breaks with phrases-like-this
- Title tag finder pulls titles from SVG elements
- Multiple title matches are concatenated
- TitleFinder raises an ArgumentError if no titles are found
- Relative image urls are broken in extracted content.
- Bug when extracting article from HTML HOT 2
- function Floki.Selector.match?/2 is undefined or private. HOT 9
- (FunctionClauseError) no function clause matching in Readability.Helper.remove_tag/2 HOT 2
- Support current version of Elixir and Floki HOT 4
- (FunctionClauseError) no function clause matching in Floki.HTMLTree.build/1 HOT 2
- Make url request interface that returns structured result data
- Dependency versions too old HOT 2
- Command line interface
- Publish Updated Release to Hex HOT 1
- Unify options used for `summarize` and `article`
- Extract authors
- Floki Dependency HOT 2
- Summarize from Raw HTML HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from readability.