Offer methods¶
-
olx.offer.
get_additional_rent
(offer_markup)[source]¶ Searches for additional rental costs
Parameters: offer_markup (str) – Returns: Additional rent Return type: int
-
olx.offer.
get_date_added
(offer_markup)[source]¶ Searches of date of adding offer
Parameters: offer_markup (str) – Class “offerbody” from offer page markup Returns: Date of adding offer Return type: str
-
olx.offer.
get_descriptions
(parsed_urls)[source]¶ Parses details of offers in category
Parameters: parsed_urls (list) – List of offers urls Returns: List of details of offers Return type: list Except: If this offer is not available anymore
-
olx.offer.
get_gps
(offer_markup)[source]¶ Searches for gps coordinates (latitude and longitude)
Parameters: offer_markup (str) – Class “offerbody” from offer page markup Returns: Tuple of gps coordinates Return type: tuple
-
olx.offer.
get_img_url
(offer_markup)[source]¶ Searches for images in offer markup
Parameters: offer_markup (str) – Class “offerbody” from offer page markup Returns: Images of offer in list Return type: list
-
olx.offer.
get_poster_name
(offer_markup)[source]¶ Searches for poster name
Parameters: offer_markup (str) – Class “offerbody” from offer page markup Returns: Poster name Return type: str
-
olx.offer.
get_surface
(offer_markup)[source]¶ Searches for surface in offer markup
Parameters: offer_markup (str) – Class “offerbody” from offer page markup Returns: Surface Return type: float Except: When there is no offer surface it will return None
-
olx.offer.
get_title
(offer_markup)[source]¶ Searches for offer title on offer page
Parameters: offer_markup (str) – Class “offerbody” from offer page markup Returns: Title of offer Return type: str
-
olx.offer.
parse_description
(offer_markup)[source]¶ Searches for description if offer markup
Parameters: offer_markup (str) – Body from offer page markup Returns: Description of offer Return type: str
-
olx.offer.
parse_flat_data
(offer_markup)[source]¶ Parses flat data from script of Google Tag Manager
Data includes if offer private or business, number of floor, number of rooms, built type and furniture.
Parameters: offer_markup (str) – Body from offer page markup Returns: Dictionary of flat data Return type: dict
-
olx.offer.
parse_offer
(markup, url)[source]¶ Parses data from offer page markup
Parameters: - markup (str) – Offer page markup
- url (str) – Url of current offer page
Returns: Dictionary with all offer details
Return type: dict