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

Fix broken css selectors for issue#43: with NA values in raw_df #50

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hilmi-egemen-ciritoglu
Copy link

No description provided.

@hilmi-egemen-ciritoglu hilmi-egemen-ciritoglu changed the title Fix broken css selectors for issue#43 Fix broken css selectors for issue#43: with NA values in raw_df Aug 4, 2024
@RaymondJ1983
Copy link

Thanks for the fix!

It works for "find_past=False". But not for "find_past=true".
Can you also fix that?

@hilmi-egemen-ciritoglu
Copy link
Author

I could be wrong not sure about what is find_past ? I see two different value self.selectors.date_list
and listed_since. Checked on README it says


# Get the value according to respective CSS selectors
        if self.to_buy:
            if self.find_past:
                list_since_selector = self.selectors.date_list
            else:
                list_since_selector = self.selectors.listed_since
        else:
            if self.find_past:
                list_since_selector = ".fd-align-items-center:nth-child(9) span"
            else:
                list_since_selector = ".fd-align-items-center:nth-child(7) span"
find historical data; the default is `False`.

not sure what is historical data here ? so I set same value as selector ? Not sure if it is good thing ?

@RaymondJ1983
Copy link

Thanks for the try.
It didn't work

What it does, if you select historical data. Then it will scrape all the links that have the status "verkocht", wich means "Sold". It adds &availability=%5B"unavailable in the link. The result is that you will get all the sold properties instad of the available and negotioable ones.

Also in the scrape.py, on lines 302-312 there is something like

Get the value according to respective CSS selectors

    if self.to_buy:
        if self.find_past:
            list_since_selector = self.selectors.date_list
        else:
            list_since_selector = self.selectors.listed_since
    else:
        if self.find_past:
            list_since_selector = ".fd-align-items-center:nth-child(9) span"
        else:
            list_since_selector = ".fd-align-items-center:nth-child(7) span"

Maybe this need to be changed as well. But I have no clue to what.

@robskes
Copy link

robskes commented Aug 16, 2024

no data when "find_past=true". anyone have a solution?

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

Successfully merging this pull request may close these issues.

4 participants