Phantom is a PhantomJS-based downloader, complementing Surf. Slower than Surf but better at bypassing anti-scraping due to browser simulation. Supports UserAgent, TryTimes, RetryPause, and custom JS.
| 38 | // Slower than Surf but better at bypassing anti-scraping due to browser simulation. |
| 39 | // Supports UserAgent, TryTimes, RetryPause, and custom JS. |
| 40 | Phantom struct { |
| 41 | PhantomjsFile string // full path to PhantomJS executable |
| 42 | TempJsDir string // directory for temporary JS files |
| 43 | jsFileMap map[string]string // existing JS files |
| 44 | CookieJar *cookiejar.Jar |
| 45 | } |
| 46 | // Response parses PhantomJS response content. |
| 47 | Response struct { |
| 48 | Cookies []string |
nothing calls this directly
no outgoing calls
no test coverage detected