Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3344320
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:03:21+00:00 2026-05-18T01:03:21+00:00

I am writing a python script to combine about 20+ RSS feeds. I would

  • 0

I am writing a python script to combine about 20+ RSS feeds. I would like to use a custom solution instead of feedjack or planetfeed.

I use feedparser to parse the feeds and mysql to cache them.

The problem I am running into is determining which feeds have already been cached and which haven’t.

Some pseudo code for what I have tried:

  • create a list of all feed items
  • get the date of last item cached from db
  • check which items in my list have a date greater than my item from the db and return this filtered list
  • sort the returned filtered list by date the item was created
  • add new items to the db

I feel like this would work, but my problem is that not all of the dates on the RSS feeds I am using are correct. Sometimes a publisher, for whatever reason, will have feed items with dates in the future. If this future date gets added to the db, then it will always be greater than the date of the items in my list. So, the comparison stops working and no new items get added to the db. I would like to come up with another solution and not rely on the publishers dates.

How would some of you pros do this? Assuming you have to combine multiple rss feeds, save them to a mysql db and then return them in ordered by date. I’m just looking for pseudo code to give me an idea of the best way to do this.

Thanks for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T01:03:21+00:00Added an answer on May 18, 2026 at 1:03 am

    Depending on how often the feeds are updated and how often you check, you could simply fix broken dates (if it’s in the future, reset it to today), before adding them to the database.

    Other than that, you’d have to use some sort of ID—I think RSS has an ID field on each item. If your feeds are kept in order, you can get the most recent cached ID, find that in the feed items list, and then add everything newer. If they’re out of order, you’d have to check each one against your cache, and add it if it’s missing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been writing python scripts that run locally. I would now like to offer
I followed the instructions in this answer about writing a Python script to be
I'm writing a python script that executes a csh script in Solaris 10. The
I'm writing a script in python which basically queries WMI and updates the information
I ended up writing a quick little script for this in Python, but I
I am writing python scripts and execute them in a Makefile. The python script
When writing a Python script that can be executed in different operating system environments
I'm writing a python script that uses os.walk() to walk a directory tree. I'd
I'm writing a python script to extract data out of our 2GB Apache access
I am writing a python script that will be doing some processing on text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.