01-31-2023, 05:09 AM | #1 |
Connoisseur
Posts: 80
Karma: 10
Join Date: Aug 2022
Device: PC
|
Help, Jerusalem Post recipe capture failure,
please take a look, thank you very much!
Failed feed: Arab Israeli Conflict HTTP Error 403: Forbidden |
02-02-2023, 04:39 AM | #2 |
Evangelist
Posts: 448
Karma: 82686
Join Date: May 2021
Device: kindle
|
Code:
def get_browser(self): return BasicNewsRecipe.get_browser(self, user_agent='common_words/based') |
02-02-2023, 04:46 AM | #3 |
Evangelist
Posts: 448
Karma: 82686
Join Date: May 2021
Device: kindle
|
I asked chatGPT to write the recipe
write a calibre news recipe for jerusalem post
Here's an example of a Calibre news recipe for The Jerusalem Post: Title: The Jerusalem Post Author: OpenAI Description: A recipe for downloading the latest news from The Jerusalem Post for offline reading. Step 1: Install Calibre To use this recipe, you will need to have Calibre installed on your computer. Calibre is a free and open-source software that can be downloaded from the Calibre website. Step 2: Add the recipe In Calibre, click on the "Fetch news" button and then select "Configure news sources." In the "News Recipes" section, click the "Import" button and paste the following recipe: PHP Code:
In Calibre, click on the "Fetch news" button and select the "The Jerusalem Post" recipe. The latest news from The Jerusalem Post will be downloaded and saved to your Calibre library. Step 4: Read the news You can now read the latest news from The Jerusalem Post offline using Calibre or another e-reader. Note: This recipe was last tested on [insert date]. The Jerusalem Post may make changes to their website that break this recipe, so please let me know if you encounter any issues. The code doesn't work, keep_tags seems to be wrong.. it was able to find the rss links though |
02-02-2023, 06:30 AM | #4 | |
Connoisseur
Posts: 80
Karma: 10
Join Date: Aug 2022
Device: PC
|
Quote:
Still failing, and only capturing two headlines, not all, and capturing de only headlines, no content, please help to look again Thank you very much from calibre.web.feeds.news import BasicNewsRecipe class TheJerusalemPost(BasicNewsRecipe): title = 'The Jerusalem Post' oldest_article = 30 use_embedded_content = False no_stylesheets = True keep_only_tags = [ dict(name='h1', attrs={'class': 'headline'}), dict(name='div', attrs={'class': 'article-text'}), ] def get_browser(self): return BasicNewsRecipe.get_browser(self, user_agent='common_words/based') feeds = [ ('Top Stories', 'https://www.jpost.com/Rss/RssFeedsHeadlines.aspx'), ('Israel News', 'https://www.jpost.com/Rss/RssFeedsIsrael.aspx'), ('International News', 'https://www.jpost.com/Rss/RssFeedsWorld.aspx'), ('Opinion', 'https://www.jpost.com/Rss/RssFeedsOpinion.aspx'), ('Features', 'https://www.jpost.com/Rss/RssFeedsFeatures.aspx'), ] |
|
02-02-2023, 06:34 AM | #5 |
Connoisseur
Posts: 80
Karma: 10
Join Date: Aug 2022
Device: PC
|
Last edited by fengli; 02-02-2023 at 06:37 AM. |
02-02-2023, 07:46 AM | #6 |
creator of calibre
Posts: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That was a valiant try by ChatGPT, but sadly it looks like I cant retire just yet
|
02-02-2023, 08:09 AM | #7 | |
Evangelist
Posts: 448
Karma: 82686
Join Date: May 2021
Device: kindle
|
Quote:
but it some how searched for actual rss feeds and placed them into the code instead of making them up. fengli .. don't add that code to the recipe created by chatGPT! add it to the built-in recipe. |
|
02-02-2023, 09:37 AM | #8 |
creator of calibre
Posts: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yeah its interesting I wonder where it got those rss feeds from. At least one of them is wrong, the features one is a 404
But here are some additions inspired by ChatGPT https://github.com/kovidgoyal/calibr...09b96a6c3eb89b |
02-02-2023, 07:42 PM | #9 | |
Connoisseur
Posts: 80
Karma: 10
Join Date: Aug 2022
Device: PC
|
Quote:
|
|
02-02-2023, 11:21 PM | #10 | |
Evangelist
Posts: 448
Karma: 82686
Join Date: May 2021
Device: kindle
|
Quote:
it came up with the same set of instructions (with those steps) for all the recipes I asked for. here are some of the recipes I asked it to create. Spoiler:
Looks like what came out from one session yesterday is very different from today's. Last edited by unkn0wn; 02-02-2023 at 11:24 PM. |
|
02-02-2023, 11:31 PM | #11 |
creator of calibre
Posts: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That's surprising to me. It means it is adjusting its model continuously. How does anyone use it reliably for anything? If the very same question elicits different answers after a few hours...
|
02-02-2023, 11:56 PM | #12 | |
Evangelist
Posts: 448
Karma: 82686
Join Date: May 2021
Device: kindle
|
Quote:
Looks like it was only a one session thing. Lucky that I didn't clear yesterdays session yet otherwise it would've looked like I made it all up. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Jerusalem Post fails | mjfriedman | Recipes | 1 | 12-09-2021 09:44 PM |
Jerusalem Post | mjfriedman | Recipes | 0 | 06-01-2021 11:35 AM |
Shalom from Jerusalem | kadrak | Introduce Yourself | 12 | 10-19-2010 10:35 PM |
newsweek recipe failure | scwehrl | Calibre | 12 | 05-19-2009 04:57 PM |
Problems with the Jerusalem Post Feed | mccande | Calibre | 1 | 12-05-2008 02:00 PM |