How dchrastil/scrapedin works
Project Type & Purpose
• This is a standalone Python command-line tool focused on automated reconnaissance by scraping LinkedIn. Its purpose is to perform a company-specific search, extract up to 1,000 employee profiles using minimal requests, and output the data as an XLSX file (with both a “dataset” and a “report” worksheet) that is optimized for use with Google Spreadsheets.
• The script is intended for educational/penetration testing scenarios (with an explicit disclaimer about violating LinkedIn’s TOS), and it leverages external APIs/techniques for scraping.
Analyzing the File Structure
• Top-Level Files:
• README.md: Contains the project description, installation instructions, and usage details.
• ScrapedIn.py: The main Python script that acts as the entry point.
• config.py: Likely holds configuration settings (such as target URLs, parameters, or API keys).
• requirements.txt: Lists external Python libraries that the tool depends on.
• ScrapedIn Demo.webm: A video demonstration of the tool running.
• Directories:
• results: Contains a subdirectory (results/outputfilesgohere) where the generated XLSX output files are stored.
• There is a minimal separation of concerns given that the project is script-driven rather than a multi-module application, so the architecture is fairly linear.
Key System Components and Data Flow
• Input/Configuration:
• Environment Variables: LI_USERNAME and LI_PASSWORD are used for authentication with LinkedIn.
• config.py: May hold additional configuration aspects—URLs, request parameters, etc.
• Client/Processing:
• ScrapedIn.py acts as the core application logic that reads the target company name from user input.
• It determines the target company’s LinkedIn ID and then performs the actual scraping.
• The scraping logic involves sending one or several HTTP requests (the readme hints at less than 20 requests for maximum results).
• External Interaction:
• LinkedIn Website/API: The tool interacts with LinkedIn to fetch public profile data. This interaction is an external dependency and should be clearly depicted as an external service.
• There may also be an integration aspect with Proxycurl APIs (as per sponsorship) that can support data quality or extend functionality.
• Output/Data Persistence:
• Processed data is compiled into an XLSX file that is saved in the "results/outputfilesgohere" directory.
• The final output consists of two worksheets: “dataset” (raw data) and “report” (formatted data with visuals, such as profile pictures).
Architectural Patterns & Design Principles
• Procedural/Script-Driven Application: The design follows a simpler, linear workflow.
• Separation of Concerns: Even though the project is not extremely modular, the division between configuration (config.py), processing (ScrapedIn.py), and output generation (writing XLSX files) should be highlighted.
• External Integration: The use of external APIs (LinkedIn and possibly Proxycurl) and use of environment variables for credentials are critical architectural elements.