Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • 11
    This is a great answer, it's strangely hard to search for this solution as well.
    – duality
    Commented Jun 3, 2017 at 19:08
  • 1
    Shouldn't be implemented as part of the request module? Commented Dec 20, 2019 at 6:27
  • It does use the requests module. How would you go about implementing it as part of the module? or how do you mean @user1602 ?
    – DomTomCat
    Commented Mar 10, 2020 at 15:41
  • Excellent answer! If I may ask, knowing this way long time ago you posted this. Can you/someone explain the line: res.text.lower().find(self.loginTestString.lower()) < 0 ? Doesnt that mean that it looks for a string and returns 0 if it doesnt find a match?
    – Vichtor
    Commented Sep 17, 2020 at 19:02
  • 1
    the find method of a string returns -1 if the search string was not found in it (i.e. here: looking for self.loginTestString.lower() within res.text.lower())
    – DomTomCat
    Commented Sep 18, 2020 at 8:02