mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Using story date when there is no guid.
This commit is contained in:
parent
7ea2e01496
commit
2dd4a1d329
1 changed files with 3 additions and 2 deletions
|
@ -615,6 +615,7 @@ class Feed(models.Model):
|
||||||
story_content = story.get('summary')
|
story_content = story.get('summary')
|
||||||
|
|
||||||
existing_story, story_has_changed = self._exists_story(story, story_content, existing_stories)
|
existing_story, story_has_changed = self._exists_story(story, story_content, existing_stories)
|
||||||
|
story_guid = story.get('guid') or story.get('id') or story.get('link') or story.get('published')
|
||||||
if existing_story is None:
|
if existing_story is None:
|
||||||
s = MStory(story_feed_id = self.pk,
|
s = MStory(story_feed_id = self.pk,
|
||||||
story_date = story.get('published'),
|
story_date = story.get('published'),
|
||||||
|
@ -622,7 +623,7 @@ class Feed(models.Model):
|
||||||
story_content = story_content,
|
story_content = story_content,
|
||||||
story_author_name = story.get('author'),
|
story_author_name = story.get('author'),
|
||||||
story_permalink = story.get('link'),
|
story_permalink = story.get('link'),
|
||||||
story_guid = story.get('guid') or story.get('id') or story.get('link'),
|
story_guid = story_guid,
|
||||||
story_tags = story_tags
|
story_tags = story_tags
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
|
@ -636,7 +637,7 @@ class Feed(models.Model):
|
||||||
elif existing_story and story_has_changed:
|
elif existing_story and story_has_changed:
|
||||||
# update story
|
# update story
|
||||||
# logging.debug('- Updated story in feed (%s - %s): %s / %s' % (self.feed_title, story.get('title'), len(existing_story.story_content), len(story_content)))
|
# logging.debug('- Updated story in feed (%s - %s): %s / %s' % (self.feed_title, story.get('title'), len(existing_story.story_content), len(story_content)))
|
||||||
story_guid = story.get('guid') or story.get('id') or story.get('link')
|
|
||||||
original_content = None
|
original_content = None
|
||||||
try:
|
try:
|
||||||
if existing_story and existing_story.id:
|
if existing_story and existing_story.id:
|
||||||
|
|
Loading…
Add table
Reference in a new issue