{ "info": { "author": "Scrapinghub", "author_email": "info@scrapinghub.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Internet :: WWW/HTTP" ], "description": "loginform\n=========\n\n.. image:: https://secure.travis-ci.org/scrapy/loginform.png?branch=master\n :target: http://travis-ci.org/scrapy/loginform\n\n.. image:: https://img.shields.io/codecov/c/github/scrapy/loginform/master.svg\n :target: http://codecov.io/github/scrapy/loginform?branch=master\n :alt: Coverage report\n\n\nloginform is a library for filling HTML login forms given the login url,\nusername & password. Which form and fields to fill are inferred automatically.\n\nIt's implemented on top of `lxml form filling`_, and thus depends on lxml.\n\nUsage\n-----\n\nUsage is very simple and best illustrated with an example::\n\n >>> from loginform import fill_login_form\n >>> import requests\n >>> url = \"https://github.com/login\"\n >>> r = requests.get(url)\n >>> fill_login_form(url, r.text, \"john\", \"secret\")\n ([('authenticity_token', 'FQgPiKd1waDL+pycPH8IGutirTnP69SiZgm0zXwn+VQ='),\n ('login', 'john'),\n ('password', 'secret')],\n u'https://github.com/session',\n 'POST')\n\nAnd it is possible to use it as a tool to quickly debug a login form::\n\n $ python -m loginform -u john -p secret https://github.com/login\n url: https://github.com/session\n method: POST\n payload:\n - authenticity_token: FQgPiKd1waDL+pycPH8IGutirTnP69SiZgm0zXwn+VQ=\n - login: john\n - password: secret\n\n\nTesting\n-------\n\nA collection of real-world samples is used to keep this library tested. Those\nsamples are managed as follows:\n\nFirst, you select a site to try, find out its login url, and run the following\ncommand to try loginform on it::\n\n $ python test_samples.py https://github.com/login\n [\n \"https://github.com/login\", \n [\n [\n [\n \"authenticity_token\", \n \"NsdVWGpzxKmn7zSJSOdgnDcLIzIdJlCTO754LiEv2W4=\"\n ], \n [\n \"login\", \n \"USER\"\n ], \n [\n \"password\", \n \"PASS\"\n ]\n ], \n \"https://github.com/session\", \n \"POST\"\n ]\n ]\n\nFrom the output you can judge if it worked or not. If it worked, great. If it\ndidn't, you would hack ``loginform.py`` to make it work and then add the sample\nwith::\n\n $ python test_samples.py https://github.com/login -w github\n\nNote that we gave the sample a name (``github`` in this case).\n\nTo list all available samples use::\n\n $ python test_samples.py -l\n\nTo run all tests, install tox and run::\n\n $ tox\n\n.. _lxml form filling: http://lxml.de/lxmlhtml.html#forms\n.. _tox: https://pypi.python.org/pypi/tox\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/scrapy/loginform", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "loginform", "package_url": "https://pypi.org/project/loginform/", "platform": "Any", "project_url": "https://pypi.org/project/loginform/", "project_urls": { "Homepage": "http://github.com/scrapy/loginform" }, "release_url": "https://pypi.org/project/loginform/1.2.0/", "requires_dist": [ "lxml" ], "requires_python": "", "summary": "Fill HTML login forms automatically", "version": "1.2.0" }, "last_serial": 2284199, "releases": { "0.9": [ { "comment_text": "", "digests": { "md5": "514f486fa2221c273b602767880d43f3", "sha256": "35ce8625cd58b4115a12cb94d7ad7210c3c3a59a6228a67648ee1fb8245bdde0" }, "downloads": -1, "filename": "loginform-0.9.tar.gz", "has_sig": false, "md5_digest": "514f486fa2221c273b602767880d43f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1603, "upload_time": "2012-10-31T19:58:14", "url": "https://files.pythonhosted.org/packages/e9/9a/96cdfff0f340552aa7575c60a641b4c25da93c299368543cfc825bb546ea/loginform-0.9.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "48bcc6773e301fcbf8b6283124eb0ef1", "sha256": "875970fab923feadf6543a090f1088d40a9d612cb3c76d43b993a03422828c15" }, "downloads": -1, "filename": "loginform-1.0.tar.gz", "has_sig": false, "md5_digest": "48bcc6773e301fcbf8b6283124eb0ef1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1972, "upload_time": "2014-04-03T03:18:31", "url": "https://files.pythonhosted.org/packages/19/30/3710534e4348304f20e4611d4504d60a09fbe1d18d1338aaf58932306d9b/loginform-1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "ab4c1520d6e9d7ff28b784d717727676", "sha256": "20315662b524388024e88ef1bfdb56d9f27ee67a3da2e875d466f8022731d193" }, "downloads": -1, "filename": "loginform-1.1.1-py2-none-any.whl", "has_sig": false, "md5_digest": "ab4c1520d6e9d7ff28b784d717727676", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 3292, "upload_time": "2015-08-14T02:26:47", "url": "https://files.pythonhosted.org/packages/14/4b/b0a304273b81c24245cb58a7ffae3883fa96b92ef43602629460d3e6d306/loginform-1.1.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "497ca35e8af1b25d2d39b0dfe7da9f04", "sha256": "0697f277c2e0178349dafbf060d8c8e978b4104538726b7051203f4bb36f1efb" }, "downloads": -1, "filename": "loginform-1.1.1.tar.gz", "has_sig": false, "md5_digest": "497ca35e8af1b25d2d39b0dfe7da9f04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3050, "upload_time": "2015-08-14T02:26:50", "url": "https://files.pythonhosted.org/packages/b0/cc/c34c2edd239c6bdd3d9438b15a43879f19c9d11b29ba03c35a1f3bd439cc/loginform-1.1.1.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "83c1615538e2b459a9b6c223d16ee34e", "sha256": "bc2910c21337130844f0fbea60959dc5664e743eb1f06e1218e7175d72c626af" }, "downloads": -1, "filename": "loginform-1.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "83c1615538e2b459a9b6c223d16ee34e", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 3297, "upload_time": "2016-08-16T12:55:05", "url": "https://files.pythonhosted.org/packages/7a/cb/48ee31f7616eb6711abf102694673b14b68629775ebb4c0e9b86bc1ab634/loginform-1.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da62474e00034b5a07938f92ddd300c5", "sha256": "e852eef73861d526f5904001225557c5a674d3b1eff739fd9f6c1751107c6b15" }, "downloads": -1, "filename": "loginform-1.2.0.tar.gz", "has_sig": false, "md5_digest": "da62474e00034b5a07938f92ddd300c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3051, "upload_time": "2016-08-16T12:55:07", "url": "https://files.pythonhosted.org/packages/1e/d3/267b4304a72b8471250ae550423d5cd2ce9961de76ac3502f5c680da8e6c/loginform-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "83c1615538e2b459a9b6c223d16ee34e", "sha256": "bc2910c21337130844f0fbea60959dc5664e743eb1f06e1218e7175d72c626af" }, "downloads": -1, "filename": "loginform-1.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "83c1615538e2b459a9b6c223d16ee34e", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 3297, "upload_time": "2016-08-16T12:55:05", "url": "https://files.pythonhosted.org/packages/7a/cb/48ee31f7616eb6711abf102694673b14b68629775ebb4c0e9b86bc1ab634/loginform-1.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da62474e00034b5a07938f92ddd300c5", "sha256": "e852eef73861d526f5904001225557c5a674d3b1eff739fd9f6c1751107c6b15" }, "downloads": -1, "filename": "loginform-1.2.0.tar.gz", "has_sig": false, "md5_digest": "da62474e00034b5a07938f92ddd300c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3051, "upload_time": "2016-08-16T12:55:07", "url": "https://files.pythonhosted.org/packages/1e/d3/267b4304a72b8471250ae550423d5cd2ce9961de76ac3502f5c680da8e6c/loginform-1.2.0.tar.gz" } ] }