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

http error 405 #2

Open
wangxisea opened this issue Mar 30, 2017 · 19 comments
Open

http error 405 #2

wangxisea opened this issue Mar 30, 2017 · 19 comments

Comments

@wangxisea
Copy link

I got 405 when I ran it. it says: HTTP status code is not handled or not allowed.
Would you mind to take a look? Thanks.

@gijs
Copy link

gijs commented Apr 5, 2017

This is due to Funda blocking crawlers. Configuring a proxy middleware in Scrapy may help but I didn't try that. Good luck

@jobvisser03
Copy link

I tried configuring the settings.py by including:
DOWNLOADER_MIDDLEWARES = { 'funda.middlewares.MyCustomDownloaderMiddleware': 543, 'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware': None, }

This doesn't seem to work unfortunately, is there anything else one needs to take care of? Does anyone have experience with this?

@gijs
Copy link

gijs commented Apr 5, 2017

I think Funda has recently put some sort of rate limiter in place. It detects robots based on several parameters. They suspected me being a robot anyway, as they prompted me with a captcha.

Scrapy can probably solve the captcha but I didn't look into that.. https://github.com/pombredanne/decaptcha

I'm curious if anyone can get it to work again

@aliaamin
Copy link

aliaamin commented Jul 9, 2017

Same problem here, would appreciate if anyone can help wih some tips how to overcome the 405 error.

@gijs
Copy link

gijs commented Jul 9, 2017

I'm building a Funda scraper based on headless Chrome. Whenever a captcha is detected, the scraper takes a screenshot and sends it to me via Telegram. I can reply with the two words which the scraper uses to solve the captcha and continue scraping.

@igorkoehne
Copy link

Is your scraper working properly? I was trying to use selenium, but I am not even sure if this would be the correct way to go, since I am just starting in this world. If you could share your code it would be the best thing that happened to me this year o/

@gijs
Copy link

gijs commented Aug 25, 2017

@igorkoehne (I assume you're talking to me) - unfortunately I cannot share this specific codebase at the moment because it contains a bunch of API keys / needs cleaning up - and I have no time for that now.

In the meantime, Google came up with Puppeteer. Building your own captcha-evading scraper should be even easier using this highlevel API for Headless Chrome. I'm going to rewrite my own scraper to use it, too.

@gijs
Copy link

gijs commented Aug 25, 2017

In other news, detection of unmodified versions of Headless Chrome seems easy... mostly because headless doesnt have WebGL capabilities which can be sniffed.

If Funda is already detecting Headless Chrome, sticking to Selenium's Chrome Webdriver will be a better option.

Good luck scraping them!

@igorkoehne
Copy link

Thanks for the tips, I will give it a try!

@khpeek
Copy link
Owner

khpeek commented Sep 6, 2017

As a quick reply, the 405 error appears to be the result of fingerprinting of headless browsers by Funda. I managed to circumvent it by (1) changing my user agent (using Scrapy Random User Agent), (2) using the Scrapy Splash plugin.

@AntoniosMavropoulos
Copy link

Do both (1) and (2) need to be in place?
If yes, could you please post the code that you used?
Thanks!

@tangvip
Copy link

tangvip commented Oct 1, 2017

@khpeek
do you mean that you need to use both methods OR either one of them can solve the problem?
Thanks!

@arnabsinha4u
Copy link

@tangvip with the usage of just (1) Scrapy Random User Agent, the error persists. Have not tried it with Scrapy Splash plugin

@MarcDuQuesne
Copy link

Hi folks, any update?

@arnabsinha4u
Copy link

I have done away with scrapping the website. Instead, I am using RSS feeds which are parameterized and serves the purpose. RSS feeds have the latest details and not historic but ofcourse, over time you can create your own history, should that be a need.

@Kalli
Copy link

Kalli commented Apr 27, 2018

@arnabsinha4u could you please tell me where you find those RSS feeds you mention?
Do you mean something along the lines of these: http://partnerapi.funda.nl/feeds/Aanbod.svc/rss/?type=koop&zo=/amsterdam/

Is there a feed that has the postal codes as well?

@Suidgeest
Copy link

Hi Kurt, mind posting your latest working code (referring to your comment Sep 6th, 2017) Thank you!

@fab343
Copy link

fab343 commented Jan 28, 2019

Hi all, any updates on the problem?

@fab343
Copy link

fab343 commented Jan 28, 2019

I have done away with scrapping the website. Instead, I am using RSS feeds which are parameterized and serves the purpose. RSS feeds have the latest details and not historic but ofcourse, over time you can create your own history, should that be a need.

are you talking about this rss: http://partnerapi.funda.nl/feeds/Aanbod.svc/rss/?type=koop&zo=/amsterdam/ ?

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

No branches or pull requests