Loading repository data…
Loading repository data…
itsOwen / repository
A Powerful web scraper powered by LLM | OpenAI, Gemini & Ollama
Rip data from the net, leaving no trace. Welcome to the future of web scraping.
CyberScraper 2077 is not just another web scraping tool – it's a glimpse into the future of data extraction. Born from the neon-lit streets of a cyberpunk world, this AI-powered scraper uses OpenAI, Gemini and LocalLLM Models to slice through the web's defenses, extracting the data you need with unparalleled precision and style.
Whether you're a corpo data analyst, a street-smart netrunner, or just someone looking to pull information from the digital realm, CyberScraper 2077 has got you covered.
Please follow the Docker Container Guide given below, as I won't be able to maintain another version for Windows systems.
Note: CyberScraper 2077 requires Python 3.10 or higher.
Clone this repository:
git clone https://github.com/itsOwen/CyberScraper-2077.git
cd CyberScraper-2077
Create and activate a virtual environment:
virtualenv venv
source venv/bin/activate # Optional
Install the required packages:
pip install -r requirements.txt
Install the playwright:
playwright install
Set OpenAI & Gemini Key in your environment:
Linux/Mac:
export OPENAI_API_KEY="your-api-key-here"
export GOOGLE_API_KEY="your-api-key-here"
Note: I only recommend using OpenAI and Gemini API as these models are really good at following instructions. If you are using open-source LLMs, make sure you have a good system as the speed of the data generation/presentation depends on how well your system can run the LLM. You may also have to fine-tune the prompt and add some additional filters yourself.
1. Setup Ollama using `pip install ollama`
2. Download Ollama from the official website: https://ollama.com/download
3. Now type: ollama pull llama3.1 or whatever LLM you want to use.
4. Now follow the rest of the steps below.
If you prefer to use Docker, follow these steps to set up and run CyberScraper 2077:
Ensure you have Docker installed on your system.
Clone this repository:
git clone https://github.com/itsOwen/CyberScraper-2077.git
cd CyberScraper-2077
Build the Docker image:
docker build -t cyberscraper-2077 .
Run the container:
docker run -p 8501:8501 -e OPENAI_API_KEY="your-actual-api-key" -e GOOGLE_API_KEY="your-actual-api-key" cyberscraper-2077
If you want to use Ollama with the Docker setup:
Install Ollama on your host machine following the instructions at https://ollama.com/download
Run Ollama on your host machine:
ollama pull llama3.1
Find your host machine's IP address:
ifconfig or ip addr showipconfigRun the Docker container with the host network and set the Ollama URL:
docker run -e OLLAMA_BASE_URL=http://host.docker.internal:11434 -p 8501:8501 cyberscraper-2077
Now visit the url: http://localhost:8501/
On Linux you might need to use this below:
docker run -e OLLAMA_BASE_URL=http://<your-host-ip>:11434 -p 8501:8501 cyberscraper-2077
Replace <your-host-ip> with your actual host machine IP address.
In the Streamlit interface, select the Ollama model you want to use (e.g., "ollama:llama3.1").
Note: Ensure that your firewall allows connections to port 11434 for Ollama.
Fire up the Streamlit app:
source venv/bin/activate # If not yet done
streamlit run main.py
Open your browser and navigate to http://localhost:8501.
Enter the URL of the site you want to scrape or ask a question about the data you need.
Ask the chatbot to extract the data in any format. Select whatever data you want to export or even everything from the webpage.
Watch as CyberScraper 2077 tears through the net, extracting your data faster than you can say "flatline"!
Example usage with page ranges:
https://example.com/products 1-5
https://example.com/search?q=cyberpunk&page={page} 1-10
Note: The multi-page scraping feature is currently in beta. While functional, you may encounter occasional issues or unexpected behavior. We appreciate your feedback and patience as we continue to improve this feature.
CyberScraper 2077 now supports multi-page scraping, allowing you to extract data from multiple pages of a website in one go. This feature is perfect for scraping paginated content, search results, or any site with data spread across multiple pages.
I suggest you enter the URL structure every time if you want to scrape multiple pages so it can detect the URL structure easily. It detects nearly all URL types.
Basic Usage: To scrape multiple pages, use the following format when entering the URL:
https://example.com/page 1-5
https://example.com/p/ 1-6
https://example.com/xample/something-something-1279?p=1 1-3
This will scrape pages 1 through 5 of the website.
Custom Page Ranges: You can specify custom page ranges:
https://example.com/p/ 1-5,7,9-12
https://example.com/xample/something-something-1279?p=1 1,7,8,9
This will scrape pages 1 to 5, page 7, and pages 9 to 12.
URL Patterns: For websites with different URL structures, you can specify a pattern:
https://example.com/search?q=cyberpunk&page={page} 1-5
Replace {page} with where the page number should be in the URL.
Automatic Pattern Detection: If you don't specify a pattern, CyberScraper 2077 will attempt to detect the URL pattern automatically. However, for best results, specifying the pattern is recommended.
simulate_human option for more natural scraping behavior on sites with anti-bot measures.robots.txt file and terms of service to ensure compliance.URL Example : "https://news.ycombinator.com/?p=1 1-3 or 1,2,3,4"
If you want to scrape a specific page, just enter the query "please scrape page number 1 or 2". If you want to scrape all pages, simply give a query like "scrape all pages in csv" or whatever format you want.
Note: The Tor network scraping feature allows you to access and scrape .onion sites. This feature requires additional setup and should be used responsibly and legally.
CyberScraper 2077 now supports scraping .onion sites through the Tor network, allowing you to access and extract data from the dark web safely and anonymously. This feature is perfect for researchers, security analysts, and investigators who need to gather information from Tor hidden services.
Install Tor on your system:
# Ubuntu/Debian
sudo apt install tor
# macOS (using Homebrew)
brew install tor
# Start the Tor service
sudo service tor start # on Linux
brew services start tor # on macOS
Install additional Python packages:
pip install PySocks requests[socks]
Basic Usage: Simply enter an .onion URL, and CyberScraper will automatically detect and route it through the Tor network:
http://example123abc.onion
Safety Features:
You can customize the Tor scraping behavior by adjusting the following settings:
tor_config = TorConfig(
socks_port=9050, # Default Tor SOCKS port
circuit_timeout=10, # Timeout for circuit creation
auto_renew_circuit=True, # Automatically renew Tor circuit
verify_connection=True # Verify Tor connection before scraping
)
For Docker users, add these additional flags to enable Tor support:
docker run -p 8501:8501 \
--network="host" \
-e OPENAI_API_KEY="your-api-key" \
cyberscraper-2077