Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 04-03-2025, 05:19 AM   #1
Hotrod_Linc
Junior Member
Hotrod_Linc began at the beginning.
 
Hotrod_Linc's Avatar
 
Posts: 6
Karma: 10
Join Date: Nov 2024
Device: Kindle
Exclamation "HTTP Error 504" On Scheduled News Download.

Problem

I have a news recipe based of the basic one provided by Calibre that downloads four news sources a few days a week in the morning, however one of the four has recently been unable to download. Every time my scheduled download occurs it provides the following error: “Failed feed: 404 Media, HTTP Error 504: Gateway Time-out” (404 Media is the news source, not the usually associated error code). This error only occurs when the scheduled news feed job occurs, manually pulling the recipe with the “Download all scheduled news sources” option downloads the same recipe correctly every time.

Click image for larger version

Name:	Screenshot 2025-04-03 183410.png
Views:	36
Size:	14.1 KB
ID:	214823

Troubleshooting Steps & Info

- Calibre is running 24/7 in a docker container in a server
- The RSS feed of 404 media is a private premium feed
+ This RSS feed once in the past was unable to be pulled from as the
owners system believed Calibre to be a scraping bot, I communicated
with the owner and this error has not recurred
+ Also, this feed does work, as manually triggering the recipe does function,
in addition to validating the RSS feed via other tools.
- The recipe is programmed to initiate every Monday, Wednesday, Friday, and
Sunday after 0400 local time.
- The Error message appears in the epub itself generated by Calibre.

Click image for larger version

Name:	Screenshot 2025-04-03 183507.png
Views:	39
Size:	142.1 KB
ID:	214824

Code
Spoiler:
#!/usr/bin/env python
# vim:fileencoding=utf-8
from calibre.web.feeds.news import BasicNewsRecipe

class AdvancedUserRecipe1730421674(BasicNewsRecipe):
title = 'The Hotrod_Linc Daily News Brief'
description = 'A collection of news sources to provide insight into worldly happenings.'
oldest_article = 7
max_articles_per_feed = 5
auto_cleanup = True
no_stylesheets = True

# Set the custom image for the cover
# cover_url = r'file://C:\Web_Development\Assorted%20/Daily%20News%20cover-1.jpg' # Updated path

feeds = [
('404 Media', 'https://404.feed.press/private?key='), #Full RSS Removed for posting
('Canadaland', 'https://www.canadaland.com/feed/'),
('Internet Archive Blog', 'https://blog.archive.org/feed/'),
('Jacobin Blog', 'https://jacobin.com/feed/'),
]

def get_cover_url(self):
cover_url = 'file:////config/Calibre Library/Covers/Daily News cover-1.jpg'
return cover_url


Finishing Thoughts

If anyone has recommendations on how to fix this issue, I would certainly appreciate any suggestions. Also If there is a log file I can check to get more information about the failed news pulls I would love to know its location. I found a old thread on the forum that briefly mentioned this issue, but I couldn’t ascertain a solution. https://www.mobileread.com/forums/sh...HTTP+Error+504
Hotrod_Linc is offline   Reply With Quote
Old 04-03-2025, 06:51 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,343
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That's a server error, not something that can be fixed in calibre. As for logs you can access the logs for all jobs including news fetches by clicking the jobs button in the bottom right corner of the calibre window (I am assuming you are talking of the calibre GUI).
kovidgoyal is offline   Reply With Quote
Advert
Reply

Tags
error code, news sources, scheduled download


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP Error 403: Forbidden in a recipe for "Les Echos" Villard Recipes 1 01-11-2025 01:55 AM
IngramSpark EPUB validator error:value of attribute "http-equiv" Bjorn G ePub 2 05-03-2019 04:22 PM
Including "Date" in the title of a news download mkha98 Recipes 1 08-23-2011 08:26 AM
HTTP Error 504 when fetch news from an intranet forceps Calibre 2 07-30-2011 12:01 AM
Passing parameters to recipe from "Schedule News Download" Window (e.g. for filtering oecherprinte Recipes 6 05-13-2011 11:38 AM


All times are GMT -4. The time now is 12:17 AM.


MobileRead.com is a privately owned, operated and funded community.