api icon indicating copy to clipboard operation
api copied to clipboard

Score of submission is wrong

Open yaylinda opened this issue 6 years ago • 15 comments

I'm using this API to get submissions from a subreddit.

The API returned the below data, where the score at the time is 6.

{
            "author": "Yamamba78",
            "author_flair_css_class": null,
            "author_flair_richtext": [],
            "author_flair_text": null,
            "author_flair_type": "text",
            "can_mod_post": false,
            "contest_mode": false,
            "created_utc": 1528999466,
            "domain": "bloomberg.com",
            "full_link": "https://www.reddit.com/r/politics/comments/8r40hh/eus_juncker_says_trump_called_him_a_brutal_killer/",
            "id": "8r40hh",
            "is_crosspostable": true,
            "is_original_content": false,
            "is_reddit_media_domain": false,
            "is_self": false,
            "is_video": false,
            "link_flair_richtext": [],
            "link_flair_text_color": "dark",
            "link_flair_type": "text",
            "locked": false,
            "media_only": false,
            "no_follow": false,
            "num_comments": 33,
            "num_crossposts": 0,
            "over_18": false,
            "parent_whitelist_status": "all_ads",
            "permalink": "/r/politics/comments/8r40hh/eus_juncker_says_trump_called_him_a_brutal_killer/",
            "pinned": false,
            "post_hint": "link",
            "preview": {
                "enabled": false,
                "images": [
                    {
                        "id": "XL4VgbaFWU3kIsRWJFOnW_Xu8BHlffUira-0VGqnsAM",
                        "resolutions": [
                            {
                                "height": 72,
                                "url": "https://i.redditmedia.com/Pl25RcqsD2kdZKMx3iCrmx3aT3s5uXDpIPHVST0fGpM.jpg?fit=crop&crop=faces%2Centropy&arh=2&w=108&s=47e646ca0c7caae439728857746822d2",
                                "width": 108
                            },
                            {
                                "height": 144,
                                "url": "https://i.redditmedia.com/Pl25RcqsD2kdZKMx3iCrmx3aT3s5uXDpIPHVST0fGpM.jpg?fit=crop&crop=faces%2Centropy&arh=2&w=216&s=8ec912bd78668e888aa1570bc2595d04",
                                "width": 216
                            },
                            {
                                "height": 213,
                                "url": "https://i.redditmedia.com/Pl25RcqsD2kdZKMx3iCrmx3aT3s5uXDpIPHVST0fGpM.jpg?fit=crop&crop=faces%2Centropy&arh=2&w=320&s=982624fc43f08674bea2eede59130e2c",
                                "width": 320
                            },
                            {
                                "height": 426,
                                "url": "https://i.redditmedia.com/Pl25RcqsD2kdZKMx3iCrmx3aT3s5uXDpIPHVST0fGpM.jpg?fit=crop&crop=faces%2Centropy&arh=2&w=640&s=02a1e087ca5cf94976c2ac63fa582fe4",
                                "width": 640
                            },
                            {
                                "height": 640,
                                "url": "https://i.redditmedia.com/Pl25RcqsD2kdZKMx3iCrmx3aT3s5uXDpIPHVST0fGpM.jpg?fit=crop&crop=faces%2Centropy&arh=2&w=960&s=eacb463c2c2cac66a0c41460d60160a9",
                                "width": 960
                            },
                            {
                                "height": 720,
                                "url": "https://i.redditmedia.com/Pl25RcqsD2kdZKMx3iCrmx3aT3s5uXDpIPHVST0fGpM.jpg?fit=crop&crop=faces%2Centropy&arh=2&w=1080&s=4ce9dd7ea037b9c9545418c0e4685545",
                                "width": 1080
                            }
                        ],
                        "source": {
                            "height": 800,
                            "url": "https://i.redditmedia.com/Pl25RcqsD2kdZKMx3iCrmx3aT3s5uXDpIPHVST0fGpM.jpg?s=56ee9d239385c1e811946efb8571b5cc",
                            "width": 1200
                        },
                        "variants": {}
                    }
                ]
            },
            "pwls": 6,
            "retrieved_on": 1528999605,
            "rte_mode": "markdown",
            "score": 8,
            "selftext": "",
            "send_replies": true,
            "spoiler": false,
            "stickied": false,
            "subreddit": "politics",
            "subreddit_id": "t5_2cneq",
            "subreddit_subscribers": 3866750,
            "subreddit_type": "public",
            "thumbnail": "https://b.thumbs.redditmedia.com/7Df-N587QedjvLI9JOF1dDpTpkHnVDz-AjLQXs8Gk3Q.jpg",
            "thumbnail_height": 93,
            "thumbnail_width": 140,
            "title": "EU's Juncker Says Trump Called Him a \u2018Brutal Killer\u2019 at G-7",
            "url": "https://www.bloomberg.com/news/articles/2018-06-14/eu-s-juncker-says-he-was-called-brutal-killer-by-trump-at-g-7-jietxcuj",
            "whitelist_status": "all_ads",
            "wls": 6
        }

Following the link to the Reddit post, we see that the score is actually over 200: https://www.reddit.com/r/politics/comments/8r40hh/eus_juncker_says_trump_called_him_a_brutal_killer/

Whey are the scores so off? The num_comments values seem to be the similar (31 vs 33).

yaylinda avatar Jun 15 '18 03:06 yaylinda

Started using this API today, and my guess is that the score field has the comment score value at the time of crawling.

That is, when PushShift found the comment/submission, it had that score; but, after that, its score may have changed.

JoaaoVerona avatar Jun 15 '18 05:06 JoaaoVerona

Yeah, most of the values are 1, which is the default score for new submissions/comments. However, the number of comments for a submission seems to be more correct or more updated. So why doesn't it also update the score when it updates num_comments for a submission object? What is the process for updating the attributes of the submission object?

yaylinda avatar Jun 15 '18 19:06 yaylinda

I'm experiencing the same thing with comments for an author, the score is 1 for all of them until around the 190th entry (October 2017).

atomiks avatar Jul 21 '18 02:07 atomiks

Scores will be updated on a more consistent basis with the next API release (coming soon). Also better documentation will accompany the new API.

pushshift avatar Sep 19 '18 01:09 pushshift

any updates on this? the score for newer posts (newer than a year and half or so) are almost always 1... older posts have higher but most often still slightly incorrect...

lohfu avatar Jan 16 '20 20:01 lohfu

Running into the same problem with newer posts. Have there been any updates recently or will there be any soon? What sort of frequency can we expect posts to be updated with?

wlgfour avatar Jul 29 '20 14:07 wlgfour

Anything new? Seems a lot of people looking for the solution to this "problem"

JHJohny avatar Aug 08 '20 20:08 JHJohny

Score it very important in Reddit eco system. Hope to fix this issue.

yetangzhi avatar Aug 26 '20 10:08 yetangzhi

Yes, please fix this issue!

spitzbubchen avatar Feb 06 '21 14:02 spitzbubchen

Same issue here. Is there a way to get the latest crawl time, so we can assess how reliable the score is?

gobbedy avatar Feb 18 '21 01:02 gobbedy

Same issue - but it should be pretty easy to update them yourself. I'll figure out something and post it here.

sk-drop avatar Feb 10 '22 14:02 sk-drop

@sk-drop when i need the most up-to-date score, I search on Pushshift and use the ids to get the latest metadata from Reddit. This can be done using pmaw or psaw

mattpodolak avatar Feb 10 '22 16:02 mattpodolak

Can seomeone provide any code of the new api release ? for the score please?

ChristinaVassilatos avatar Sep 07 '22 22:09 ChristinaVassilatos