{ "info": { "author": "Erin O'Connell", "author_email": "erinocon5@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython" ], "description": "\nRequests-Html-Macros\n=======================================\n.. image:: https://travis-ci.org/erinxocon/requests-html-macros.svg?branch=master\n :target: https://travis-ci.org/erinxocon/requests-html-macros\n.. image:: https://img.shields.io/pypi/v/requests-html-macros.svg?maxAge=2592000\n :target: https://pypi.python.org/pypi/requests-html-macros/\n.. image:: https://img.shields.io/pypi/l/requests-html-macros.svg?maxAge=2592000\n :target: https://opensource.org/licenses/MIT\n\n**Requests-Html-Macros** is a little sugar on top of an already great html parseing library `Requests-Html `_\n\nThis library aims to help make parsing the web a bit easier than it already is with Requests-Html! Create macros that can be reused over different web sites/sessions!\nCould you do this by hand with requests-html, yes probably pretty simply, but I only realized that liek half way through developing this library and then was just like screw it let's push it out anyways!\n\nExample\n-------\n.. code-block:: python\n\n from time import sleep\n\n from requests_html_macro import Macro\n from requests_html import HTMLSession\n\n # Create a standard requests-html session\n session = HTMLSession()\n response = session.get('http://python.org')\n\n # Create a macro with the response\n macro = Macro(response=response)\n\n # Create a macro that uses the parse library to search through the html\n @macro.search_pattern('Python is a {} language', first=True)\n def foo(data):\n print(data[0])\n\n # Creates a macro that uses a css selector\n @macro.css_selector('#about', first=True)\n def foo1(data):\n print(data.text)\n\n\n @macro.xpath('//a', first=True)\n def foo2(data):\n print(data)\n\n while True:\n macro.parse()\n sleep(30)\n macro.response = session.get('http://python.org')\n\nTo Install\n----------\n\n::\n\n $ pip install requests-html-macro\n\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/erinxocon/requests-html-macros", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "requests-html-macros", "package_url": "https://pypi.org/project/requests-html-macros/", "platform": "", "project_url": "https://pypi.org/project/requests-html-macros/", "project_urls": { "Homepage": "https://github.com/erinxocon/requests-html-macros" }, "release_url": "https://pypi.org/project/requests-html-macros/0.1.1/", "requires_dist": [ "requests-html" ], "requires_python": ">=3.6.0", "summary": "HTML Parsing Macro things for Humans.", "version": "0.1.1" }, "last_serial": 3666973, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f0cc4d5bb7cc705aa380356906e19016", "sha256": "a893a9b4e81d9a348b922c839c0b7384616e4899624d2ecc0d05d94b3a53ea63" }, "downloads": -1, "filename": "requests_html_macros-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f0cc4d5bb7cc705aa380356906e19016", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.0", "size": 3342, "upload_time": "2018-03-13T18:08:52", "url": "https://files.pythonhosted.org/packages/c0/3e/ed44c3c5554bc552e8d8972c719271a97440df0e5192186401348b95adf0/requests_html_macros-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e52f6f29c525e95c221ef5af984f8f65", "sha256": "cc313a87f0e8603c7f22bb9ac108046479247ba504d19ecd2693c65a2aec98db" }, "downloads": -1, "filename": "requests-html-macros-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e52f6f29c525e95c221ef5af984f8f65", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 3206, "upload_time": "2018-03-13T18:08:53", "url": "https://files.pythonhosted.org/packages/0a/3f/2db9a648c4a237ef45c0dab6d73e838b86c7333c5b38f7ac59ca30715925/requests-html-macros-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d52a265c6622cac5101721f775369a38", "sha256": "c9628a7eb18876c9d385616cfd7936cedd99cc46e48aec4861a9ac49a2775578" }, "downloads": -1, "filename": "requests_html_macros-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d52a265c6622cac5101721f775369a38", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.0", "size": 4754, "upload_time": "2018-03-13T22:34:49", "url": "https://files.pythonhosted.org/packages/2c/fa/b71ab1dd9cec15e0db4f68f77372a536ad0a4d1477590cf3b0bd904dbff8/requests_html_macros-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2cb2702f6a235d1fadbbe7e81de88f7c", "sha256": "349a57531fee52d14102ef99f28e62f561f7838da2e9f23342ea9460464f710b" }, "downloads": -1, "filename": "requests-html-macros-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2cb2702f6a235d1fadbbe7e81de88f7c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 3964, "upload_time": "2018-03-13T22:34:50", "url": "https://files.pythonhosted.org/packages/8f/d1/0154f1745506f6c3782ffafbb29825c8b6d7ac1dffc6775a406e86a870c9/requests-html-macros-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d52a265c6622cac5101721f775369a38", "sha256": "c9628a7eb18876c9d385616cfd7936cedd99cc46e48aec4861a9ac49a2775578" }, "downloads": -1, "filename": "requests_html_macros-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d52a265c6622cac5101721f775369a38", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.0", "size": 4754, "upload_time": "2018-03-13T22:34:49", "url": "https://files.pythonhosted.org/packages/2c/fa/b71ab1dd9cec15e0db4f68f77372a536ad0a4d1477590cf3b0bd904dbff8/requests_html_macros-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2cb2702f6a235d1fadbbe7e81de88f7c", "sha256": "349a57531fee52d14102ef99f28e62f561f7838da2e9f23342ea9460464f710b" }, "downloads": -1, "filename": "requests-html-macros-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2cb2702f6a235d1fadbbe7e81de88f7c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 3964, "upload_time": "2018-03-13T22:34:50", "url": "https://files.pythonhosted.org/packages/8f/d1/0154f1745506f6c3782ffafbb29825c8b6d7ac1dffc6775a406e86a870c9/requests-html-macros-0.1.1.tar.gz" } ] }