Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A library to read a YML file with Xpath or CSS Selectors and extract data from HTML pages using them

License

NotificationsYou must be signed in to change notification settings

scrapehero/selectorlib

Repository files navigation

Documentation StatusUpdates

A library to read a YML file with Xpath or CSS Selectors and extract data from HTML pages using them

Example

>>>from selectorlibimport Extractor>>> yaml_string="""    title:        selector: "h1"        type: Text    link:        selector: "h2 a"        type: Link    """>>> extractor= Extractor.from_yaml_string(yaml_string)>>> html="""    <h1>Title</h1>    <h2>Usage        <a href="http://test">¶</a>    </h2>    """>>> selector.extract(html){'title': 'Title', 'link': 'http://test'}

About

A library to read a YML file with Xpath or CSS Selectors and extract data from HTML pages using them

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp