Metadata-Version: 2.1
Name: parse-utils
Version: 1.2
Summary: Page Parser Utils For scraping, List index update
Home-page: https://github.com/yogendratamang48/parse_utils.git
Author: Yogendra Tamang
Author-email: 48yogen@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.5
Description-Content-Type: text/markdown
Requires-Dist: lxml

### Parse Utilities (ParseUtils)
This is a package helps you extracting python dict from html/xml contents
### Installation
>`pip install parse-utils` 

### Usage
```python
from parse_utils.page_parser import PageParser
html_data = '''
<html>
    <head><title>This is title</title></head>
    <body>
        <p id="header">This is header id</p>
        <p class="content">This is content</p>
    </body>
</html>
'''
config = {
    'header': ['//p[@id="header"]/text()'],
    'content': ['//p[@class="content"]'],
}
pparser = PageParser(html_data)
item = pparser.extract_dict(config)
print(item)
```
Output will be:
```bash
{'header': 'This is header id', 'content': 'This is content'}
```


