Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
The Browserlify API Python Library
You should be signed up as a developer on the browserlify.com so that you can create and manage your API token, It's free Sign up.
To easily install or upgrade to the latest release, use pip.
pip install --upgrade browserlify
Option
class so that it knows how to authenticate.from browserlify import pdf, Option
opt = Option(YOUR_TOKEN)
from browserlify import pdf, Option
opt = Option(YOUR_TOKEN)
opt.paper = 'A4'
opt.full_page = True
opt.wait_load = 5000 # Wait document loaded <= 5,000 ms
try:
content = pdf('https://example.org', opt)
open('example.org.pdf','wb+').write(content)
except Exception as bre:
print('pdf fail', bre)
from browserlify import screenshot, Option
opt = Option(YOUR_TOKEN)
opt.full_page = True
opt.wait_load = 5000 # Wait document loaded <= 5,000 ms
try:
content = screenshot('https://example.org', opt)
open('example.org.png','wb+').write(content)
except Exception as bre:
print('screenshot fail', bre)
from browserlify import scrape, Option,Flow
opt = Option(YOUR_TOKEN)
opt.flows = [
Flow(action="waitload", timeout=5000), # Wait document loaded <= 5,000 ms
Flow(name="title", action="text", selector="h1")
]
try:
content = scrape('https://example.org', opt)
print(content)
# output:
# {"page":1,"data":{"title":"Example Domain"}}
except Exception as bre:
print('scrape fail', bre)
scripts/browserlify
: The cli
tool has a free token: cli_oss_free_token
pdf
pdf generationscreenshot
take screenshotcontent
get website contentscrape
get website contentbrowserlify cli tool
positional arguments:
{pdf,screenshot,content,scrape}
commands help
pdf pdf generation help
screenshot take screenshot help
content get content help
scrape web scrape help
optional arguments:
-h, --help show this help message and exit
--version, -v show program's version number and exit
browserlify pdf -t YOUR_TOKEN -o browserlify.com.pdf -w 5000 --paper A3 https://example.org
browserlify screenshot -t YOUR_TOKEN -o browserlify.com.png -w 5000 --fullpage https://example.org
browserlify content -t YOUR_TOKEN -o browserlify.com.json -w 5000 https://example.org
flows.json
is written in browserlify's IDE, and you can get web page content without code
[
{
"action": "waitload",
"timeout": 5000
},
{
"action": "text",
"name": "title",
"selector": "title"
}
]
browserlify scrape -t YOUR_TOKEN -o example.com.json -f flows.json https://example.org
FAQs
PDF generation, Web Scraping with headless chrome from browserlify.com
We found that browserlify 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.