Skip to content

Commit

Permalink
use the LWN weekly publication date
Browse files Browse the repository at this point in the history
Borrows a trick from foreignaffairs.recipe to set the publication date
in the title as opposed to the conversion date. Bulk conversion
(unfortunately) is a frequent thing when catching up after a holiday or
crontab breakage. It is really annoying figuring out the LWN weekly
edition reading order if they all have the same title based on the
conversion date.
  • Loading branch information
Pieter Smith committed Dec 29, 2024
1 parent bfbd83b commit 78bd181
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions recipes/lwn_weekly.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ class WeeklyLWN(BasicNewsRecipe):
else:
index_url = self.print_version('/free/bigpage')
soup = self.index_to_soup(index_url)

date_match = re.match(r'.* +for +(.*) +\[.*', self.tag_to_string(
soup.head.title.string))
if date_match:
self.timefmt = u' [%s]' % date_match[1]

curr = soup.body

articles = {}
Expand Down

0 comments on commit 78bd181

Please sign in to comment.