Update upwork_scraper.py
Browse files- upwork_scraper.py +5 -1
upwork_scraper.py
CHANGED
|
@@ -120,8 +120,12 @@ def fetch_upwork_jobs():
|
|
| 120 |
|
| 121 |
# Clean up Upwork Link
|
| 122 |
job_link = entry.link
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
if hasattr(entry, 'guid'):
|
| 124 |
-
# GUID often contains the jobId (~01...)
|
| 125 |
guid_match = re.search(r'~(01[a-z0-9]+)', entry.guid)
|
| 126 |
if guid_match:
|
| 127 |
job_link = f"https://www.upwork.com/jobs/~{guid_match.group(1)}"
|
|
|
|
| 120 |
|
| 121 |
# Clean up Upwork Link
|
| 122 |
job_link = entry.link
|
| 123 |
+
# Strip RSS tracking parameters if present
|
| 124 |
+
if "?" in job_link:
|
| 125 |
+
job_link = job_link.split("?")[0]
|
| 126 |
+
|
| 127 |
+
# If it's a generic RSS link, try to find the specific Job hash
|
| 128 |
if hasattr(entry, 'guid'):
|
|
|
|
| 129 |
guid_match = re.search(r'~(01[a-z0-9]+)', entry.guid)
|
| 130 |
if guid_match:
|
| 131 |
job_link = f"https://www.upwork.com/jobs/~{guid_match.group(1)}"
|