Skip to content

Commit

Permalink
Fix to BSoup stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
barbarer committed Nov 8, 2024
1 parent 402985f commit 4549a14
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions _sources/bsoup/writecode.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Write Code Questions
------------------------

.. selectquestion:: bsoup_writecode_1_sq_v2
:fromid: bsoup_writecode1q_v2, bsoup_writecode1q_mu
.. selectquestion:: bsoup_writecode_1_sq_v3
:fromid: bsoup_writecode1q_v3, bsoup_writecode1q_mu_v2
:toggle: lock

.. selectquestion:: bsoup_writecode_2_sq_v2
Expand Down
6 changes: 3 additions & 3 deletions _sources/bsoup/writecode_mu.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Write Code Questions
---------------------

.. parsonsprob:: bsoup_writecode1q_mu
.. parsonsprob:: bsoup_writecode1q_mu_v2
:numbered: left
:practice: T
:adaptive:
Expand All @@ -19,9 +19,9 @@ Write Code Questions
=====
soup = BeautifulSoup(r.text, 'html.parser')
=====
text = soup.find('a', text = "Current Students")
text = soup.find('a', string = "Current Students")
=====
text = soup.find_all('a', text = "Current Students") #paired
text = soup.find_all('a', string = "Current Students") #paired
=====
info = text.get('href')
=====
Expand Down
6 changes: 3 additions & 3 deletions _sources/bsoup/writecode_orig.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Write Code Questions
---------------------
#.
.. tabbed:: bsoup_writecode1_v2
.. tabbed:: bsoup_writecode1_v3

.. tab:: Question

.. activecode:: bsoup_writecode1q_v2
.. activecode:: bsoup_writecode1q_v3
:practice: T
:nocodelens:
:language: python3
Expand All @@ -30,7 +30,7 @@ Write Code Questions
soup = BeautifulSoup(r.text, 'html.parser')

# inspect Current Students to get the details
text = soup.find('a', text = "Current Students")
text = soup.find('a', string = "Current Students")
info = text.get('href')
all_info = "https://umich.edu" + info
return all_info
Expand Down

0 comments on commit 4549a14

Please sign in to comment.