File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,9 @@ export const getWorldChampions = async (): Promise<isHallOfFame[]> => {
12
12
const response = await axios ( staticLinks . hallOfFame ) ;
13
13
const $ = cheerio . load ( response . data ) ;
14
14
15
- $ ( "div.grid:nth-child(2) > a " ) . each ( function ( ) {
16
- const name : string = $ ( this ) . find ( "figure :nth-child(1 ) > figcaption:nth-child(2) > p:nth-child(1) " ) . text ( ) . trim ( ) ;
17
- const driver_image : string | undefined = $ ( this ) . find ( "figure :nth-child(1) > picture:nth-child(1) > img:nth-child(1) " ) . attr ( "src" ) ;
15
+ $ ( "div.grid:nth-child(2) > span " ) . each ( function ( ) {
16
+ const name : string = $ ( this ) . find ( "span :nth-child(2 ) > a > span " ) . text ( ) . trim ( ) ;
17
+ const driver_image : string | undefined = $ ( this ) . find ( "span :nth-child(1) > span > img" ) . attr ( "src" ) ;
18
18
19
19
if ( name . length !== 0 && driver_image ?. length !== 0 ) {
20
20
const worldChampion : isHallOfFame = {
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ export { getFastestLaps } from "./scraper/fastest-laps";
2
2
export { getDriverLineup } from "./scraper/driver-lineup" ;
3
3
export { getTeamLineup } from "./scraper/team-lineup" ;
4
4
export { getDriverStandings } from "./scraper/driver-standings" ;
5
- // export { getConstructorStandings } from "./scraper/constructors-standings";
6
- // export { getWorldChampions } from "./scraper/world-champions";
5
+ export { getConstructorStandings } from "./scraper/constructors-standings" ;
6
+ export { getWorldChampions } from "./scraper/world-champions" ;
7
7
// export { getRaceResults } from "./scraper/race-results";
8
8
// export { getRaceSchedule } from "./scraper/race-schedule";
You can’t perform that action at this time.
0 commit comments