From 9b6407db05cb26f790fd62886aa88d7edfd3d8de Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Thu, 8 Apr 2021 20:08:23 +0200 Subject: [PATCH] WebOOB -> Woob --- .gitignore | 1 - .vscode/settings.json | 2 +- CONTRIBUTING.md | 4 +-- README.md | 6 ++-- doc/0.getting_started.md | 46 +++++++++++++--------------- doc/1.production.md | 7 ++--- doc/3.faq.md | 2 +- docker/Dockerfile | 5 --- docker/entrypoint.sh | 3 -- docker/update_weboob.sh | 6 ---- flatisfy/cmds.py | 2 +- flatisfy/config.py | 13 ++++---- flatisfy/fetch.py | 56 +++++++++++++++++----------------- flatisfy/filters/duplicates.py | 4 +-- flatisfy/filters/metadata.py | 2 +- flatisfy/models/flat.py | 2 +- modules/explorimmo/__init__.py | 8 ++--- modules/explorimmo/browser.py | 14 ++++----- modules/explorimmo/module.py | 12 ++++---- modules/explorimmo/pages.py | 26 ++++++++-------- modules/explorimmo/test.py | 14 ++++----- modules/foncia/__init__.py | 8 ++--- modules/foncia/browser.py | 10 +++--- modules/foncia/constants.py | 2 +- modules/foncia/module.py | 12 ++++---- modules/foncia/pages.py | 22 ++++++------- modules/foncia/test.py | 14 ++++----- modules/leboncoin/__init__.py | 8 ++--- modules/leboncoin/browser.py | 14 ++++----- modules/leboncoin/module.py | 12 ++++---- modules/leboncoin/pages.py | 24 +++++++-------- modules/leboncoin/test.py | 16 +++++----- modules/logicimmo/__init__.py | 8 ++--- modules/logicimmo/browser.py | 14 ++++----- modules/logicimmo/module.py | 14 ++++----- modules/logicimmo/pages.py | 26 ++++++++-------- modules/logicimmo/test.py | 14 ++++----- modules/pap/browser.py | 14 ++++----- modules/pap/constants.py | 2 +- modules/pap/module.py | 14 ++++----- modules/pap/pages.py | 26 ++++++++-------- modules/pap/test.py | 14 ++++----- requirements.txt | 3 +- 43 files changed, 253 insertions(+), 273 deletions(-) delete mode 100644 docker/update_weboob.sh diff --git a/.gitignore b/.gitignore index 6316bc8..c574c6d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,5 +10,4 @@ data/ doc/_build data_rework/ .env -weboob .htpasswd diff --git a/.vscode/settings.json b/.vscode/settings.json index 168cfae..110050c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "cSpell.words": [ - "Weboob", + "woob", "flatisfy" ], "sqltools.useNodeRuntime": true, diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fc8d19a..c1db606 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,9 +53,9 @@ locale. Thanks! -## Adding support for a new Weboob backend +## Adding support for a new Woob backend -To enable a new Weboob `CapHousing` backend in Flatisfy, you should add it to +To enable a new Woob `CapHousing` backend in Flatisfy, you should add it to the list of available backends in [flatisfy/fetch.py#L69-70](https://git.phyks.me/Phyks/flatisfy/blob/master/flatisfy/fetch.py#L69-70) and update the list of `BACKEND_PRECEDENCES` for deduplication in diff --git a/README.md b/README.md index ad0ebfb..9583138 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ and it is working fine :) -It uses [WebOOB](http://weboob.org/) to get all the housing posts on most of +It uses [woob](https://gitlab.com/woob/woob/) to get all the housing posts on most of the websites offering housings posts, and then offers a bunch of pipelines to filter and deduplicate the fetched housings. @@ -116,9 +116,9 @@ Feel free to open issues. An IRC channel is available at [irc://irc.freenode.net ## Thanks -* [WebOOB](http://weboob.org/). Note that this is actually the only and best +* [Woob](https://gitlab.com/woob/woob/). Note that this is actually the only and best software out there to scrape housing posts online. Using it in Flatisfy does - not mean the authors of Flatisfy endorse WebOOB authors' views. + not mean the authors of Flatisfy endorse Woob authors' views. * The OpenData providers listed above! * Navitia for their really cool public transportation API. * A lots of Python modules, required for this script (see `requirements.txt`). diff --git a/doc/0.getting_started.md b/doc/0.getting_started.md index 7bb5412..1e365e8 100644 --- a/doc/0.getting_started.md +++ b/doc/0.getting_started.md @@ -2,36 +2,34 @@ Getting started =============== -## Dependency on WebOOB +## Dependency on Woob -**Important**: Flatisfy relies on [WebOOB](http://weboob.org/) to fetch -housing posts from housing websites. Then, you should install the [`devel` -branch](https://git.weboob.org/weboob/devel/) and update it regularly, -especially if Flatisfy suddenly stops fetching housing posts. +**Important**: Flatisfy relies on [Woob](https://gitlab.com/woob/woob/) to fetch +housing posts from housing websites. If you `pip install -r requirements.txt` it will install the latest -development version of [WebOOB](https://git.weboob.org/weboob/devel/) and the -[WebOOB modules](https://git.weboob.org/weboob/modules/), which should be the +development version of [Woob](https://gitlab.com/woob/woob/) and the +[Woob modules](https://gitlab.com/woob/modules/), which should be the best version available out there. You should update these packages regularly, as they evolve quickly. -WebOOB is made of two parts: a core and modules (which is the actual code +Woob is made of two parts: a core and modules (which is the actual code fetching data from websites). Modules tend to break often and are then updated -often, you should keep them up to date. This can be done by installing the -`weboob-modules` package listed in the `requirements.txt` and using the -default configuration. +often, you should keep them up to date. This can be done by installing and +upgrading the packages listed in the `requirements.txt` and using the default +configuration. This is a safe default configuration. However, a better option is usually to -clone [WebOOB git repo](https://git.weboob.org/weboob/devel/) somewhere, on +clone [Woob git repo](https://gitlab.com/woob/woob/) somewhere, on your disk, to point `modules_path` configuration option to -`path_to_weboob_git/modules` (see the configuration section below) and to run -a `git pull; python setup.py install` in the WebOOB git repo often. +`path_to_woob_git/modules` (see the configuration section below) and to run +a `git pull; python setup.py install` in the Woob git repo often. -A copy of the WebOOB modules is available in the `modules` directory at the +A copy of the Woob modules is available in the `modules` directory at the root of this repository, you can use `"modules_path": "/path/to/flatisfy/modules"` to use them. This copy may or may not be more up to date than the current state of official -WebOOB modules. Some changes are made there, which are not backported -upstream. WebOOB official modules are not synced in the `modules` folder on a +Woob modules. Some changes are made there, which are not backported +upstream. Woob official modules are not synced in the `modules` folder on a regular basis, so try both and see which ones match your needs! :) @@ -81,7 +79,7 @@ The available commands are: _Note:_ Fetching flats can be quite long and take up to a few minutes. This should be better optimized. To get a verbose output and have an hint about the progress, use the `-v` argument. It can remain stuck at "Loading flats for -constraint XXX...", which simply means it is fetching flats (using WebOOB +constraint XXX...", which simply means it is fetching flats (using Woob under the hood) and this step can be super long if there are lots of flats to fetch. If this happens to you, you can set `max_entries` in your config to limit the number of flats to fetch. @@ -123,11 +121,11 @@ List of configuration options: * `mapbox_api_key` is an API token for [Mapbox](http://mapbox.com/) which is required to compute travel times for `WALK`, `BIKE` and `CAR` modes. -* `modules_path` is the path to the WebOOB modules. It can be `null` if you - want WebOOB to use the locally installed [WebOOB - modules](https://git.weboob.org/weboob/modules), which you should install +* `modules_path` is the path to the Woob modules. It can be `null` if you + want Woob to use the locally installed [Woob + modules](https://gitlab.com/woob/modules/), which you should install yourself. This is the default value. If it is a string, it should be an - absolute path to the folder containing WebOOB modules. + absolute path to the folder containing Woob modules. * `port` is the port on which the development webserver should be listening (default to `8080`). * `host` is the host on which the development webserver should be listening @@ -135,8 +133,8 @@ List of configuration options: * `webserver` is a server to use instead of the default Bottle built-in webserver, see [Bottle deployment doc](http://bottlepy.org/docs/dev/deployment.html). -* `backends` is a list of WebOOB backends to enable. It defaults to any - available and supported WebOOB backend. +* `backends` is a list of Woob backends to enable. It defaults to any + available and supported Woob backend. * `store_personal_data` is a boolean indicated whether or not Flatisfy should fetch personal data from housing posts and store them in database. Such personal data include contact phone number for instance. By default, diff --git a/doc/1.production.md b/doc/1.production.md index a4d20d5..98731cf 100644 --- a/doc/1.production.md +++ b/doc/1.production.md @@ -20,9 +20,6 @@ virtualenv .env && source .env/bin/activate # Install required Python modules pip install -r requirements.txt -# Clone and install webOOB -git clone https://git.weboob.org/weboob/devel weboob && cd weboob && python setup.py install && cd .. - # Install required JS libraries and build the webapp npm install && npm run build:prod @@ -45,7 +42,7 @@ python -m flatisfy import --config config/config.json -v _Note 1_: In the config, you should set `data_directory` to the absolute path of the `data` directory created below. This directory should be writable by the user running Flatisfy. You should also set `modules_path` to the absolute path -to the `modules` folder under the previous `weboob` clone. Finally, the last +to the `modules` folder under the previous `woob` clone. Finally, the last `import` command can be `cron`-tasked to automatically fetch available housings posts periodically. @@ -246,4 +243,4 @@ Restart: ```bash systemctl restart uwsgi -``` \ No newline at end of file +``` diff --git a/doc/3.faq.md b/doc/3.faq.md index e239971..5048b16 100644 --- a/doc/3.faq.md +++ b/doc/3.faq.md @@ -27,7 +27,7 @@ set `max_entries` in your config to limit the number of posts fetched. ## Docker image does not start the webserver at first start? -When you launch the Docker image, it first updates WebOOB and fetches the +When you launch the Docker image, it first updates Woob and fetches the housing posts matching your criterias. The webserver is only started once this is done. As fetching housing posts can take a bit of time (up to 10 minutes), the webserver will not be available right away. diff --git a/docker/Dockerfile b/docker/Dockerfile index d51335c..22f2280 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -18,11 +18,6 @@ RUN pip install -U setuptools && \ RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \ && apt-get install -y nodejs -# Install weboob's code itself. -RUN git clone --depth 1 https://git.weboob.org/weboob/weboob /home/user/weboob \ - && cd /home/user/weboob \ - && pip install . - RUN mkdir -p /flatisfy/data VOLUME /flatisfy diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 65a093e..4e1f97e 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -14,7 +14,4 @@ echo "[ENTRYPOINT] Setting fake values for git config..." git config --global user.email flatisfy@example.com git config --global user.name "Flatisfy Root" -echo "Update Weboob..." -/home/user/update_weboob.sh - exec su user -c "$@" diff --git a/docker/update_weboob.sh b/docker/update_weboob.sh deleted file mode 100644 index d23252f..0000000 --- a/docker/update_weboob.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -set -e - -echo "Updating Weboob..." -cd /home/user/weboob -git pull && pip install --upgrade . || echo "Couldn't upgrade Weboob; maybe the server is unreachable?" diff --git a/flatisfy/cmds.py b/flatisfy/cmds.py index 7216d17..8e02229 100644 --- a/flatisfy/cmds.py +++ b/flatisfy/cmds.py @@ -134,7 +134,7 @@ def import_and_filter(config, load_from_db=False, new_only=False): :param config: A config dict. :param load_from_db: Whether to load flats from database or fetch them - using WebOOB. + using Woob. :return: ``None``. """ # Fetch and filter flats list diff --git a/flatisfy/config.py b/flatisfy/config.py index 5a0e31c..4c20e3f 100644 --- a/flatisfy/config.py +++ b/flatisfy/config.py @@ -15,7 +15,7 @@ import sys import traceback import appdirs -from weboob.capabilities.housing import POSTS_TYPES, HOUSE_TYPES +from woob.capabilities.housing import POSTS_TYPES, HOUSE_TYPES from flatisfy import data from flatisfy import tools @@ -23,6 +23,9 @@ from flatisfy.constants import TimeToModes from flatisfy.models.postal_code import PostalCode +DIRPATH = os.path.dirname(os.path.realpath(__file__)) + + # Default configuration DEFAULT_CONFIG = { # Constraints to match @@ -74,10 +77,8 @@ DEFAULT_CONFIG = { "max_entries": None, # Directory in wich data will be put. ``None`` is XDG default location. "data_directory": None, - # Path to the modules directory containing all Weboob modules. ``None`` if - # ``weboob_modules`` package is pip-installed, and you want to use - # ``pkgresource`` to automatically find it. - "modules_path": None, + # Path to the modules directory containing all Woob modules. + "modules_path": os.path.join(DIRPATH, '..', 'modules'), # SQLAlchemy URI to the database to use "database": None, # Path to the Whoosh search index file. Use ``None`` to put it in @@ -89,7 +90,7 @@ DEFAULT_CONFIG = { "host": "127.0.0.1", # Web server to use to serve the webapp (see Bottle deployment doc) "webserver": None, - # List of Weboob backends to use (default to any backend available) + # List of Woob backends to use (default to any backend available) "backends": None, # Should email notifications be sent? "send_email": False, diff --git a/flatisfy/fetch.py b/flatisfy/fetch.py index a6391d2..4e79a83 100644 --- a/flatisfy/fetch.py +++ b/flatisfy/fetch.py @@ -20,27 +20,27 @@ LOGGER = logging.getLogger(__name__) try: - from weboob.capabilities.housing import Query, POSTS_TYPES, HOUSE_TYPES - from weboob.core.bcall import CallErrors - from weboob.core.ouiboube import WebNip - from weboob.tools.json import WeboobEncoder + from woob.capabilities.housing import Query, POSTS_TYPES, HOUSE_TYPES + from woob.core.bcall import CallErrors + from woob.core.ouiboube import WebNip + from woob.tools.json import WoobEncoder except ImportError: - LOGGER.error("Weboob is not available on your system. Make sure you installed it.") + LOGGER.error("Woob is not available on your system. Make sure you installed it.") raise -class WebOOBProxy(object): +class WoobProxy(object): """ - Wrapper around WebOOB ``WebNip`` class, to fetch housing posts without + Wrapper around Woob ``WebNip`` class, to fetch housing posts without having to spawn a subprocess. """ @staticmethod def version(): """ - Get WebOOB version. + Get Woob version. - :return: The installed WebOOB version. + :return: The installed Woob version. """ return WebNip.VERSION @@ -64,7 +64,7 @@ class WebOOBProxy(object): def __init__(self, config): """ - Create a WebOOB handle and try to load the modules. + Create a Woob handle and try to load the modules. :param config: A config dict. """ @@ -95,13 +95,13 @@ class WebOOBProxy(object): def build_queries(self, constraints_dict): """ - Build WebOOB ``weboob.capabilities.housing.Query`` objects from the + Build Woob ``woob.capabilities.housing.Query`` objects from the constraints defined in the configuration. Each query has at most 3 cities, to comply with housing websites limitations. :param constraints_dict: A dictionary of constraints, as defined in the config. - :return: A list of WebOOB ``weboob.capabilities.housing.Query`` + :return: A list of Woob ``woob.capabilities.housing.Query`` objects. Returns ``None`` if an error occurred. """ queries = [] @@ -163,9 +163,9 @@ class WebOOBProxy(object): def query(self, query, max_entries=None, store_personal_data=False): """ - Fetch the housings posts matching a given WebOOB query. + Fetch the housings posts matching a given Woob query. - :param query: A WebOOB `weboob.capabilities.housing.Query`` object. + :param query: A Woob `woob.capabilities.housing.Query`` object. :param max_entries: Maximum number of entries to fetch. :param store_personal_data: Whether personal data should be fetched from housing posts (phone number etc). @@ -181,7 +181,7 @@ class WebOOBProxy(object): "search_housings", query, # Only run the call on the required backends. - # Otherwise, WebOOB is doing weird stuff and returning + # Otherwise, Woob is doing weird stuff and returning # nonsense. backends=[x for x in self.backends if x.name in useful_backends], ), @@ -189,7 +189,7 @@ class WebOOBProxy(object): ): if not store_personal_data: housing.phone = None - housings.append(json.dumps(housing, cls=WeboobEncoder)) + housings.append(json.dumps(housing, cls=WoobEncoder)) except CallErrors as exc: # If an error occured, just log it LOGGER.error("An error occured while fetching the housing posts: %s", str(exc)) @@ -199,7 +199,7 @@ class WebOOBProxy(object): """ Get information (details) about an housing post. - :param full_flat_id: A WebOOB housing post id, in complete form + :param full_flat_id: A Woob housing post id, in complete form (ID@BACKEND) :param store_personal_data: Whether personal data should be fetched from housing posts (phone number etc). @@ -223,7 +223,7 @@ class WebOOBProxy(object): # Otherwise, we miss the @backend afterwards housing.id = full_flat_id - return json.dumps(housing, cls=WeboobEncoder) + return json.dumps(housing, cls=WoobEncoder) except Exception as exc: # pylint: disable=broad-except # If an error occured, just log it LOGGER.error("An error occured while fetching housing %s: %s", full_flat_id, str(exc)) @@ -232,7 +232,7 @@ class WebOOBProxy(object): def fetch_flats(config): """ - Fetch the available flats using the Flatboob / WebOOB config. + Fetch the available flats using the Woob config. :param config: A config dict. :return: A dict mapping constraint in config to all available matching @@ -242,16 +242,16 @@ def fetch_flats(config): for constraint_name, constraint in config["constraints"].items(): LOGGER.info("Loading flats for constraint %s...", constraint_name) - with WebOOBProxy(config) as webOOB_proxy: - queries = webOOB_proxy.build_queries(constraint) + with WoobProxy(config) as woob_proxy: + queries = woob_proxy.build_queries(constraint) housing_posts = [] for query in queries: - housing_posts.extend(webOOB_proxy.query(query, config["max_entries"], config["store_personal_data"])) + housing_posts.extend(woob_proxy.query(query, config["max_entries"], config["store_personal_data"])) housing_posts = housing_posts[: config["max_entries"]] LOGGER.info("Fetched %d flats.", len(housing_posts)) constraint_flats_list = [json.loads(flat) for flat in housing_posts] - constraint_flats_list = [WebOOBProxy.restore_decimal_fields(flat) for flat in constraint_flats_list] + constraint_flats_list = [WoobProxy.restore_decimal_fields(flat) for flat in constraint_flats_list] fetched_flats[constraint_name] = constraint_flats_list return fetched_flats @@ -266,18 +266,18 @@ def fetch_details_rate_limited(config, flat_id): def fetch_details(config, flat_id): """ - Fetch the additional details for a flat using Flatboob / WebOOB. + Fetch the additional details for a flat using Woob. :param config: A config dict. :param flat_id: ID of the flat to fetch details for. :return: A flat dict with all the available data. """ - with WebOOBProxy(config) as webOOB_proxy: + with WoobProxy(config) as woob_proxy: LOGGER.info("Loading additional details for flat %s.", flat_id) - webOOB_output = webOOB_proxy.info(flat_id, config["store_personal_data"]) + woob_output = woob_proxy.info(flat_id, config["store_personal_data"]) - flat_details = json.loads(webOOB_output) - flat_details = WebOOBProxy.restore_decimal_fields(flat_details) + flat_details = json.loads(woob_output) + flat_details = WoobProxy.restore_decimal_fields(flat_details) LOGGER.info("Fetched details for flat %s.", flat_id) return flat_details diff --git a/flatisfy/filters/duplicates.py b/flatisfy/filters/duplicates.py index 6fba5aa..e4e18ec 100644 --- a/flatisfy/filters/duplicates.py +++ b/flatisfy/filters/duplicates.py @@ -161,7 +161,7 @@ def detect(flats_list, key="id", merge=True, should_intersect=False): for flat_key, matching_flats in seen.items(): if flat_key is None: - # If the key is None, it means Weboob could not load the data. In + # If the key is None, it means Woob could not load the data. In # this case, we consider every matching item as being independant # of the others, to avoid over-deduplication. unique_flats_list.extend(matching_flats) @@ -263,7 +263,7 @@ def get_duplicate_score(flat1, flat2, photo_cache, hash_threshold): flat2_phone = homogeneize_phone_number(flat2["phone"]) if flat1_phone and flat2_phone: # Use an "in" test as there could be multiple phone numbers - # returned by a weboob module + # returned by a Woob module if flat1_phone in flat2_phone or flat2_phone in flat1_phone: n_common_items += 4 # Counts much more than the rest diff --git a/flatisfy/filters/metadata.py b/flatisfy/filters/metadata.py index d7887db..48cdd2e 100644 --- a/flatisfy/filters/metadata.py +++ b/flatisfy/filters/metadata.py @@ -310,7 +310,7 @@ def guess_stations(flats_list, constraint, config): LOGGER.info("No stations field for flat %s, skipping stations lookup.", flat["id"]) continue - # Weboob modules can return several stations in a comma-separated list. + # Woob modules can return several stations in a comma-separated list. flat_stations = flat_station.split(",") # But some stations containing a comma exist, so let's add the initial # value to the list of stations to check if there was one. diff --git a/flatisfy/models/flat.py b/flatisfy/models/flat.py index dbfb89c..1ae030f 100644 --- a/flatisfy/models/flat.py +++ b/flatisfy/models/flat.py @@ -68,7 +68,7 @@ class Flat(BASE): __tablename__ = "flats" __searchable__ = ["title", "text", "station", "location", "details", "notes"] - # Weboob data + # Woob data id = Column(String, primary_key=True) area = Column(Float) bedrooms = Column(Float) diff --git a/modules/explorimmo/__init__.py b/modules/explorimmo/__init__.py index e38012f..46d87ce 100644 --- a/modules/explorimmo/__init__.py +++ b/modules/explorimmo/__init__.py @@ -2,20 +2,20 @@ # Copyright(C) 2014 Bezleputh # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . from .module import ExplorimmoModule diff --git a/modules/explorimmo/browser.py b/modules/explorimmo/browser.py index d308aee..1cc58e2 100644 --- a/modules/explorimmo/browser.py +++ b/modules/explorimmo/browser.py @@ -2,25 +2,25 @@ # Copyright(C) 2014 Bezleputh # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . -from weboob.browser import PagesBrowser, URL -from weboob.capabilities.housing import (TypeNotSupported, POSTS_TYPES, +from woob.browser import PagesBrowser, URL +from woob.capabilities.housing import (TypeNotSupported, POSTS_TYPES, HOUSE_TYPES) -from weboob.tools.compat import urlencode +from woob.tools.compat import urlencode from .pages import CitiesPage, SearchPage, HousingPage, HousingPage2, PhonePage diff --git a/modules/explorimmo/module.py b/modules/explorimmo/module.py index 856d38f..fec90bd 100644 --- a/modules/explorimmo/module.py +++ b/modules/explorimmo/module.py @@ -2,24 +2,24 @@ # Copyright(C) 2014 Bezleputh # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . -from weboob.tools.backend import Module -from weboob.capabilities.housing import CapHousing, Housing, HousingPhoto +from woob.tools.backend import Module +from woob.capabilities.housing import CapHousing, Housing, HousingPhoto from .browser import ExplorimmoBrowser diff --git a/modules/explorimmo/pages.py b/modules/explorimmo/pages.py index 35631b8..a12fb2f 100644 --- a/modules/explorimmo/pages.py +++ b/modules/explorimmo/pages.py @@ -2,20 +2,20 @@ # Copyright(C) 2014 Bezleputh # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . from __future__ import unicode_literals import json @@ -23,19 +23,19 @@ import math import re from decimal import Decimal from datetime import datetime -from weboob.browser.filters.json import Dict -from weboob.browser.elements import ItemElement, ListElement, DictElement, method -from weboob.browser.pages import JsonPage, HTMLPage, pagination -from weboob.browser.filters.standard import (CleanText, CleanDecimal, Currency, +from woob.browser.filters.json import Dict +from woob.browser.elements import ItemElement, ListElement, DictElement, method +from woob.browser.pages import JsonPage, HTMLPage, pagination +from woob.browser.filters.standard import (CleanText, CleanDecimal, Currency, Regexp, Env, BrowserURL, Filter, Format) -from weboob.browser.filters.html import Attr, CleanHTML, XPath -from weboob.capabilities.base import NotAvailable, NotLoaded, Currency as BaseCurrency -from weboob.capabilities.housing import (Housing, HousingPhoto, City, +from woob.browser.filters.html import Attr, CleanHTML, XPath +from woob.capabilities.base import NotAvailable, NotLoaded, Currency as BaseCurrency +from woob.capabilities.housing import (Housing, HousingPhoto, City, UTILITIES, ENERGY_CLASS, POSTS_TYPES, ADVERT_TYPES, HOUSE_TYPES) -from weboob.tools.capabilities.housing.housing import PricePerMeterFilter -from weboob.tools.compat import unquote +from woob.tools.capabilities.housing.housing import PricePerMeterFilter +from woob.tools.compat import unquote class CitiesPage(JsonPage): diff --git a/modules/explorimmo/test.py b/modules/explorimmo/test.py index dfa8cdf..07a0906 100644 --- a/modules/explorimmo/test.py +++ b/modules/explorimmo/test.py @@ -2,24 +2,24 @@ # Copyright(C) 2014 Bezleputh # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . -from weboob.capabilities.housing import Query, ADVERT_TYPES, POSTS_TYPES -from weboob.tools.capabilities.housing.housing_test import HousingTest -from weboob.tools.test import BackendTest +from woob.capabilities.housing import Query, ADVERT_TYPES, POSTS_TYPES +from woob.tools.capabilities.housing.housing_test import HousingTest +from woob.tools.test import BackendTest class ExplorimmoTest(BackendTest, HousingTest): diff --git a/modules/foncia/__init__.py b/modules/foncia/__init__.py index 4b71602..71892c9 100644 --- a/modules/foncia/__init__.py +++ b/modules/foncia/__init__.py @@ -2,20 +2,20 @@ # Copyright(C) 2017 Phyks (Lucas Verney) # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . from __future__ import unicode_literals diff --git a/modules/foncia/browser.py b/modules/foncia/browser.py index ce12558..54df02f 100644 --- a/modules/foncia/browser.py +++ b/modules/foncia/browser.py @@ -2,25 +2,25 @@ # Copyright(C) 2017 Phyks (Lucas Verney) # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . from __future__ import unicode_literals -from weboob.browser import PagesBrowser, URL +from woob.browser import PagesBrowser, URL from .constants import QUERY_TYPES from .pages import CitiesPage, HousingPage, SearchPage, SearchResultsPage diff --git a/modules/foncia/constants.py b/modules/foncia/constants.py index 404f2af..50e3bef 100644 --- a/modules/foncia/constants.py +++ b/modules/foncia/constants.py @@ -1,4 +1,4 @@ -from weboob.capabilities.housing import POSTS_TYPES, HOUSE_TYPES +from woob.capabilities.housing import POSTS_TYPES, HOUSE_TYPES QUERY_TYPES = { POSTS_TYPES.RENT: 'location', diff --git a/modules/foncia/module.py b/modules/foncia/module.py index 7364ab3..86f2402 100644 --- a/modules/foncia/module.py +++ b/modules/foncia/module.py @@ -2,26 +2,26 @@ # Copyright(C) 2017 Phyks (Lucas Verney) # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . from __future__ import unicode_literals -from weboob.tools.backend import Module -from weboob.capabilities.housing import CapHousing, Housing, ADVERT_TYPES, HousingPhoto +from woob.tools.backend import Module +from woob.capabilities.housing import CapHousing, Housing, ADVERT_TYPES, HousingPhoto from .browser import FonciaBrowser diff --git a/modules/foncia/pages.py b/modules/foncia/pages.py index 9c881e8..1a36aca 100644 --- a/modules/foncia/pages.py +++ b/modules/foncia/pages.py @@ -2,37 +2,37 @@ # Copyright(C) 2017 Phyks (Lucas Verney) # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . from __future__ import unicode_literals import datetime -from weboob.browser.pages import JsonPage, HTMLPage, pagination -from weboob.browser.filters.standard import ( +from woob.browser.pages import JsonPage, HTMLPage, pagination +from woob.browser.filters.standard import ( CleanDecimal, CleanText, Currency, Date, Env, Format, Regexp, RegexpError ) -from weboob.browser.filters.html import AbsoluteLink, Attr, Link, XPathNotFound -from weboob.browser.elements import ItemElement, ListElement, method -from weboob.capabilities.base import NotAvailable, NotLoaded -from weboob.capabilities.housing import ( +from woob.browser.filters.html import AbsoluteLink, Attr, Link, XPathNotFound +from woob.browser.elements import ItemElement, ListElement, method +from woob.capabilities.base import NotAvailable, NotLoaded +from woob.capabilities.housing import ( City, Housing, HousingPhoto, UTILITIES, ENERGY_CLASS, POSTS_TYPES, ADVERT_TYPES ) -from weboob.tools.capabilities.housing.housing import PricePerMeterFilter +from woob.tools.capabilities.housing.housing import PricePerMeterFilter from .constants import AVAILABLE_TYPES, QUERY_TYPES, QUERY_HOUSE_TYPES diff --git a/modules/foncia/test.py b/modules/foncia/test.py index 1206523..c110235 100644 --- a/modules/foncia/test.py +++ b/modules/foncia/test.py @@ -2,28 +2,28 @@ # Copyright(C) 2017 Phyks (Lucas Verney) # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . from __future__ import unicode_literals -from weboob.capabilities.housing import ( +from woob.capabilities.housing import ( Query, POSTS_TYPES, ADVERT_TYPES ) -from weboob.tools.capabilities.housing.housing_test import HousingTest -from weboob.tools.test import BackendTest +from woob.tools.capabilities.housing.housing_test import HousingTest +from woob.tools.test import BackendTest class FonciaTest(BackendTest, HousingTest): diff --git a/modules/leboncoin/__init__.py b/modules/leboncoin/__init__.py index 2206442..b2f7d19 100644 --- a/modules/leboncoin/__init__.py +++ b/modules/leboncoin/__init__.py @@ -2,20 +2,20 @@ # Copyright(C) 2014 Bezleputh # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . from .module import LeboncoinModule diff --git a/modules/leboncoin/browser.py b/modules/leboncoin/browser.py index fcfe6cb..d6846fd 100644 --- a/modules/leboncoin/browser.py +++ b/modules/leboncoin/browser.py @@ -2,25 +2,25 @@ # Copyright(C) 2014 Bezleputh # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . -from weboob.tools.json import json +from woob.tools.json import json -from weboob.browser import PagesBrowser, URL -from weboob.capabilities.housing import (TypeNotSupported, POSTS_TYPES, +from woob.browser import PagesBrowser, URL +from woob.capabilities.housing import (TypeNotSupported, POSTS_TYPES, HOUSE_TYPES, ADVERT_TYPES) from .pages import CityListPage, HousingListPage, HousingPage, PhonePage, HomePage diff --git a/modules/leboncoin/module.py b/modules/leboncoin/module.py index 6a9a311..8919f3b 100644 --- a/modules/leboncoin/module.py +++ b/modules/leboncoin/module.py @@ -2,24 +2,24 @@ # Copyright(C) 2014 Bezleputh # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . -from weboob.tools.backend import Module -from weboob.capabilities.housing import (CapHousing, Housing, HousingPhoto) +from woob.tools.backend import Module +from woob.capabilities.housing import (CapHousing, Housing, HousingPhoto) from .browser import LeboncoinBrowser diff --git a/modules/leboncoin/pages.py b/modules/leboncoin/pages.py index 6079d23..8d1f32c 100644 --- a/modules/leboncoin/pages.py +++ b/modules/leboncoin/pages.py @@ -2,35 +2,35 @@ # Copyright(C) 2014 Bezleputh # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . from __future__ import unicode_literals import requests -from weboob.browser.pages import HTMLPage, JsonPage, pagination -from weboob.browser.elements import ItemElement, ListElement, method, DictElement -from weboob.capabilities.base import Currency as BaseCurrency -from weboob.browser.filters.standard import (CleanText, CleanDecimal, _Filter, +from woob.browser.pages import HTMLPage, JsonPage, pagination +from woob.browser.elements import ItemElement, ListElement, method, DictElement +from woob.capabilities.base import Currency as BaseCurrency +from woob.browser.filters.standard import (CleanText, CleanDecimal, _Filter, Env, DateTime, Format) -from weboob.browser.filters.json import Dict -from weboob.capabilities.housing import (City, Housing, HousingPhoto, +from woob.browser.filters.json import Dict +from woob.capabilities.housing import (City, Housing, HousingPhoto, UTILITIES, ENERGY_CLASS, POSTS_TYPES, ADVERT_TYPES, HOUSE_TYPES) -from weboob.capabilities.base import NotAvailable -from weboob.tools.capabilities.housing.housing import PricePerMeterFilter +from woob.capabilities.base import NotAvailable +from woob.tools.capabilities.housing.housing import PricePerMeterFilter from decimal import Decimal from lxml import etree diff --git a/modules/leboncoin/test.py b/modules/leboncoin/test.py index 6367705..d7fd93f 100644 --- a/modules/leboncoin/test.py +++ b/modules/leboncoin/test.py @@ -2,25 +2,25 @@ # Copyright(C) 2014 Bezleputh # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . -from weboob.tools.test import BackendTest -from weboob.tools.value import Value -from weboob.capabilities.housing import Query, POSTS_TYPES, ADVERT_TYPES -from weboob.tools.capabilities.housing.housing_test import HousingTest +from woob.tools.test import BackendTest +from woob.tools.value import Value +from woob.capabilities.housing import Query, POSTS_TYPES, ADVERT_TYPES +from woob.tools.capabilities.housing.housing_test import HousingTest class LeboncoinTest(BackendTest, HousingTest): diff --git a/modules/logicimmo/__init__.py b/modules/logicimmo/__init__.py index b052736..eca8af9 100644 --- a/modules/logicimmo/__init__.py +++ b/modules/logicimmo/__init__.py @@ -2,20 +2,20 @@ # Copyright(C) 2014 Bezleputh # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . from .module import LogicimmoModule diff --git a/modules/logicimmo/browser.py b/modules/logicimmo/browser.py index ab8d2fb..57d58cc 100644 --- a/modules/logicimmo/browser.py +++ b/modules/logicimmo/browser.py @@ -2,25 +2,25 @@ # Copyright(C) 2014 Bezleputh # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . -from weboob.browser import PagesBrowser, URL -from weboob.browser.profiles import Firefox -from weboob.capabilities.housing import (TypeNotSupported, POSTS_TYPES, +from woob.browser import PagesBrowser, URL +from woob.browser.profiles import Firefox +from woob.capabilities.housing import (TypeNotSupported, POSTS_TYPES, HOUSE_TYPES) from .pages import CitiesPage, SearchPage, HousingPage, PhonePage diff --git a/modules/logicimmo/module.py b/modules/logicimmo/module.py index c714ed3..f3cdfa9 100644 --- a/modules/logicimmo/module.py +++ b/modules/logicimmo/module.py @@ -2,26 +2,26 @@ # Copyright(C) 2014 Bezleputh # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . -from weboob.tools.backend import Module -from weboob.capabilities.housing import (CapHousing, Housing, HousingPhoto, +from woob.tools.backend import Module +from woob.capabilities.housing import (CapHousing, Housing, HousingPhoto, ADVERT_TYPES) -from weboob.capabilities.base import UserError +from woob.capabilities.base import UserError from .browser import LogicimmoBrowser diff --git a/modules/logicimmo/pages.py b/modules/logicimmo/pages.py index 403ccde..56f9be1 100644 --- a/modules/logicimmo/pages.py +++ b/modules/logicimmo/pages.py @@ -2,36 +2,36 @@ # Copyright(C) 2014 Bezleputh # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . from __future__ import unicode_literals -from weboob.browser.pages import HTMLPage, JsonPage -from weboob.browser.elements import ItemElement, ListElement, DictElement, method -from weboob.browser.filters.json import Dict -from weboob.browser.filters.standard import (Currency, Format, CleanText, +from woob.browser.pages import HTMLPage, JsonPage +from woob.browser.elements import ItemElement, ListElement, DictElement, method +from woob.browser.filters.json import Dict +from woob.browser.filters.standard import (Currency, Format, CleanText, Regexp, CleanDecimal, Date, Env, BrowserURL) -from weboob.browser.filters.html import Attr, XPath, CleanHTML -from weboob.capabilities.housing import (Housing, HousingPhoto, City, +from woob.browser.filters.html import Attr, XPath, CleanHTML +from woob.capabilities.housing import (Housing, HousingPhoto, City, UTILITIES, ENERGY_CLASS, POSTS_TYPES, ADVERT_TYPES, HOUSE_TYPES) -from weboob.capabilities.base import NotAvailable, NotLoaded -from weboob.tools.capabilities.housing.housing import PricePerMeterFilter -from weboob.tools.compat import urljoin +from woob.capabilities.base import NotAvailable, NotLoaded +from woob.tools.capabilities.housing.housing import PricePerMeterFilter +from woob.tools.compat import urljoin class CitiesPage(JsonPage): diff --git a/modules/logicimmo/test.py b/modules/logicimmo/test.py index 46f9ef3..b9e68e2 100644 --- a/modules/logicimmo/test.py +++ b/modules/logicimmo/test.py @@ -2,24 +2,24 @@ # Copyright(C) 2014 Bezleputh # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . -from weboob.capabilities.housing import Query, POSTS_TYPES, ADVERT_TYPES -from weboob.tools.test import BackendTest -from weboob.tools.capabilities.housing.housing_test import HousingTest +from woob.capabilities.housing import Query, POSTS_TYPES, ADVERT_TYPES +from woob.tools.test import BackendTest +from woob.tools.capabilities.housing.housing_test import HousingTest class LogicimmoTest(BackendTest, HousingTest): diff --git a/modules/pap/browser.py b/modules/pap/browser.py index 9d23f95..d9f8194 100644 --- a/modules/pap/browser.py +++ b/modules/pap/browser.py @@ -2,25 +2,25 @@ # Copyright(C) 2012 Romain Bignon # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . -from weboob.browser import PagesBrowser, URL -from weboob.capabilities.housing import TypeNotSupported, POSTS_TYPES -from weboob.tools.compat import urlencode +from woob.browser import PagesBrowser, URL +from woob.capabilities.housing import TypeNotSupported, POSTS_TYPES +from woob.tools.compat import urlencode from .pages import HousingPage, CitiesPage from .constants import TYPES, RET diff --git a/modules/pap/constants.py b/modules/pap/constants.py index 83795f7..2038fa5 100644 --- a/modules/pap/constants.py +++ b/modules/pap/constants.py @@ -1,4 +1,4 @@ -from weboob.capabilities.housing import POSTS_TYPES, HOUSE_TYPES +from woob.capabilities.housing import POSTS_TYPES, HOUSE_TYPES TYPES = {POSTS_TYPES.RENT: 'location', POSTS_TYPES.FURNISHED_RENT: 'location', diff --git a/modules/pap/module.py b/modules/pap/module.py index 89f0887..3837b53 100644 --- a/modules/pap/module.py +++ b/modules/pap/module.py @@ -2,25 +2,25 @@ # Copyright(C) 2012 Romain Bignon # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . -from weboob.capabilities.housing import (CapHousing, Housing, HousingPhoto, +from woob.capabilities.housing import (CapHousing, Housing, HousingPhoto, ADVERT_TYPES) -from weboob.tools.backend import Module +from woob.tools.backend import Module from .browser import PapBrowser @@ -31,7 +31,7 @@ __all__ = ['PapModule'] class PapModule(Module, CapHousing): NAME = 'pap' MAINTAINER = u'Romain Bignon' - EMAIL = 'romain@weboob.org' + EMAIL = 'romain@woob.org' VERSION = '2.1' DESCRIPTION = 'French housing website' LICENSE = 'AGPLv3+' diff --git a/modules/pap/pages.py b/modules/pap/pages.py index 1a137fe..ecc1ac0 100644 --- a/modules/pap/pages.py +++ b/modules/pap/pages.py @@ -2,35 +2,35 @@ # Copyright(C) 2012 Romain Bignon # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . from __future__ import unicode_literals from decimal import Decimal -from weboob.tools.date import parse_french_date -from weboob.browser.pages import HTMLPage, JsonPage, pagination -from weboob.browser.elements import ItemElement, ListElement, DictElement, method -from weboob.browser.filters.standard import (CleanText, CleanDecimal, Regexp, +from woob.tools.date import parse_french_date +from woob.browser.pages import HTMLPage, JsonPage, pagination +from woob.browser.elements import ItemElement, ListElement, DictElement, method +from woob.browser.filters.standard import (CleanText, CleanDecimal, Regexp, Env, BrowserURL, Format, Currency) -from weboob.browser.filters.html import Attr, Link, XPath, CleanHTML -from weboob.browser.filters.json import Dict -from weboob.capabilities.base import NotAvailable, NotLoaded -from weboob.capabilities.housing import (Housing, City, HousingPhoto, +from woob.browser.filters.html import Attr, Link, XPath, CleanHTML +from woob.browser.filters.json import Dict +from woob.capabilities.base import NotAvailable, NotLoaded +from woob.capabilities.housing import (Housing, City, HousingPhoto, UTILITIES, ENERGY_CLASS, POSTS_TYPES, ADVERT_TYPES, HOUSE_TYPES) -from weboob.tools.capabilities.housing.housing import PricePerMeterFilter +from woob.tools.capabilities.housing.housing import PricePerMeterFilter class CitiesPage(JsonPage): diff --git a/modules/pap/test.py b/modules/pap/test.py index 3785666..e56c0a5 100644 --- a/modules/pap/test.py +++ b/modules/pap/test.py @@ -2,24 +2,24 @@ # Copyright(C) 2012 Romain Bignon # -# This file is part of a weboob module. +# This file is part of a woob module. # -# This weboob module is free software: you can redistribute it and/or modify +# This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This weboob module is distributed in the hope that it will be useful, +# This woob module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this weboob module. If not, see . +# along with this woob module. If not, see . -from weboob.capabilities.housing import Query, POSTS_TYPES, ADVERT_TYPES -from weboob.tools.test import BackendTest -from weboob.tools.capabilities.housing.housing_test import HousingTest +from woob.capabilities.housing import Query, POSTS_TYPES, ADVERT_TYPES +from woob.tools.test import BackendTest +from woob.tools.capabilities.housing.housing_test import HousingTest class PapTest(BackendTest, HousingTest): diff --git a/requirements.txt b/requirements.txt index e35184b..bd2a15e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,6 +16,5 @@ titlecase unidecode vobject whoosh -git+https://git.weboob.org/weboob/weboob/ -git+https://git.weboob.org/weboob/modules/ +git+https://gitlab.com/woob/modules/ money