Pagination url from Facebook #721
-
Hi everyone! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Here's how you can retrieve posts quickly, logging timestamps and pagination URLs: def handle_pagination_url(url):
print(url)
for post in get_posts("cnninternational", pages=None, options={'allow_extra_requests': False, 'posts_per_page': 200}, request_url_callback=handle_pagination_url):
print(post["time"]) Sample output: 2022-03-03 10:30:09
https://m.facebook.com/page_content_list_view/more/?page_id=18793419640&start_cursor={"timeline_cursor":"AQHRETPViw_PpYB8dvuQv_nxWo4tDuVr9kDnxwrV6GsELF02wsIOTobJTeozaNOOK1iPD6iEAxbPJRs5sIT9QYh3YPwRpaOnv6oLSBa7u6P4zkX9EQYxXLZwZcLg6B4NuP4Z","timeline_section_cursor":null,"has_next_page":true}&num_to_fetch=200&surface_type=posts_tab
2022-03-03 10:01:09 start_url = 'https://m.facebook.com/page_content_list_view/more/?page_id=18793419640&start_cursor={"timeline_cursor":"AQHRETPViw_PpYB8dvuQv_nxWo4tDuVr9kDnxwrV6GsELF02wsIOTobJTeozaNOOK1iPD6iEAxbPJRs5sIT9QYh3YPwRpaOnv6oLSBa7u6P4zkX9EQYxXLZwZcLg6B4NuP4Z","timeline_section_cursor":null,"has_next_page":true}&num_to_fetch=200&surface_type=posts_tab' should work for you I think |
Beta Was this translation helpful? Give feedback.
Here's how you can retrieve posts quickly, logging timestamps and pagination URLs:
Sample output: