golfscrape | Ruby class to scrape PGA Tour golf data | Scraper library
kandi X-RAY | golfscrape Summary
kandi X-RAY | golfscrape Summary
Ruby class to get data from the PGA Tour.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Calculate event
golfscrape Key Features
golfscrape Examples and Code Snippets
Community Discussions
Trending Discussions on golfscrape
QUESTION
I've been trying to scrape some lists from this website http://www.golf.org.au its an ASP.NET based I did some research and it appears that I must pass some values in a POST request to make the website fetch the data into the tables I did that but still I'm failing any Idea what I'm missing?
Here is my code:
...ANSWER
Answered 2017-May-16 at 20:27Yes, ASP pages are tricky to scrape. Most probably some little parameter is missing.
Solution for this:
instead of creating the request through
scrapy.FormRequest(...)
use the scrapy.FormRequest.from_response() method (see code example below). This will capture most or even all of the hidden form data and use it to prepopulate the FormRequest's data.it seems you forgot to return the request, maybe that's another potential problem too ...
as far as I recall the __VIEWSTATEGENERATOR also will change each time and has to be extracted from the page
If this doesn't work, fire up your Firefox browser with Firebug plugin or Chrome's developer tools, do the request in the browser and then check the full request header and body data against the same data in your request. There will be some difference.
Example code with all my suggestions:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install golfscrape
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page