File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -61,11 +61,10 @@ def _request_page(self, url):
61
61
raise SigninError (error )
62
62
br .select_form (nr = 0 )
63
63
br .submit ()
64
- return br .response ().read ()
64
+ return BeautifulSoup ( br .response ().read () )
65
65
66
- def _extract_friends_from_html (self , html ):
66
+ def _extract_friends_from_html_soup (self , soup ):
67
67
friends = []
68
- soup = BeautifulSoup (html )
69
68
friendsoup = soup .find_all ("div" , class_ = "main-content-body" )
70
69
assert len (friendsoup ) == 1
71
70
friendsoup = friendsoup [0 ].find_all ("li" )
@@ -77,5 +76,5 @@ def _extract_friends_from_html(self, html):
77
76
78
77
def friends_online (self ):
79
78
html = self ._request_page ("https://secondlife.com/my/account/friends.php?" )
80
- assert self . br . title () == "Friends Online | Second Life"
81
- return self ._extract_friends_from_html (html )
79
+ assert html . title . string == "Friends Online | Second Life"
80
+ return self ._extract_friends_from_html_soup (html )
You can’t perform that action at this time.
0 commit comments