weird get_posts() behavior/bug
See original GitHub issueI normally call get_posts()
like this:
posts = get_posts(username, cookies=cookie_file, extra_info=True,
options={'page_limit': None, 'allow_extra_requests': False, 'HQ_images': False})
But for posts 10215606930220434, 10111743443272349 and 10229044620250382 this doesn’t return the correct number of likes/reaction_count (it returns 0) but this:
posts = get_posts(username, cookies=cookie_file, extra_info=True,
options={'page_limit': None, 'allow_extra_requests': False, 'reactors': True, 'HQ_images': False})
does. For every other post I’ve seen, they both return the number of likes/reaction_count properly.
Issue Analytics
- State:
- Created a year ago
- Comments:7
Top Results From Across the Web
Strange get_the_* behavior with php 5.4
With PHP 5.2, it works as expected. I updated to PHP 5.4, and get_the_content() is returning the parent content, instead of the current...
Read more >12821 (Merge get_posts() and get_pages()) - WordPress Trac
Attempting to maintain the order of IDs as given and ran into this strange decade-old behavior. Using get_posts() with post__in works as expected, ......
Read more >get_field() resets $post? - ACF Support
Today i noticed strange behavior which seems caused by get_field ... The same post is output before and after using get_field() , so...
Read more >Wordpress permalink strange behavior: output depends on ...
I can't see an error themes very strange to me. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> ......
Read more >wordpress-custom-content-type-manager - issue #246 - Google Code
advanced search operators in get_posts (greater than, less than) ... not numerically, which makes things weird... but it does look like it's working....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks.
Now it seems that
never returns non-0 values for likes/reaction_count. Does this mean Facebook is changing the HTML format overall?
I’m trying to minimize request count, so I’d like to avoid having to get posts one by one.
https://github.com/kevinzg/facebook-scraper/commit/40c1e8a6f81d7a89256abaa0811b301875e1a6d8 should set reaction_count. Usually this would only get set if you set
options: "reactions"
, but this would involve an extra request (to something like https://m.facebook.com/ufi/reaction/profile/browser/?ft_ent_identifier=10229047171274156)I think you’re thinking of the
posts_per_page
parameter