practical-nlp / practical-nlp-code

Official Repository for Code associated with 'Practical Natural Language Processing' book by O'Reilly Media
http://www.practicalnlp.ai/
MIT License
1.3k stars 599 forks source link

Extracting Question and Answers from StackOverflow - Ch2 #22

Open devanshu125 opened 4 years ago

devanshu125 commented 4 years ago

Notebook link - https://github.com/practical-nlp/practical-nlp/blob/master/Ch2/01_WebScraping_using_BeautifulSoup.ipynb

The questiontext and answertext will return None as there is no such class as "post-text". I have tried to correct the code and here is my answer to the issue -

image

suranah commented 4 years ago

Thanks, @devanshu125.

Can you submit a pull request to the repo? This way we can also attribute your contributions.

devanshu125 commented 4 years ago

Thanks, @devanshu125.

Can you submit a pull request to the repo? This way we can also attribute your contributions.

I would love to do that, thank you!

devanshu125 commented 4 years ago

Hey @suranah , I have created a pull request #24 , could you check it out?

varunp2k commented 4 years ago

@devanshu125 We will review it and merge it shortly. Thank you.

nishkalavallabhi commented 4 years ago

If they change their style sheet again, the code may not work again. So, perhaps it is useful to add a comment on top with a timestamp.

varunp2k commented 4 years ago

@nishkalavallabhi Maybe using a demo website such as quotes.toscrape.com instead of stackoverflow would be a better idea.

dkalantzi commented 7 months ago

I'm trying to run the notebook, but I get the following error: HTTPError: HTTP Error 403: Forbidden Can you please have a look? Many thanks!

Practical_NLP-Beautiful_Soup