question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

500 Server Error: Internal Server Error for url

See original GitHub issue

v0.2.38

code:

import time

from facebook_scraper import get_posts

COOKIES_PATH = r'...\cookies.json'
PAGE_NAME = 'EnvironmentCentreNT'

start = time.time()
posts = []

try:
    for post in get_posts(PAGE_NAME, cookies=COOKIES_PATH, pages=200, timeout=60,
                          options={"allow_extra_requests": False, "posts_per_page": 4}):
        posts.append(post)

        print(len(posts), post['time'], post['text'][:35].replace('\n', ' '))
except Exception as e:
    print(f'{e}')
    print(f"{len(posts)} posts retrieved in {round(time.time() - start)}s. Oldest post: {posts[-1].get('time')}")

Output:

1 2021-05-28 07:37:10.757897 The Northern Territory’s spectacula
2 2021-05-27 12:23:00 MEDIA RELEASE Conservationists, tou
.
.
.
160 2021-02-16 06:37:00 New species of stygofauna could sin
161 2021-02-16 03:04:00 The Environment Centre is standing 
500 Server Error: Internal Server Error for url: https://m.facebook.com/page_content_list_view/more/?page_id=137377391864&start_cursor=%7B%22timeline_cursor%22%3A%22AQHREcuuhRramTIzIbDKw-OdrKBvvCXrUsH7tUg0gzGFnSEW1WPoCCEzn-VTfW3soVYnK6oGpR-bj4Pwmvfy0Ai7G6TFAquDcSXW_jM8EV_HYbmSgeMKle5EbmmwqfknNOwd%22%2C%22timeline_section_cursor%22%3Anull%2C%22has_next_page%22%3Atrue%7D&num_to_fetch=4&surface_type=posts_tab
161 posts retrieved in 83s. Oldest post: 2021-02-16 03:04:00

Every time same output at exactly same location

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:30

github_iconTop GitHub Comments

1reaction
neon-ninjacommented, Jun 1, 2021

Sure, published as 0.2.40

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP 500 Internal Server Error: What It Means & How to Fix It
A 500 internal server error is, as the name implies, a general problem with the website's server. More than likely, this means there's...
Read more >
500 Internal Server Error - HTTP - MDN Web Docs - Mozilla
The HyperText Transfer Protocol (HTTP) 500 Internal Server Error server error response code indicates that the server encountered an ...
Read more >
How to Fix a 500 Internal Server Error - Lifewire
The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the website's server, but...
Read more >
How to troubleshoot 500 Internal Server Error? - Interserver Tips
Simply, the 500 Internal Server Error is a general http status code that means something has gone wrong on the website's server, but...
Read more >
What is “HTTP 500 Internal Server Error” and How to Fix It?
The HTTP 500 error, in particular, indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. In other...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found