Giter Club home page Giter Club logo

anime-sraper-php's Introduction

Anime Scraper

It allows you to fetch new anime and episodes and save them in your DB

MYSQL Schema

--
-- Table structure for table `anime`
--

CREATE TABLE `anime` (
  `id` int(11) NOT NULL,
  `name` varchar(1000) DEFAULT NULL,
  `genre` text,
  `plot` text,
  `year` varchar(256) DEFAULT NULL,
  `status` varchar(256) DEFAULT NULL,
  `img_src` text,
  `category` varchar(500) DEFAULT NULL,
  `date_added` datetime DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `episodes`
--

CREATE TABLE `episodes` (
  `id` int(11) NOT NULL,
  `anime_id` int(11) DEFAULT NULL,
  `name` varchar(2000) DEFAULT NULL,
  `video_src` text,
  `download` text,
  `date_added` datetime DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------
-- Indexes for table `anime`
--
ALTER TABLE `anime`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `name` (`name`(767));

--
-- Indexes for table `episodes`
--
ALTER TABLE `episodes`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `download` (`download`(700));

Working

Install DB

cd anime-scraper-php
mysql -u root -p yourdb < dbschema.sql

Make DB connection in includes/connect.php

$db_user='';
$password='';
$database='';

$con = mysqli_connect('localhost',"$user_name","$password","$database_name");

Run scraper

 php main.php

anime-sraper-php's People

Contributors

adarsh-chouhan-au8 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

anime-sraper-php's Issues

problem

C:\xampp\htdocs>php main.php SELECT * from anime where name='Knights of the Zodiac: Saint Seiya - Battle for Sanctuary' SELECT * from anime where name='Knights of the Zodiac: Saint Seiya - Battle for Sanctuary' Fatal error: Uncaught Exception: Error description: Duplicate entry 'https://gogohd.net/download?id=MTkyNDE5&typesub=Gogoanime-SUB...' for key 'download' in query ----------------------> INSERT INTO episodes(anime_id, name, video_src, download) VALUES ('1','Knights of the Zodiac: Saint Seiya - Battle for Sanctuary Episode 9 English Subbed','[{\"name\":\"Vidstreaming\",\"links\":\"\\/\\/gogohd.net\\/streaming.php?id=MTkyNDE5&title=Knights+of+the+Zodiac%3A+Saint+Seiya+-+Battle+for+Sanctuary+Episode+9&typesub=SUB\"},{\"name\":\"Gogo server\",\"links\":\"\\/\\/gogohd.net\\/embedplus?id=MTkyNDE5&token=TT3Q0kRwfqgq3OCieZGVFQ&expires=1663553298\"},{\"name\":\"Streamsb\",\"links\":\"https:\\/\\/streamsss.net\\/e\\/b97pypgq1nmn\"},{\"name\":\"Xstreamcdn\",\"links\":\"https:\\/\\/fembed9hd.com\\/v\\/l364xunm3-66mn5\"},{\"name\":\"Doodstream\",\"links\":\"https:\\/\\/dood.wf\\/e\\/5gtge3ckmk3m\"}]','https://gogohd.net/download?id=MTkyNDE5&typesub=Gogoanime-SUB&title=Knights+of+the+Zodiac%3A+Saint+Seiya+-+Battle+for+Sanctua in C:\xampp\htdocs\includes\functions.php on line 23

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.