Browse Source

use urlunparse to force to mobile instead

pull/130/head
wes 5 years ago
parent
commit
bd671cd452
  1. 9
      deletefb/tools/common.py

9
deletefb/tools/common.py

@ -73,9 +73,12 @@ def force_mobile(url):
Force a url to use the mobile site. Force a url to use the mobile site.
""" """
parsed = urlparse.urlparse(url) parsed = urlparse.urlparse(url)
if parsed.netloc == "www.facebook.com": return urlparse.urlunparse((parsed.scheme,
return f"https://mobile.facebook.com{parsed.path}" "mobile.facebook.com",
return url parsed.path,
parsed.params,
parsed.query,
parsed.fragment))
NO_CHROME_DRIVER = """ NO_CHROME_DRIVER = """
You need to manually install the chromedriver for Selenium\n You need to manually install the chromedriver for Selenium\n

Loading…
Cancel
Save