HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings.  2.0.0-chaika
Hierarchical Cluster Engine Python language binding
scraper_resource.py
Go to the documentation of this file.
1 """@package docstring
2  @file scraper_resource.py
3  @author Alexey <developers.hce@gmail.com>
4  @link http://hierarchical-cluster-engine.com/
5  @copyright Copyright &copy; 2013 IOIX Ukraine
6  @license http://hierarchical-cluster-engine.com/license/
7  @package HCE project node API
8  @since 0.1
9 """
10 
11 
12 # import json
13 
14 
15 class Resource(object):
16 
17 
18  def __init__(self, resource_set):
19  self.url = resource_set["url"]
20  self.raw_html = resource_set["raw_html"]
21  self.site_id = resource_set["siteId"]
22  self.res_id = resource_set["resId"]
23 
24 
25  def __str__(self):
26  return "%s" % (self.url)
27 
28 
29  def __repr__(self):
30  return repr((self.url, self.raw_html))