Skip to content

Commit

Permalink
Merge pull request #200 from Lukas0907/next
Browse files Browse the repository at this point in the history
falter.at: Fix issue number generation.
  • Loading branch information
Lukas0907 committed May 22, 2019
2 parents bb5f568 + d7c7474 commit 8f11b03
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion feeds/spiders/falter_at.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ def parse_archive(self, response):
latest_issue_date = dateutil_parse(
issues[sorted(issues.keys())[-1]][-1], ignoretz=True
)
issuenr = latest_issue_date.strftime("%Y%W")
# The JS frontend calculates the issue number the same way, so this should be
# somewhat official.
issuenr = "{0[0]}{0[1]}".format(latest_issue_date.date().isocalendar())
return scrapy.Request(
response.urljoin("/api/archive/{}?count=1000&from=0".format(issuenr)),
self.parse_archive_search,
Expand Down

0 comments on commit 8f11b03

Please sign in to comment.