Skip to content

add sitemapindex generator #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

wschaub
Copy link
Contributor

@wschaub wschaub commented Jun 7, 2014

add the generate_sitemapindex function which takes a list of dicts containing
a 'loc' key and optionall a lastmod key (containing a datetime.date or
datetime.datetime object) and creates a sitemapindex file.

wschaub added 2 commits June 6, 2014 20:11
add the generate_sitemapindex function which takes a list of dicts containing
a 'loc' key and optionall a lastmod key (containing a datetime.date or
datetime.datetime object) and creates a sitemapindex file.
This patch replaces the __init__ of FixedOffset with a set method
instead. This is so we can unpickle datetime objects using this tzinfo
based class as a tzinfo= argument. you can read all about it at
https://docs.python.org/2/library/datetime.html#tzinfo-objects

I ran into this while trying to unpickle a pickled dictionary filled with
UrlSetElement objects that I had read in from the sitemap library which
had a lastmod set in the parsed sitemap you get a nasty traceback
complaining about __init__ requiring 4 arguments but only one given with
out much useful info on what inside the pickle file caused it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant