Skip to content

Commit 8202a65

Browse files
committed
a little bit of cleanup
1 parent 1affaef commit 8202a65

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# How To ...
22

33
## Install
4-
clone this repo, change into the directory and run ``pip install .`
4+
clone this repo, change into the directory and run ``pip install .``
55

66
## Use
77

Diff for: exams2anki/main.py

-7
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ def getPage(link):
1111
return soup
1212

1313
def grabQuestionAndAnswer(soup):
14-
"""
15-
Given the url of the question, parses html file and returns the html element with the question and answer
16-
as a list of string.
17-
18-
>>> grabQuestionAndAnswer("https://www.exam4training.com/to-complete-the-sentence-select-the-appropriate-option-in-the-answer-area-107/")
19-
['<p>HOTSPOT<br/> <br/>To complete the sentence, select the appropriate option in the answer area.</p>', '<p><img height="179" src="https://www.exam4training.com/wp-content/uploads/2022/02/image072-1.jpg" width="593"/></p>', '<p><button class="btn btn-common answer_view" data-target="#exam_question_1" data-toggle="collapse" type="button">View Answer</button></p>', '<p class="collapse exam_answer" id="exam_question_1" style="clear: both;"><strong>Answer: </strong><br/><img height="187" src="https://www.exam4training.com/wp-content/uploads/2022/02/image073-1.jpg" width="594"/></p>', '<p>Explanation:<br/> <br/>The Microsoft Privacy Statement explains what personal data Microsoft processes, how Microsoft processes the data, and the purpose of processing the data</p>']
20-
"""
2114
div = soup.find('div', {'class': 'entry-content'})
2215
return [str(tag) for tag in div.findChildren('p', recursive=False)]
2316

0 commit comments

Comments
 (0)