Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature scraper #93

Open
wants to merge 155 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
eed5bcd
tests: changed integration tests
lesedimotoma Aug 10, 2021
ca3d1cb
tests: fixed axios not a function error
lesedimotoma Aug 11, 2021
881a229
feat:added a module to ping th e scraper.
MkSibeko Aug 17, 2021
49c84f9
chore: merged changes
lesedimotoma Aug 26, 2021
7f6c437
refactor: added brand precondition to title parser
lesedimotoma Aug 27, 2021
a0bbee6
refactor: changed dreamware title selector
lesedimotoma Aug 27, 2021
d3359f9
feat: manufactures urls
MkSibeko Aug 27, 2021
43705a0
feat: manufactures urls
MkSibeko Aug 27, 2021
93e0815
Merge branch 'feature-scraper-descriptions' of github.com:COS301-SE-2…
lesedimotoma Aug 27, 2021
6a7e048
feat: added sapphire url creator function
lesedimotoma Aug 27, 2021
f7176c1
feat: added amd url function
lesedimotoma Aug 27, 2021
0af6250
feat: added url function for cpu
lesedimotoma Aug 27, 2021
5f05e4d
fix: fixed config for different gpus
lesedimotoma Aug 27, 2021
724f8cf
refactor: added url for workstation graphics
lesedimotoma Aug 27, 2021
fa4a40b
refactor: removed log
lesedimotoma Aug 27, 2021
dd2e7da
refactor: removed log
lesedimotoma Aug 27, 2021
8ccf0f8
feat: created a description selector class
MkSibeko Aug 27, 2021
f561d6d
feat: add amd selector class
MkSibeko Aug 27, 2021
ce713a7
feat: add nvidia selector class
MkSibeko Aug 27, 2021
e1eccd9
feat: add nvidia selector class
MkSibeko Aug 27, 2021
9cd2b02
feat: added sapphire selector class
MkSibeko Aug 27, 2021
327e5d4
feat: added sapphire selector class
MkSibeko Aug 27, 2021
f28cae4
feat: added sapphire selector class
MkSibeko Aug 27, 2021
0af4d8c
feat: making manufacture's selector objects
MkSibeko Aug 27, 2021
b69f376
feat: making manufacture's selector objects
MkSibeko Aug 27, 2021
9673855
feat: making manufacture's selector objects
MkSibeko Aug 27, 2021
231361d
comments on the descriptions
MkSibeko Aug 27, 2021
87b700e
fix: changed the return type of the get url functions for the manufac…
MkSibeko Aug 27, 2021
84180d4
feat: added a get description function
MkSibeko Aug 27, 2021
98ca184
feat: scraping the manufactures for descriptions
MkSibeko Aug 27, 2021
2473aa2
feat: scraping the manufactures for descriptions
MkSibeko Aug 27, 2021
4a60541
feat: scraping the manufactures for descriptions
MkSibeko Aug 27, 2021
4a8eda3
feat: scraping the manufactures for descriptions
MkSibeko Aug 27, 2021
cc76d5a
feat: scraping the manufactures for descriptions
MkSibeko Aug 27, 2021
27f28da
feat: parse the descriptions array into a key value pair object
MkSibeko Aug 27, 2021
d9a8a13
feat: parse the descriptions array into a key value pair object
MkSibeko Aug 27, 2021
7830234
feat: parse the descriptions array into a key value pair object
MkSibeko Aug 27, 2021
3b86d39
feat: parse the descriptions array into a key value pair object
MkSibeko Aug 27, 2021
a6dbd8a
feat: parse the descriptions array into a key value pair object
MkSibeko Aug 27, 2021
112cd4d
feat: parse the descriptions array into a key value pair object
MkSibeko Aug 27, 2021
6ae16db
feat: parse the descriptions array into a key value pair object
MkSibeko Aug 27, 2021
7435d94
refactor: added condition for workstation cards url
lesedimotoma Aug 27, 2021
a362a17
feat: parse the descriptions array into a key value pair object
MkSibeko Aug 27, 2021
ef57b83
fix: fixed nvidia url
lesedimotoma Aug 27, 2021
c236fc7
fix: fixed pro graphics url
lesedimotoma Aug 27, 2021
e822bbd
feat: add intel base url
lesedimotoma Aug 27, 2021
7eaef0f
Merge branch 'feature-scraper-descriptions' of github.com:COS301-SE-2…
lesedimotoma Aug 27, 2021
ad59305
fit: added a type param to the descriptions parser
MkSibeko Aug 27, 2021
65f64fe
feat: implementing conditional parsing according to the manufacture
MkSibeko Aug 27, 2021
2ab3abe
fit: differentiated between ti and noneti models
MkSibeko Aug 27, 2021
6cd5ae8
fit: added the rest of the manufactures
MkSibeko Aug 27, 2021
e95514d
Merge remote-tracking branch 'origin/feature-scraper-descriptions' in…
MkSibeko Aug 27, 2021
7286f8d
feat: add intel base url
lesedimotoma Aug 28, 2021
84bf71d
feat: add intel base url
lesedimotoma Aug 28, 2021
50d0466
Merge branch 'feature-scraper-descriptions' of github.com:COS301-SE-2…
lesedimotoma Aug 28, 2021
ad3feb6
feat: created intel search urls
lesedimotoma Aug 28, 2021
36486f0
feat: created intel search urls
lesedimotoma Aug 28, 2021
1b4d7d2
feat: adding conditional description assignments due to the different…
MkSibeko Aug 28, 2021
3b21333
feat: adding conditional description assignments due to the different…
MkSibeko Aug 28, 2021
6a16f30
feat: adding conditional description assignments due to the different…
MkSibeko Aug 28, 2021
bbe418d
feat: adding conditional description assignments due to the different…
MkSibeko Aug 28, 2021
5596820
feat: adding conditional description assignments due to the different…
MkSibeko Aug 28, 2021
9726a37
feat: adding conditional description assignments due to the different…
MkSibeko Aug 28, 2021
23c8098
feat: adding conditional description assignments due to the different…
MkSibeko Aug 28, 2021
dab6ef9
feat: implemented the intel selector
MkSibeko Aug 28, 2021
94d3f2e
feat: implemented the intel selector
MkSibeko Aug 28, 2021
748e9c6
feat: implemented the intel selector
MkSibeko Aug 28, 2021
3a9cc6b
feat: implemented the intel selector
MkSibeko Aug 28, 2021
cb779c9
feat: implemented the intel selector
MkSibeko Aug 28, 2021
1211bfd
chor: simplified the description scraper
MkSibeko Aug 28, 2021
d082cdb
chor: simplified the description scraper
MkSibeko Aug 28, 2021
7d6efc8
chor: simplified the description scraper
MkSibeko Aug 28, 2021
d5de520
chor: simplified the description scraper
MkSibeko Aug 28, 2021
d989ee0
fix: updated the description type from string to dynamic object
MkSibeko Aug 28, 2021
18b6418
fix: constant variable naming implemented in the parser module
MkSibeko Aug 28, 2021
b5112a3
chor: general cleaning up codebase and structure
MkSibeko Aug 28, 2021
3d186b2
fix: fixed title parser for intel processors
lesedimotoma Aug 29, 2021
59d1b5f
fix: fixed title parser for intel processors
lesedimotoma Aug 29, 2021
a612919
refactor: remove statement in title parser causing errors
lesedimotoma Aug 29, 2021
e60cff3
refactor: remove statement in title parser causing errors
lesedimotoma Aug 29, 2021
cf15368
feat: added conditions for edge cases
lesedimotoma Aug 29, 2021
fda1d24
feat: added conditions for edge cases
lesedimotoma Aug 29, 2021
f293f4f
feat: added conditions for edge cases
lesedimotoma Aug 29, 2021
9333957
refactor: changed selectors
lesedimotoma Aug 29, 2021
70d4be8
re: changed scraping method for dynamic websites
MkSibeko Aug 30, 2021
47e6229
refactor: changed selectors
lesedimotoma Aug 30, 2021
77ab974
Merge branch 'feature-scraper-descriptions' of github.com:COS301-SE-2…
lesedimotoma Aug 30, 2021
eedb199
refactor: page evaluation function
lesedimotoma Sep 6, 2021
92c1e41
refactor: added parameter to page fucntion
lesedimotoma Sep 6, 2021
152b066
refactor: changed page evaluation function
lesedimotoma Sep 6, 2021
866f3be
refactor: changed selector
lesedimotoma Sep 6, 2021
6d77031
refactor: changed page evaluation function
lesedimotoma Sep 6, 2021
5915055
refactor: changed page evaluation function
lesedimotoma Sep 6, 2021
270d6d3
refactor: changed evaluation function parameters
lesedimotoma Sep 6, 2021
4c8cf9b
refactor: changed evaluation function parameters
lesedimotoma Sep 6, 2021
66b7f70
chore: cleaned up code
lesedimotoma Sep 6, 2021
54aa8a2
test: added description tests
lesedimotoma Sep 9, 2021
1f796cb
test: added parser tests
lesedimotoma Sep 9, 2021
91ba463
chore: added comments
lesedimotoma Sep 9, 2021
a86f90e
refactor: changed amd urls
lesedimotoma Sep 10, 2021
cdbaa4a
refactor: changed amd urls
lesedimotoma Sep 10, 2021
c30c8df
refactor: changed intel selectors
lesedimotoma Sep 14, 2021
84bcd91
refactor: changed intel selectors
lesedimotoma Sep 14, 2021
06ba580
feat: added intel search query
lesedimotoma Sep 14, 2021
9170a35
refactor: changed if condition
lesedimotoma Sep 15, 2021
860e571
refactor: added function to expose selector variable
lesedimotoma Sep 15, 2021
05b56e3
refactor: fixed page evalute function
lesedimotoma Sep 15, 2021
efad839
refactor: fixed page evalute function
lesedimotoma Sep 15, 2021
3f6406a
refactor: moved content to separate function
lesedimotoma Sep 16, 2021
2736e5d
refactor: changed page evalute function
lesedimotoma Sep 17, 2021
e361d48
fix: updated title parser
Sep 18, 2021
68f2f70
fix: fixed title parser
lesedimotoma Sep 18, 2021
d828623
refactor: changed url
lesedimotoma Sep 18, 2021
5baddbf
fix: fixed manufacture url
lesedimotoma Sep 18, 2021
9fac6e5
fix: fixed manufacture url
lesedimotoma Sep 18, 2021
4b4c618
fix: fixed manufacture url
lesedimotoma Sep 18, 2021
b3a0ee4
refactor: trimmed title
lesedimotoma Sep 19, 2021
a021816
feat : scrape descriptions
MkSibeko Sep 19, 2021
3e73875
chore: removed console log
lesedimotoma Sep 19, 2021
4d73957
Merge branch 'feature-scraper-descriptions' of github.com:COS301-SE-2…
lesedimotoma Sep 19, 2021
314a628
ffix: fixed title parser
lesedimotoma Sep 19, 2021
5a0d081
fix: fixed descriptions
lesedimotoma Sep 20, 2021
c573187
fix: fixed selectors
lesedimotoma Sep 20, 2021
b500ba2
fix: fixed descriptions
lesedimotoma Sep 20, 2021
b65b7bf
fix: fixed descriptions
lesedimotoma Sep 20, 2021
9fbcf36
chore: removed file
lesedimotoma Sep 20, 2021
2e004b6
Merge pull request #92 from COS301-SE-2021/feature-scraper-descriptions
lesedimotoma Oct 5, 2021
f24aee6
fix: fixed tests
lesedimotoma Oct 5, 2021
5d54cc3
Merge branch 'feature-scraper' of github.com:COS301-SE-2021/Silicon-S…
lesedimotoma Oct 5, 2021
e4355cc
chore: removed file
lesedimotoma Oct 5, 2021
5f901ba
fix: fixed install issues
lesedimotoma Oct 5, 2021
7ec60a5
fix: fixed spelling in product model
lesedimotoma Oct 5, 2021
226c6e7
fix: fixed import issues
lesedimotoma Oct 5, 2021
361a6a5
tests: added puppeteer mocks
lesedimotoma Oct 5, 2021
9610c48
chore: changed jest config
lesedimotoma Oct 5, 2021
e1a29dd
chore: installed types
lesedimotoma Oct 5, 2021
66bb654
chore: installed types
lesedimotoma Oct 5, 2021
41a6936
chore: installed types
lesedimotoma Oct 5, 2021
159f379
chore - installed types
MkSibeko Oct 6, 2021
1f36cf6
chore - installed types
MkSibeko Oct 6, 2021
1875235
chore - installed types
MkSibeko Oct 6, 2021
3e4a253
chore - installed types
MkSibeko Oct 6, 2021
2f03ab2
chore - installed types
MkSibeko Oct 6, 2021
36a1083
chore - installed types
MkSibeko Oct 6, 2021
42a8f86
chore - installed types
MkSibeko Oct 6, 2021
f8ddef0
chore - installed types
MkSibeko Oct 6, 2021
d08f541
chore: updated dependencies
lesedimotoma Oct 6, 2021
ebd9b32
chore: updated dependencies
lesedimotoma Oct 6, 2021
95a0969
chore: updated dependencies
lesedimotoma Oct 6, 2021
f0ff0d1
chore: updated dependencies
lesedimotoma Oct 6, 2021
977e2b9
test: fixed test conditions
lesedimotoma Oct 6, 2021
bdffc0d
fix: fixed test config
lesedimotoma Oct 6, 2021
e49782d
tests: fixed tests
lesedimotoma Oct 6, 2021
631f442
Merge branch 'feature-scraper' of github.com:COS301-SE-2021/Silicon-S…
lesedimotoma Oct 6, 2021
1835ccf
tests: fixed tests
lesedimotoma Oct 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
.buildlog/
.history
.svn/
*.egg-info
venv/
*.pytest_cache
*/__pycache__

# IntelliJ related
*.iml
Expand Down Expand Up @@ -36,6 +40,7 @@ coverage/

#database
.env
*.ini

#typescript
backend/scraper/dist/
Expand Down
Binary file added backend/ai/dist/api-0.0.0-py3-none-any.whl
Binary file not shown.
2 changes: 1 addition & 1 deletion backend/scraper/__mocks__/mockUrl.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

export const getMockData = () => {
export const getMockData = (): string => {

return "<table id=\"ctl00_ContentPlaceHolder1_Component_List_V2_IDs1_dl_products\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse;\">\n" +
" <tbody><tr>\n" +
Expand Down
26 changes: 26 additions & 0 deletions backend/scraper/__mocks__/puppeteerMocks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {Page, Browser} from 'puppeteer'

export const stubPuppeteer = {
launch() {
return Promise.resolve(stubBrowser)
}
} as unknown as any

export const stubBrowser = {
newPage() {
return Promise.resolve(stubPage)
},
close() {
return Promise.resolve()
}
} as unknown as Browser

export const stubPage = {
goto(url: string) {
return Promise.resolve()
},
content() {
return Promise.resolve('')
}

} as unknown as Page
2 changes: 1 addition & 1 deletion backend/scraper/__mocks__/urlMock.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const url = require("../src/utilities/url")
import * as url from "../src/utilities/url"
import { getEveTecGpuUrl } from "../src/utilities/url"
import { mockFunction } from "./JestHelpers"

Expand Down
Loading