Merge pull request #301 from orenyomtov/patch-4

Replace lxml with Python's built in html.parser
This commit is contained in:
Mads Marquart
2018-06-20 13:46:56 +02:00
committed by GitHub
3 changed files with 3 additions and 5 deletions

View File

@@ -209,7 +209,7 @@ class Client(object):
self.ttstamp = ''
r = self._get(self.req_url.BASE)
soup = bs(r.text, "lxml")
soup = bs(r.text, "html.parser")
fb_dtsg_element = soup.find("input", {'name': 'fb_dtsg'})
if fb_dtsg_element:
@@ -252,7 +252,7 @@ class Client(object):
if not (self.email and self.password):
raise FBchatUserError("Email and password not found.")
soup = bs(self._get(self.req_url.MOBILE).text, "lxml")
soup = bs(self._get(self.req_url.MOBILE).text, "html.parser")
data = dict((elem['name'], elem['value']) for elem in soup.findAll("input") if elem.has_attr('value') and elem.has_attr('name'))
data['email'] = self.email
data['pass'] = self.password
@@ -277,7 +277,7 @@ class Client(object):
return False, r.url
def _2FA(self, r):
soup = bs(r.text, "lxml")
soup = bs(r.text, "html.parser")
data = dict()
s = self.on2FACode()

View File

@@ -1,4 +1,3 @@
requests
lxml
beautifulsoup4
enum34; python_version < '3.4'

View File

@@ -44,7 +44,6 @@ packages = find:
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4.0
install_requires =
requests
lxml
beautifulsoup4
# May not work in pip with bdist_wheel
# See https://wheel.readthedocs.io/en/latest/#defining-conditional-dependencies