This project scrapes and summarizes prediction market events from Polymarket, saving structured event data and readable summaries for analysis.
- Uses Selenium and BeautifulSoup to extract event data from Polymarket.
- Outputs a human-readable summary of each event to
data/events_summary.txt
. - Saves all event data as JSON in
data/events.json
. - Handles multiple event structures and market types.
Event #234
Title: Will Trump say "Epstein" by Monday?
Description: This market will resolve to “Yes” if Donald Trump says "Epstein" between June 5, 5:30 PM ET and June 9, 2025, 11:59 PM ET. Otherwise, this market will resolve to “No”.
Pluralization/possessive of the word will count toward the resolution of this market.
...
Start Date: 2025-06-05T21:46:23.015934Z
End Date: 2025-06-09T00:00:00Z
Liquidity: 7472.92974
Volume: 143110.752444
Image: https://polymarket-upload.s3.us-east-2.amazonaws.com/will-trump-mention-epstein-by-monday-lysj9mQ5Mb8P.jpg
Market:
Competitive Score: 0.8136946435905578
Outcome: Yes | Price: 0.0215 (2.15%)
Outcome: No | Price: 0.9785 (97.85%)
Tags: Mentions, Trump Presidency, Politics, Trump vs Elon, Trump, Elon Musk, Breaking News
-
Install dependencies:
pip install selenium beautifulsoup4 colorama
-
Download ChromeDriver and ensure it is in your PATH.
-
Run the script:
python main.py
-
Output files:
data/events_summary.txt
: Human-readable event summaries.data/events.json
: Raw event data in JSON format.data/queries.json
: Raw queries from Polymarket.
main.py
- Main script for scraping and summarizing events.data/
- Output directory for summaries and event data.
- Python 3.7+
- Google Chrome browser
- ChromeDriver
- Integrate sentiment analysis on event summaries for deeper insights.
- Extend scraping to include options and cryptocurrency prediction markets.
- Build a dashboard for visualizing market trends and event outcomes.
- Add support for additional data sources and market types.
- Automate regular data collection and reporting.
MIT License