Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any way to avoid/delay the ImmoScout24 plus-only properties? #329

Open
marcodallagatta opened this issue Mar 1, 2023 · 4 comments
Open

Comments

@marcodallagatta
Copy link

As the title says, it would be nice to have an option to filter out IS24 Plus only ads, and maybe delay that notification after 24h, if it's still up? (Unlikely, I know)

@codders
Copy link

codders commented Mar 2, 2023

Hi @marcodallagatta ,

You might need to provide a bit more details about the dynamics of IS24 posts.

  • What makes IS24 Plus only ads different from other listings?
  • Is there a way to programmaticly identify IS24+ listings?
  • What is the advantage of delaying the notification for 24h?

@marcodallagatta
Copy link
Author

marcodallagatta commented Mar 2, 2023

Hi @codders, so:

  • What makes IS24 Plus only ads different from other listings? => you can't send a message to these listings unless you are a paid subscriber to IS24, so filtering them out would reduce "false positives".
  • Is there a way to programmaticly identify IS24+ listings? => on the search page, these listings have this banner, the div containing the banner has a class of plusBooking. On the listing page itself I'm not too sure, but I noticed that these listings have a "von privat" banner at the bottom, with a class of brandLogoPrivate_dnns4.
  • What is the advantage of delaying the notification for 24h? => technically, if these listings aren't deactivated (as I said, unlikely), it should be possible to write a message, even as a free user, after 24 hours. I think this feature isn't going to be very useful, as most listings are still deactivated in a few minutes/hours.

Thank you for considering this.

@codders
Copy link

codders commented Mar 2, 2023

Okay. I had a quick look. For ImmoScout listings, we actually extract the data direct from the Javascript model - we don't scrape the DOM. You can see the loop here that processes the IS24.resultList object (visible from the Javascript Console in your browser):

https://github.com/flathunters/flathunter/blob/main/flathunter/crawl_immobilienscout.py#L102-L107

IS24 Plus adds have the property privateOffer: "true" set. If you do entry.get("privateOffer", "false") == "true" here:

https://github.com/flathunters/flathunter/blob/main/flathunter/crawl_immobilienscout.py#L109-L140

that will allow you to detect those offers. You just need to return None in that case from extract_entry_from_javascript, and filter the Nones out of the comprehension in get_entries_from_json.

Pull requests welcome! :)

@marvinsxtr
Copy link

Hi,

privateOffer actually seems to be the flag indicating whether the offer is from a private person or from an agency.

However, the /expose page of each offer contains very detailed info on the premium content:

restrictedListing: {
  restrictedEndTime: "2 d 10 h",
  paywallBuyPlusListing: {
    enabled: false,
    isPaywallActive: true,
    premiumProfileRequired:false
  },
  exclusivePresaleListing: {
    enabled: false,
  },
  exclusivePresaleBasicListing: {
    enabled: true
  }
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants