Closed kamalmarhubi closed 6 years ago
This is an empty PR for now, because I want to get feedback on what I'm planning to do since it's a bit hackish. But I find this Medium nonsense really detracts from joy of perusing the blogging stream, so maybe a hack is warranted.
I agree that a hack is probably warranted. User experience over beautiful code.
@kamalmarhubi Would you have the time to implement this? Or would you like me to?
I can do it or not, up to you!
I can do it or not, up to you!
@kamalmarhubi I will definitely not be able to get to this for another couple of weeks. Would you be willing to work on this? Sorry for the super delayed response.
@kamalmarhubi I started using Zulip after a long break, and found the medium comments annoying. So, I finally got around to fixing this bug. The fix is very similar to what you suggest, but it looks at the json that the Medium pages contain, rather than the html structure.
Nice!
DO NOT MERGE since there's nothing here.
This is an empty PR for now, because I want to get feedback on what I'm planning to do since it's a bit hackish. But I find this Medium nonsense really detracts from joy of perusing the
blogging
stream, so maybe a hack is warranted.The main observation: Medium "comment" posts have a link back to the post that is being replied to as part of their
header
, while Medium "post" posts do not. So a comment's header looks like this:while an ordinary post's header looks like this:
My proposed solution:
BooleanField
calledignored
with defaultFalse
to thePost
modelcrawlposts
to treat links specially:header > a
(direct descendent) or XPATH//header/a
(whichever is easier given choice of HTML parsing library)ignored
toTrue
in the generatedPost
ignored
fixes #143