Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
中文 | English
The SDK for Python contains two parts:
The CLI Tool is mainly designed for those who are more comfortable using command line tools to interact with Crawlab.
The installation of the CLI Tool is simple:
pip install crawlab-sdk
Then, you can use the crawlab
command in the command prompt to action with Crawlab.
Check the help document below, or you can refer to the official documentation (Chinese).
crawlab --help
Utility tools mainly provide some helper
methods to make it easier for you to integrate your spiders into Crawlab, e.g. saving results.
Below are integration methods of Scrapy and general Python spiders with Crawlab.
⚠️Note: make sure you have already installed crawlab-sdk
using pip.
In settings.py
in your Scrapy project, find the variable named ITEM_PIPELINES
(a dict
variable). Add content below.
ITEM_PIPELINES = {
'crawlab.pipelines.CrawlabMongoPipeline': 888,
}
Then, start the Scrapy spider. After it's done, you should be able to see scraped results in Task Detail -> Result
Please add below content to your spider files to save results.
# import result saving method
from crawlab import save_item
# this is a result record, must be dict type
result = {'name': 'crawlab'}
# call result saving method
save_item(result)
Then, start the spider. After it's done, you should be able to see scraped results in Task Detail -> Result
FAQs
Python SDK for Crawlab
We found that crawlab-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.