go-jobscraper/notes.md
Martin Donnelly be500fde33 init
2024-04-26 17:13:07 +01:00

89 lines
1.2 KiB
Markdown

# Notes
- Test Link https://www.jobserve.com/MySearch/F3A56475D5FD4966.rss
LocationRegex
```regexp
[Ll]ocation:(?:<\/span>)?\n*(.*?)&nbsp;
Location:<\/strong><\/td><td width="50">&nbsp;<\/td><td>(.*?)<\/td>
```
RateRegex
```goregexp
[Rr]ate:(?:<\/span>)?\n*(.*?)&nbsp;
Rate:<\/strong><\/td><td width="50">&nbsp;<\/td><td>(.*?)<\/td>
```
Company Regex
```goregexp
Advertiser:<\/strong><\/td><td width="50">&nbsp;<\/td><td>(.*?)<\/td>
```
Location regex
```goregexp
Location:<\/strong><\/td><td width="50">&nbsp;<\/td><td>(.*?)<\/td>
```
Image regex
```goregexp
src="https:\/\/(.+?)"
```
```sqlite
-- jobs definition
CREATE TABLE "jobs" (
"_id" INTEGER NOT NULL UNIQUE,
"title" TEXT,
"site" TEXT,
"url" TEXT,
"id" TEXT UNIQUE,
"summary" TEXT,
"company" TEXT,
"location" TEXT,
"postdate" TEXT,
"salary" TEXT,
"easyapply" INTEGER,
"timestamp" INTEGER,
PRIMARY KEY("_id" AUTOINCREMENT)
);
```
```postgresql
CREATE TABLE jobs (
_id SERIAL PRIMARY KEY,
title VARCHAR,
site VARCHAR,
url VARCHAR,
id VARCHAR UNIQUE,
summary TEXT,
company VARCHAR,
location VARCHAR,
postdate VARCHAR,
salary VARCHAR,
easyapply INTEGER,
"timestamp" INTEGER
);
```