Comments (4)
For now, I'd like a PR that just fixes the problems with the config options.
from crawler.
You're right that the passing of options seems to been have coded up a bit sloppy. Sorry for that.
Both issues should be addressed. I welcome a PR that fixes this.
from crawler.
Awesome, just wanted to make sure I was on the right track with my assumptions!
I can definitely submit a PR to address all that.
To be honest, I've kinda ended up chopping this up for my own needs. In my use case I'd like to track the actual DOM element the links come from, then when results are presented I can present both the link that redirected, the HTML/DOM element that caused it, and an updated element to prevent redirects.
It's still pretty rough, but the current results look something like:
SEO Warning: Redirect found
This HTML link: <a href="/cloud.php">test</a> redirects to: https://www.liquidweb.com/cloudsites/
The final page/URL is: https://www.liquidweb.com/cloudsites/. The corrected link is:<a href="https://www.liquidweb.com/cloudsites/">test</a>
In order to accomplish that I had to diverge quite a bit from how things are currently done. Keeping track of links/URLs based on a new class called HtmlLink that tracks the URL and the HtmlNode.
Would that be something you'd be interested in merging as I polish it up and refactor a bit? I know this may only seem like a benefit in specific cases; with an seo-tool in mind though I think this could be really helpful! Let me know your thoughts on that?
I'm really excited and curious to see where we can go with these tools!
from crawler.
Your fix is included in the newly tagged version 2.0.7
. Thanks again for your work on this.
from crawler.
Related Issues (20)
- Honeypot HOT 4
- ConnectException's message is not transfered to crawlFailed
- Very poor documentation.
- Browsershot timeout unhandled HOT 1
- Deprecations of implemented interfaces since PHP 8.1 for `CrawlObserverCollection` class
- Maximum depth not working in subsequent request HOT 3
- setConcurrency not working if using browsershoot
- Request Type
- Follow all redirects, including HTML meta and Javascript
- Extract link text
- Network.getAllCookies HOT 3
- `CrawlObserver` and `CrawlProfile` interfaces
- Custom/extendable `CrawlUrl`
- Call to undefined method GuzzleHttp\Client::getConfig() HOT 1
- Crawler simply stops
- Depth tree structure HOT 1
- Crawler stops after `www`-version redirect to non-`www` version
- Cannot install under php 8.1.2
- Class "Spatie\Crawler\CrawlObservers\CrawlObserver" not found in production
- Cookies in clientOptions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crawler.