Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requesting page doesn't work and return login page instead #199

Open
FoRKsH opened this issue Apr 5, 2021 · 2 comments
Open

requesting page doesn't work and return login page instead #199

FoRKsH opened this issue Apr 5, 2021 · 2 comments

Comments

@FoRKsH
Copy link

FoRKsH commented Apr 5, 2021

some pages doesn't return any posts

this function return warning

`
def get_page(self) -> Page:
raw_page = self.get_raw_page()
raw_posts = raw_page.find(
'article[data-ft],div.async_like[data-ft]'
) # Select only articles that have the data-ft attribute

    if not raw_posts:
        logger.warning("No raw posts (<article> elements) were found in this page.")
        if logger.isEnabledFor(logging.DEBUG):
            content = textwrap.indent(
                raw_page.text,
                prefix='| ',
                predicate=lambda _: True,
            )
            sep = '+' + '-' * 60
            logger.debug("The page url is: %s", self.response.url)
            logger.debug("The page content is:\n%s\n%s%s\n", sep, content, sep)

    return raw_posts

`

after debugging I found that the link returned is login page not the page/posts
any help

@neon-ninja
Copy link
Collaborator

Try pass cookies as per #28 (comment)

@Pelican104
Copy link

Suddenly get_posts is returning no results from my list of sites. It was working fine until 8pm BST on Tue Apr 6th. Since then I get no data back from it at all.

for site in FBsites:
try:
for post in get_posts(site, pages=1):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants