move scraping functions to xvideos folder
This commit is contained in:
parent
929b33f04c
commit
ab9f048f87
|
@ -1,12 +1,8 @@
|
||||||
import axios from 'axios';
|
|
||||||
|
|
||||||
import * as cheerio from "cheerio";
|
|
||||||
|
|
||||||
import Layout from "@/components/Layout";
|
import Layout from "@/components/Layout";
|
||||||
|
|
||||||
import Home from "@/components/Pages/Home";
|
import Home from "@/components/Pages/Home";
|
||||||
|
|
||||||
import { fetchGalleryData } from '@/utils/scrape/gallery';
|
import { fetchGalleryData } from '@/utils/scrape/xvideos/gallery';
|
||||||
|
|
||||||
export default async function HomePage() {
|
export default async function HomePage() {
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import Layout from "@/components/Layout";
|
||||||
|
|
||||||
import Search from "@/components/Pages/Search";
|
import Search from "@/components/Pages/Search";
|
||||||
|
|
||||||
import { fetchGalleryData } from "@/utils/scrape/gallery";
|
import { fetchGalleryData } from "@/utils/scrape/xvideos/gallery";
|
||||||
|
|
||||||
export default async function SearchPage({ params }: { params: { query: string } }) {
|
export default async function SearchPage({ params }: { params: { query: string } }) {
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,10 @@ import Layout from "@/components/Layout";
|
||||||
|
|
||||||
import Video from "@/components/Pages/Video";
|
import Video from "@/components/Pages/Video";
|
||||||
|
|
||||||
import { fetchVideoData } from "@/utils/scrape/video";
|
|
||||||
|
|
||||||
import { decodeVideoUrlPath } from '@/utils/string';
|
import { decodeVideoUrlPath } from '@/utils/string';
|
||||||
|
|
||||||
|
import { fetchVideoData } from '@/utils/scrape/xvideos/video';
|
||||||
|
|
||||||
import { useLocale } from 'next-intl';
|
import { useLocale } from 'next-intl';
|
||||||
|
|
||||||
export default async function VideoPage({ params }: { params: { id: string } }) {
|
export default async function VideoPage({ params }: { params: { id: string } }) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { GalleryData } from '@/meta/data';
|
||||||
import axios, { AxiosError } from 'axios';
|
import axios, { AxiosError } from 'axios';
|
||||||
|
|
||||||
import * as cheerio from "cheerio";
|
import * as cheerio from "cheerio";
|
||||||
import { getHeaders } from './headers';
|
import { getHeaders } from '../headers';
|
||||||
|
|
||||||
interface FetchParams {
|
interface FetchParams {
|
||||||
baseUrl?: string
|
baseUrl?: string
|
|
@ -4,8 +4,8 @@ import { GalleryData, VideoData } from '@/meta/data';
|
||||||
import axios, { AxiosError } from 'axios';
|
import axios, { AxiosError } from 'axios';
|
||||||
|
|
||||||
import * as cheerio from "cheerio";
|
import * as cheerio from "cheerio";
|
||||||
import { findRelatedVideos, findVideoUrlInsideTagStringByFunctionNameAndExtension } from '../string';
|
import { findRelatedVideos, findVideoUrlInsideTagStringByFunctionNameAndExtension } from '../../string';
|
||||||
import { getHeaders } from './headers';
|
import { getHeaders } from '../headers';
|
||||||
|
|
||||||
interface FetchParams {
|
interface FetchParams {
|
||||||
baseUrl?: string
|
baseUrl?: string
|
Loading…
Reference in New Issue