Skip to main content

Easy to use JQuery-Like API for Web Scraping/Crawling. It also supports Cookies and custom User Agents. Solidscraper is compatible with Python 2 and 3.

2. “Hello World” Examples

Getting all url of all links:

import solidscraper as ss

doc = ss.load("https://www.example.com/the/path")

# print the list of urls from all <a> elements
print(doc.select("a").getAttribute("href"))

Getting all url of all links inside <div>s whose class id is ‘links’:

import solidscraper as ss

doc = ss.load("https://www.example.com/the/path")

# print the list of urls from all <a> elements inside <div id="links">
print(doc.select("div #links").then("a").getAttribute("href"))

Getting the text of all <span> elements inside <p> whose class are ‘info’:

import solidscraper as ss

doc = ss.load("https://www.example.com/the/path")

# print the text of all <span> elements inside <p class="info">
print(doc.select("p .info").then("span").text())

Note: these examples use the python 3 print function, in case you want to run them with python 2, either replace the print() function with the python 2 print statement or add the following import line as the first statement of your code: from __future__ import print_function.


3. “Real World” Examples

The examples folder above contains two fully functional examples: one to download tweets by hashtags and another to download complete users timeline (tweets and images). Both scripts were completely built using solidscraper.

Release files for solidscraper 0.7.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for solidscraper 0.7.7
File Size Uploaded
solidscraper-0.7.7.tar.gz 17.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for solidscraper 0.7.7
File Interpreter ABI Platform
solidscraper-0.7.7-py3-none-any.whl Python 3 none any Details

Total release size: 27.3 kB

Release files / solidscraper-0.7.7.tar.gz

Download URL solidscraper-0.7.7.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
587ec89bf1691e5660321be257523e06a4f4456da94cb8ef4bdf37784e7ee00b
BLAKE2b-256 checksum
How to use checksums
8e3c701cf973376e885eab3c7762979f686dd78830a4a10835e242a7cb92ac6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.4.2 requests/2.20.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.24.0 CPython/3.6.5

Release files / solidscraper-0.7.7-py3-none-any.whl

Download URL solidscraper-0.7.7-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
259bc104918d1b992920458e6b52dbaf19586bd506bff16ef3788cb92c91541a
BLAKE2b-256 checksum
How to use checksums
d1aa82f2c915a1339a1d3a18ef1f8ac2514608efda5ed507dda9c5506f8ce51f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.4.2 requests/2.20.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.24.0 CPython/3.6.5

Release history Release notifications | RSS feed

This release

0.7.7 This release

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page