Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
google-searchconsole
takes the pain out of working with the Google Search
Console Search Analytics Query API. It is written in Python and provides
convenient features to make querying a site's search analytics data easier.
This package is built on top of
Google's own API Client
and is heavily inspired, from design to implementation, by @debrouwere's
fantastic google-analytics
package.
First, install the package using:
pip3 install git+https://github.com/joshcarty/google-searchconsole
Then, create a new project in the Google Developers Console, enable the Google Search Console API under "APIs & Services". Next, create credentials for an OAuth client ID, choosing the Other Application type. Download a JSON copy of your client secrets.
After that, executing your first query is as easy as
import searchconsole
account = searchconsole.authenticate(client_config='client_secrets.json')
webproperty = account['https://www.example.com/']
report = webproperty.query.range('today', days=-7).dimension('query').get()
print(report.rows)
The above example will use your client configuration file to interactively generate your credentials.
If you wish to save your credentials, to avoid going
through the OAuth consent screen in the future, you can specify a path to save
them by specifying serialize='path/to/credentials.json
.
When you want to authenticate a new account you run:
account = searchconsole.authenticate(client_config='client_secrets.json',
serialize='credentials.json')
Which will save your credentials to a file called credentials.json
.
From then on, you can authenticate with:
account = searchconsole.authenticate(client_config='client_secrets.json',
credentials='credentials.json')
FAQs
A wrapper for the Google Search Console API.
We found that searchconsole 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.