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

INFO: How to scrape a API using POST method calls #95

Closed
ahsandar opened this issue May 6, 2020 · 6 comments
Closed

INFO: How to scrape a API using POST method calls #95

ahsandar opened this issue May 6, 2020 · 6 comments

Comments

@ahsandar
Copy link

ahsandar commented May 6, 2020

How to scrape a API using POST method calls, are there any examples or docs. Any sample code would be nice. Thanks

@Ziinc
Copy link
Collaborator

Ziinc commented May 6, 2020

You can create a custom fetcher that uses the Poison.post function and then override settings in the spider.

@ahsandar
Copy link
Author

ahsandar commented May 6, 2020

Thanks for the response as I am new to Elixir and never used crawly would you happen to have a sample. I can there are plenty of samples around scrapping website but none covering this use case.

@Ziinc
Copy link
Collaborator

Ziinc commented May 6, 2020

@oltarasenko
Copy link
Collaborator

@Ziinc thanks for helping!

@ahsandar But why do you need to use POST requests? Otherwise, if it's about fetching ajax parts of your page, you could try to use the browser rendering approach!

@ahsandar
Copy link
Author

ahsandar commented May 6, 2020

@oltarasenko i am looking for fetching data from APIs not in websites which could be using POST. As I want to use same tool to consistently use to collect data from websites and APIs and Crawly looks to be a great tool to achieve this

@oltarasenko
Copy link
Collaborator

I would assume this is resolved now. Please re-open if it's not the case!

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

3 participants