Spaces:
Sleeping
Sleeping
added main for manual input
Browse files- code/web_scraper_allegro.py +4 -3
- code/web_scraper_ebay.py +4 -3
- code/web_scraper_olx.py +4 -3
code/web_scraper_allegro.py
CHANGED
|
@@ -144,6 +144,7 @@ def get_allegro_data(url):
|
|
| 144 |
print(f"Main error occurred: {e}")
|
| 145 |
|
| 146 |
# --- USAGE ---
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
|
|
|
|
|
| 144 |
print(f"Main error occurred: {e}")
|
| 145 |
|
| 146 |
# --- USAGE ---
|
| 147 |
+
if __name__ == "__main__":
|
| 148 |
+
link = input("Enter the Allegro offer link: ")
|
| 149 |
+
data = get_allegro_data(link)
|
| 150 |
+
print(json.dumps(data, indent=4, ensure_ascii=False))
|
code/web_scraper_ebay.py
CHANGED
|
@@ -148,6 +148,7 @@ def get_ebay_data(url):
|
|
| 148 |
print(f"Critical error occurred: {e}")
|
| 149 |
|
| 150 |
# --- USAGE ---
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
|
|
|
|
|
| 148 |
print(f"Critical error occurred: {e}")
|
| 149 |
|
| 150 |
# --- USAGE ---
|
| 151 |
+
if __name__ == "__main__":
|
| 152 |
+
link = input("Enter the eBay offer link: ")
|
| 153 |
+
data = get_ebay_data(link)
|
| 154 |
+
print(json.dumps(data, indent=4, ensure_ascii=False))
|
code/web_scraper_olx.py
CHANGED
|
@@ -91,6 +91,7 @@ def get_olx_data(url):
|
|
| 91 |
|
| 92 |
|
| 93 |
# --- USAGE ---
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
|
|
|
|
|
| 91 |
|
| 92 |
|
| 93 |
# --- USAGE ---
|
| 94 |
+
if __name__ == "__main__":
|
| 95 |
+
link = input("Enter the OLX offer link: ")
|
| 96 |
+
data = get_olx_data(link)
|
| 97 |
+
print(json.dumps(data, indent=4, ensure_ascii=False))
|