lmmx / bisque Goto Github PK
View Code? Open in Web Editor NEWWeb scraping into structured Pydantic data models :stew:
License: MIT License
Web scraping into structured Pydantic data models :stew:
License: MIT License
Convert object representations of data models to Pydantic data models, using custom classes where necessary (e.g. for str
subclasses representing strings that need to be coercible)
The paradigm shift involved with introducing Pydantic could involve changing the form of element addressing.
find()
method that takes a tag name and other kwargsfind()
call are chained to produce nested find()
Review I think this is actually already implemented with SoupStrainer?
Part of #3 in bisque.element.attributes
To resolve the circular import dependency, put the runtime types in the data model and access them by reference on self
rather than directly from the module namespace (requiring lazy import hacks).
Demo in interface-separation-example
Part of #3 in bisque.element.attributes
The class AttributeValueWithCharsetSubstitution
cannot be used on its own (it has no fields). If it's used on its own in the original code, it would create a str
because it subclassed it. Now it can only do that if it has a known first field with which to create the __str__
representation.
If you do need to introduce fields, this would effectively prepend fields [thru dataclass inheritance] to the ContentMetaAttributeValue
subclass, so that would need to instead inherit a base (i.e. we'd need to duplicate AttributeValueWithCharsetSubstitution_BASE
as a base, and then add the field to the regularly named AttributeValueWithCharsetSubstitution
so as to preserve its behaviour)
Before proceeding with Bisque features, fill the empty package shell with the Campbells package innards, and get the test suite to pass
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.