Comments (17)
Hi @pablohoffman, has anyone started this? We're happy to write it but need to know if we're duplicating efforts.
from scrapy.
@pedrofaustino no one has started that I know, and it's still highly needed. I'm happy to review it.
from scrapy.
Hi @pablohoffman I'm working with @pedrofaustino.
I have a question:
This command will be similar to shell command,
Where i should create files, in contrib folder or like shell command files.
from scrapy.
I've programmed a script few days ago (https://github.com/csalazar/minreq) similar to the functionality asked here but with other approach. It takes a valid request from Chrome DevTools using the "Copy as Curl" feature and minimize the number of headers to only the required ones. For the internal comparisons it uses MD5 sums.
I think it's the best way since fuzzing user-agent and accept headers don't provide a real solution for the problem. Maybe it's useful for some requests, but a wanted output sometimes depends of a specific cookie value or POST data (in my script support of POST isn't implemented yet, but is an easy task). Working with a valid request is the only solution for that kind of situations.
The script uses MD5 sums but it can be modified to the search string case since a header could change the page very little and still contains a valid output.
from scrapy.
Just sent pull request #413
from scrapy.
Add Unit Tests to pull request #413.
Please review and comment.
from scrapy.
I like the approach of using a successful request (@csalazar).
What do you think about it @pablohoffman ?
from scrapy.
Any news on this? @nramirezuy and @pablohoffman ?
from scrapy.
I like @csalazar's approach, it's basically what I did for manual probing. I'd like it a lot if it probed url query parameters as well.
from scrapy.
any interest in resurrecting this one for Scrapy 1.0 @nramirezuy @kmike @dangra @curita @redapple ?
from scrapy.
No interest from me :) scrapy probe
looks a bit too specific; I'm not sure there is a single best solution, and it is a feature which can live fine outside Scrapy.
I like @csalazar's approach; it looks a bit similar to what parts of https://github.com/DRMacIver/hypothesis library are doing - given an example, simplify it until it fails.
from scrapy.
I'm agree with @kmike
---> Close ? /
from scrapy.
I quite like the minreq
idea, I think it shares the same goal of the original scrapy probe
idea.
What do you think about adding minreq
as a scrapy command?. I think it's a useful thing to have in the "scraping toolkit" and thus makes a good fit for a scrapy command (in addition to getting more exposure, usage and contributions).
/cc @csalazar
from scrapy.
@pablohoffman sure, I'll add POST support and tests. The command should be called probe
or minreq
?
from scrapy.
@csalazar I think minreq
is fine, since we are just making your app more visible.
from scrapy.
minreq
sounds good to me, thanks @csalazar!
from scrapy.
Hey @csalazar - Did you ever write the code for this, and are you still interested in contributing? I think this would be a great feature. But if not, I will close this issue as stale, particularly as another solution exists (minreq).
from scrapy.
Related Issues (20)
- Remove tests/requirements.txt
- Add an extra-deps job for pypy
- Document the SpiderState extension
- WindowsRunSpiderCommandTest isn't skipped properly in the pinned envs
- More documentation needed about the robots.txt protocol HOT 3
- GZipPlugin does not work with S3 HOT 3
- AttributeError: 'Decompressor' object has no attribute 'process' HOT 1
- Handle robots.txt files not utf-8 encoded HOT 3
- SitemapSpider will ignore sitemap with URLs like https://website.com/filename.xml?from=7155352010944&to=7482320519360 HOT 3
- Decompressor' object has no attribute 'process' HOT 1
- Failed to scrape data from Auction website with Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min) error HOT 3
- Not able to use requests inside with scrapy. HOT 1
- ast.NameConstant is deprecated and will be removed in Python 3.14; use ast.Constant instead HOT 1
- Scrapy and Great Expectations: Error - __provides__ HOT 13
- Different behavior of `get_header` between urllib.Request and WrappedRequest HOT 4
- test_get_func_args() expectation changes in new Python point releases HOT 6
- Receiving 403 while using proxy server and a valid user agent HOT 1
- Media Pipeline is not filtering the duplicate file requests HOT 3
- Per spider DNS_RESOLVER doesn't work HOT 1
- Scrapy Spider Fails to Process All URLs from CSV on Large URL Sets HOT 1
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 scrapy.