Skip to content

Commit 7bef28b

Browse files
v1.1.0 - UI Updates
1 parent d97ea50 commit 7bef28b

File tree

4 files changed

+142
-138
lines changed

4 files changed

+142
-138
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A fast, powerful desktop application for scraping business data from Google Maps
88
## 📥 Installation / Download
99

1010
### Windows
11-
1. Download the latest release: `gscrape Setup 1.0.0.exe`
11+
1. Download the latest release: [GScrape v1.0.1.exe](https://github.com/testdeployrepeat/gscrape/releases/download/v1.0.1/gscrape.Setup.1.0.0.exe)
1212
2. Run the installer
1313
3. Launch from Desktop or Start Menu
1414

@@ -24,7 +24,17 @@ cd gscrape
2424
npm install
2525
npm start
2626
```
27+
---
28+
29+
## ⚠️ Disclaimer
2730

31+
**GScrape is intended for educational and personal use only.**
32+
33+
- Users must comply with **Google Maps' Terms of Service**.
34+
- The author is **not responsible** for any misuse of this software.
35+
- Use this tool responsibly and at your own risk.
36+
37+
---
2838
## ✨ Features
2939

3040
- **Dual Modes**: Single location or bulk CSV processing

index.html

Lines changed: 53 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html lang="en" data-theme="dark">
33

44
<head>
55
<meta charset="UTF-8">
@@ -208,22 +208,7 @@ <h3>Appearance</h3>
208208
</div>
209209
</div>
210210

211-
<div class="settings-group">
212-
<h3>Search Settings</h3>
213-
<div class="form-group">
214-
<label for="searchPreposition">Search Preposition</label>
215-
<select id="searchPreposition">
216-
<option value="in">in</option>
217-
<option value="near">near</option>
218-
<option value="around">around</option>
219-
<option value="at">at</option>
220-
<option value="on">on</option>
221-
<option value="for">for</option>
222-
</select>
223-
<small>Changes how search queries are formed (e.g., "restaurants in New York" vs "restaurants near New
224-
York")</small>
225-
</div>
226-
</div>
211+
227212

228213
<div class="settings-group">
229214
<h3>Scraping</h3>
@@ -297,23 +282,29 @@ <h2 class="section-title">Configuration</h2>
297282
</div>
298283

299284
<div class="form-group">
300-
<label for="location">Location *</label>
301-
<input type="text" id="location" placeholder="e.g., New York, NY" required>
302-
</div>
303-
304-
<div class="form-group">
305-
<label for="refinement">Refinement</label>
306-
<input type="text" id="refinement" placeholder="e.g., Manhattan">
285+
<label for="searchPrepositionSingle">Search Preposition</label>
286+
<select id="searchPrepositionSingle">
287+
<option value="in">in</option>
288+
<option value="near">near</option>
289+
<option value="around">around</option>
290+
<option value="at">at</option>
291+
<option value="on">on</option>
292+
<option value="for">for</option>
293+
<option value="custom">Custom</option>
294+
</select>
295+
<input type="text" id="customPrepositionSingle" placeholder="Enter custom preposition"
296+
style="display: none; margin-top: 8px;">
297+
<small
298+
style="color: rgba(255, 255, 255, 0.35); display: block; margin-top: 4px; font-size: 11px; font-style: italic;">e.g.,
299+
"restaurants in New York" vs "restaurants near New York"</small>
307300
</div>
308301

309302
<div class="form-group">
310-
<label class="switch-label">
311-
<span>Scrape Website Links</span>
312-
<label class="switch">
313-
<input type="checkbox" id="extractWebsites">
314-
<span class="slider"></span>
315-
</label>
316-
</label>
303+
<label for="location">Location *</label>
304+
<input type="text" id="location" placeholder="e.g., New York, NY" required>
305+
<small
306+
style="color: rgba(255, 255, 255, 0.35); display: block; margin-top: 4px; font-size: 11px; font-style: italic;">Recommended:
307+
Narrow down search to get better results</small>
317308
</div>
318309

319310
<div class="form-group">
@@ -324,6 +315,9 @@ <h2 class="section-title">Configuration</h2>
324315
<span class="slider"></span>
325316
</label>
326317
</label>
318+
<small
319+
style="color: rgba(255, 255, 255, 0.4); display: block; margin-top: 4px; font-size: 12px; font-style: italic;">Email
320+
extraction will be significantly slower</small>
327321
</div>
328322
</div>
329323

@@ -335,27 +329,30 @@ <h2 class="section-title">Configuration</h2>
335329
</div>
336330

337331
<div class="form-group">
338-
<label class="switch-label">
339-
<span>Scrape Website Links</span>
340-
<label class="switch">
341-
<input type="checkbox" id="extractWebsitesBulk">
342-
<span class="slider"></span>
343-
</label>
344-
</label>
332+
<label for="searchPrepositionBulk">Search Preposition</label>
333+
<select id="searchPrepositionBulk">
334+
<option value="in">in</option>
335+
<option value="near">near</option>
336+
<option value="around">around</option>
337+
<option value="at">at</option>
338+
<option value="on">on</option>
339+
<option value="for">for</option>
340+
<option value="custom">Custom</option>
341+
</select>
342+
<input type="text" id="customPrepositionBulk" placeholder="Enter custom preposition"
343+
style="display: none; margin-top: 8px;">
344+
<small
345+
style="color: rgba(255, 255, 255, 0.35); display: block; margin-top: 4px; font-size: 11px; font-style: italic;">e.g.,
346+
"restaurants in New York" vs "restaurants near New York"</small>
345347
</div>
346348

347349
<div class="form-group">
348-
<label class="switch-label">
349-
<span>Extract Emails</span>
350-
<label class="switch">
351-
<input type="checkbox" id="extractEmailsBulk">
352-
<span class="slider"></span>
353-
</label>
354-
</label>
350+
<label for="bulkQueries">Locations (One per line)</label>
351+
<textarea id="bulkQueries" rows="4" placeholder="Enter locations line by line..."></textarea>
355352
</div>
356353

357354
<div class="form-group">
358-
<label>Upload CSV / Enter Queries</label>
355+
<label>Upload CSV</label>
359356
<p class="help-text">Upload a CSV with 1 column of locations (no header required)</p>
360357
<div id="dropZone" class="drop-zone">
361358
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -369,7 +366,16 @@ <h2 class="section-title">Configuration</h2>
369366
</div>
370367

371368
<div class="form-group">
372-
<textarea id="bulkQueries" rows="4" placeholder="Enter locations line by line..."></textarea>
369+
<label class="switch-label">
370+
<span>Extract Emails</span>
371+
<label class="switch">
372+
<input type="checkbox" id="extractEmailsBulk">
373+
<span class="slider"></span>
374+
</label>
375+
</label>
376+
<small
377+
style="color: rgba(255, 255, 255, 0.4); display: block; margin-top: 4px; font-size: 12px; font-style: italic;">Email
378+
extraction will be significantly slower</small>
373379
</div>
374380

375381
<div class="bulk-preview" id="bulkPreview" style="display: none;">

renderer.js

Lines changed: 78 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const bulkMode = document.getElementById('bulkMode');
1515

1616
const nicheInput = document.getElementById('niche');
1717
const locationInput = document.getElementById('location');
18-
const refinementInput = document.getElementById('refinement');
1918

2019
const bulkNicheInput = document.getElementById('bulkNiche');
2120
const bulkQueriesInput = document.getElementById('bulkQueries');
@@ -26,8 +25,10 @@ const queryCount = document.getElementById('queryCount');
2625

2726
const speedSelect = document.getElementById('speed');
2827
const exportFormatSelect = document.getElementById('exportFormat');
29-
const extractWebsitesCheckbox = document.getElementById('extractWebsites');
30-
const extractWebsitesBulkCheckbox = document.getElementById('extractWebsitesBulk');
28+
const searchPrepositionSingle = document.getElementById('searchPrepositionSingle');
29+
const customPrepositionSingle = document.getElementById('customPrepositionSingle');
30+
const searchPrepositionBulk = document.getElementById('searchPrepositionBulk');
31+
const customPrepositionBulk = document.getElementById('customPrepositionBulk');
3132
const extractEmailsCheckbox = document.getElementById('extractEmails');
3233
const extractEmailsBulkCheckbox = document.getElementById('extractEmailsBulk');
3334
const startBtn = document.getElementById('startBtn');
@@ -145,9 +146,33 @@ document.getElementById('performanceMode').addEventListener('change', (e) => {
145146
// Remove the performance-mode class since we're using a simpler design
146147
});
147148

148-
document.getElementById('searchPreposition').addEventListener('change', (e) => {
149-
const preposition = e.target.value;
150-
localStorage.setItem('searchPreposition', preposition);
149+
// Preposition dropdown handlers
150+
searchPrepositionSingle.addEventListener('change', (e) => {
151+
const value = e.target.value;
152+
if (value === 'custom') {
153+
customPrepositionSingle.style.display = 'block';
154+
} else {
155+
customPrepositionSingle.style.display = 'none';
156+
}
157+
localStorage.setItem('searchPrepositionSingle', value);
158+
});
159+
160+
searchPrepositionBulk.addEventListener('change', (e) => {
161+
const value = e.target.value;
162+
if (value === 'custom') {
163+
customPrepositionBulk.style.display = 'block';
164+
} else {
165+
customPrepositionBulk.style.display = 'none';
166+
}
167+
localStorage.setItem('searchPrepositionBulk', value);
168+
});
169+
170+
customPrepositionSingle.addEventListener('input', (e) => {
171+
localStorage.setItem('customPrepositionSingle', e.target.value);
172+
});
173+
174+
customPrepositionBulk.addEventListener('input', (e) => {
175+
localStorage.setItem('customPrepositionBulk', e.target.value);
151176
});
152177

153178
headlessModeCheckbox.addEventListener('change', (e) => {
@@ -503,20 +528,18 @@ async function startScraping() {
503528
async function startSingleScraping() {
504529
const niche = nicheInput.value.trim();
505530
const location = locationInput.value.trim();
506-
const refinement = refinementInput.value.trim();
507531

508532
if (!niche || !location) {
509533
alert('Please fill in both Niche and Location fields');
510534
return;
511535
}
512536

513-
let searchLocation = location;
514-
if (refinement) {
515-
searchLocation = `${location} ${refinement}`;
537+
// Get preposition from dropdown
538+
let preposition = searchPrepositionSingle.value;
539+
if (preposition === 'custom') {
540+
preposition = customPrepositionSingle.value.trim() || 'in';
516541
}
517-
518-
const preposition = localStorage.getItem('searchPreposition') || 'in';
519-
const query = `${niche} ${preposition} ${searchLocation}`;
542+
const query = `${niche} ${preposition} ${location}`;
520543

521544
if (isAlreadyScraped(query)) {
522545
const proceed = confirm(
@@ -543,9 +566,8 @@ async function startSingleScraping() {
543566

544567
const options = {
545568
niche,
546-
location: searchLocation,
569+
location,
547570
speed: speedSelect.value,
548-
extractWebsites: extractWebsitesCheckbox.checked,
549571
extractEmails: extractEmailsCheckbox.checked,
550572
headless: headlessModeCheckbox.checked
551573
};
@@ -696,7 +718,12 @@ async function startBulkScraping() {
696718
}
697719

698720
const location = bulkQueries[i];
699-
const query = `${niche} in ${location}`;
721+
// Get preposition from dropdown
722+
let preposition = searchPrepositionBulk.value;
723+
if (preposition === 'custom') {
724+
preposition = customPrepositionBulk.value.trim() || 'in';
725+
}
726+
const query = `${niche} ${preposition} ${location}`;
700727

701728
currentQuery.textContent = i + 1;
702729
currentSearchQuery.textContent = query;
@@ -708,7 +735,6 @@ async function startBulkScraping() {
708735
niche,
709736
location,
710737
speed: speedSelect.value,
711-
extractWebsites: extractWebsitesBulkCheckbox.checked,
712738
extractEmails: extractEmailsBulkCheckbox.checked,
713739
headless: headlessModeCheckbox.checked
714740
};
@@ -1127,39 +1153,54 @@ async function clearHistory() {
11271153
}
11281154
}
11291155

1130-
function initializeSettings() {
1131-
// Theme
1132-
const theme = localStorage.getItem('theme') || 'dark';
1133-
document.getElementById('themeSelect').value = theme;
1134-
document.documentElement.setAttribute('data-theme', theme);
1156+
async function initializeSettings() {
1157+
// Load history
1158+
await loadHistory();
1159+
1160+
// Initialize theme
1161+
const savedTheme = localStorage.getItem('theme') || 'dark';
1162+
document.getElementById('themeSelect').value = savedTheme;
1163+
document.documentElement.setAttribute('data-theme', savedTheme);
11351164

1165+
// Initialize performance mode
11361166
const performanceMode = localStorage.getItem('performanceMode') === 'true';
11371167
document.getElementById('performanceMode').checked = performanceMode;
1138-
// Remove the performance-mode class since we're using a simpler design
11391168

1140-
// Search Preposition
1141-
const preposition = localStorage.getItem('searchPreposition') || 'in';
1142-
document.getElementById('searchPreposition').value = preposition;
1169+
// Initialize preposition dropdowns
1170+
const savedPrepositionSingle = localStorage.getItem('searchPrepositionSingle') || 'in';
1171+
searchPrepositionSingle.value = savedPrepositionSingle;
1172+
if (savedPrepositionSingle === 'custom') {
1173+
customPrepositionSingle.style.display = 'block';
1174+
customPrepositionSingle.value = localStorage.getItem('customPrepositionSingle') || '';
1175+
}
1176+
1177+
const savedPrepositionBulk = localStorage.getItem('searchPrepositionBulk') || 'in';
1178+
searchPrepositionBulk.value = savedPrepositionBulk;
1179+
if (savedPrepositionBulk === 'custom') {
1180+
customPrepositionBulk.style.display = 'block';
1181+
customPrepositionBulk.value = localStorage.getItem('customPrepositionBulk') || '';
1182+
}
11431183

1144-
// Headless Mode
1184+
// Initialize headless mode
11451185
const headlessMode = localStorage.getItem('headlessMode') !== 'false';
11461186
headlessModeCheckbox.checked = headlessMode;
11471187

1148-
// Default Export Format
1149-
const defaultExportFormat = localStorage.getItem('defaultExportFormat') || 'csv';
1150-
defaultExportFormatSelect.value = defaultExportFormat;
1188+
// Initialize export format
1189+
const exportFormat = localStorage.getItem('defaultExportFormat') || 'csv';
1190+
defaultExportFormatSelect.value = exportFormat;
1191+
exportFormatSelect.value = exportFormat;
11511192

1152-
// Auto-save Results
1153-
const autoSaveResults = localStorage.getItem('autoSaveResults') === 'true';
1154-
autoSaveResultsCheckbox.checked = autoSaveResults;
1193+
// Initialize auto-save
1194+
const autoSave = localStorage.getItem('autoSaveResults') === 'true';
1195+
autoSaveResultsCheckbox.checked = autoSave;
11551196

1156-
// Save History Data
1197+
// Initialize save history data
11571198
const saveHistoryData = localStorage.getItem('saveHistoryData') !== 'false';
11581199
document.getElementById('saveHistoryData').checked = saveHistoryData;
11591200

1160-
// Default Export Path
1161-
const defaultExportPath = localStorage.getItem('defaultExportPath') || '';
1162-
defaultExportPathInput.value = defaultExportPath;
1201+
// Initialize default export path
1202+
const defaultPath = localStorage.getItem('defaultExportPath') || '';
1203+
defaultExportPathInput.value = defaultPath;
11631204
}
11641205

11651206
function updateStats() {

0 commit comments

Comments
 (0)