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

How can I scrape answers #2

Open
Tems-py opened this issue Apr 18, 2021 · 1 comment
Open

How can I scrape answers #2

Tems-py opened this issue Apr 18, 2021 · 1 comment

Comments

@Tems-py
Copy link

Tems-py commented Apr 18, 2021

Can I scrape answers using this lib?

from brainly_scraper import brainly
print(brainly("""Uporządkuj chronologicznie wydarzenia.
A. utworzenie PZPR
B. referendum ludowe
C. uchwalenie Konstytucji PRL
D. wybory do sejmu ustawodawczego​""", 1))

I have this code and it only gives me:

[<( QUESTION: 1 ANSWER:2 )>]

and I have no idea how to get something more than this

@krypton-byte
Copy link
Owner

>>> scrap=brainly("""Uporządkuj chronologicznie wydarzenia.
A. utworzenie PZPR
B. referendum ludowe
C. uchwalenie Konstytucji PRL
D. wybory do sejmu ustawodawczego​""", 1)
>>> for i in scrap:
...    print(f"Q: {i.question.content}")
...    for answer in enumerate(i.answers):
...        print(f"A{answer[0]}: {answer[1].content}")

Docs: https://krypton-byte.github.io/brainly-scraper/

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

2 participants