├── animepahe
├── animepahe-rss.xml
└── generate.py
├── gogoanime
├── gogoanime-rss-sub.xml
├── gogoanime-rss-dub.xml
├── gogoanime-rss-chinese.xml
└── generate.py
├── requirements.txt
├── LICENCE
├── README.md
└── .github
└── workflows
└── generate-rss.yml
/animepahe/animepahe-rss.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/gogoanime/gogoanime-rss-sub.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | requests
2 | bs4
--------------------------------------------------------------------------------
/LICENCE:
--------------------------------------------------------------------------------
1 | The Don't Ask Me About It License
2 |
3 | Copying and distribution of this file, with or without modification, are permitted in any medium provided you do not contact the author about the file or any problems you are having with the file
4 |
--------------------------------------------------------------------------------
/gogoanime/gogoanime-rss-dub.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Gogoanime (Dub) - RSS Feed
6 | https://github.com/ArjixGamer/anime-rss
7 | A simple RSS feed for gogoanime!
8 |
9 |
10 |
--------------------------------------------------------------------------------
/gogoanime/gogoanime-rss-chinese.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Gogoanime (Chinese) - RSS Feed
6 | https://github.com/ArjixGamer/anime-rss
7 | A simple RSS feed for gogoanime!
8 |
9 |
10 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # anime-rss
2 | A simple rss feed for gogoanime, animepahe and any other anime site i decide to add
3 |
4 |
5 | Just grab the raw link to a feed and put it into ur rss reader or whatever
6 |
7 |
8 | for example the link to the latest sub episodes for gogoanime is ``https://raw.githubusercontent.com/ArjixGamer/gogoanime-rss/main/gogoanime/gogoanime-rss-sub.xml``
9 |
10 | figure out the rest on ur own
11 |
12 | Note:
13 |
14 | it auto updates every hour
15 |
16 |
17 |
18 | ## Sites
19 |
20 | * GogoAnime
21 | * AnimePahe
22 | * and many more to come soon...
23 |
--------------------------------------------------------------------------------
/.github/workflows/generate-rss.yml:
--------------------------------------------------------------------------------
1 | name: Generate rss feeds
2 |
3 | on:
4 | push:
5 | schedule:
6 | - cron: "*/15 * * * *"
7 |
8 | jobs:
9 | build:
10 | name: Run
11 |
12 | runs-on: ubuntu-latest
13 | strategy:
14 | matrix:
15 | python-version: [3.8]
16 |
17 |
18 | steps:
19 | - uses: actions/checkout@v2
20 | - name: Set up Python ${{ matrix.python-version }}
21 | uses: actions/setup-python@v2
22 | with:
23 | python-version: ${{ matrix.python-version }}
24 | - name: Install dependencies
25 | run: |
26 | python -m pip install --upgrade pip
27 | python -m pip install -r requirements.txt
28 |
29 | - name: Generate rss (GogoAnime)
30 | run: |
31 | python ./gogoanime/generate.py
32 |
33 | - name: Generate rss (AnimePahe)
34 | run: |
35 | python ./animepahe/generate.py
36 |
37 | - uses: stefanzweifel/git-auto-commit-action@v4
38 | with:
39 | # Optional but recommended
40 | # Defaults to "Apply automatic changes"
41 | commit_message: Apply automatic changes
42 |
43 | file_pattern: ./*.xml
44 |
45 | # Optional local file path to the repository
46 | # Defaults to the root of the repository
47 | repository: .
48 |
49 | # Optional: Skip internal call to `git fetch`
50 | skip_fetch: true
51 |
--------------------------------------------------------------------------------
/animepahe/generate.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import json
3 | import re
4 | import os
5 |
6 |
7 | def get_latest():
8 | link = 'https://animepahe.com/api?m=airing&page=1'
9 |
10 | response = requests.get(link, headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36"}).json()
11 |
12 | return [
13 | [
14 | '{}/{}'.format(x['anime_session'], x['session']),
15 | x['episode'],
16 | x['anime_title']
17 | ] for x in response['data']
18 | ]
19 |
20 |
21 | def generate_rss():
22 | rss = f"""
23 |
24 |
25 |
26 |
27 | AnimePahe - RSS Feed
28 | https://github.com/ArjixGamer/anime-rss
29 | A simple RSS feed for animepahe!
30 | """
31 |
32 | for item in get_latest():
33 | rss += """
34 | -
35 | {}
36 | {}
37 | {}
38 |
39 | """.format(f"{item[2]} - Episode {item[1]}", "https://animepahe.com/play/" + item[0], f"Episode {item[1]} of {item[2]} is out!")
40 |
41 | rss += '\n\n'
42 | return rss
43 |
44 |
45 | try:
46 | filename = f'./animepahe/animepahe-rss.xml'
47 | if os.path.exists(filename):
48 | os.remove(filename)
49 | with open(filename, 'w') as f:
50 | f.write(generate_rss().strip())
51 | except:
52 | print('Animepahe failed.')
--------------------------------------------------------------------------------
/gogoanime/generate.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import re
3 | import os
4 |
5 |
6 | def get_latest_by_type(type=1):
7 | headers = {
8 | 'authority': 'ajax.gogo-load.com',
9 | 'sec-ch-ua': '"Google Chrome";v="89", "Chromium";v="89", ";Not A Brand";v="99"',
10 | 'accept': 'text/html, */*; q=0.01',
11 | 'dnt': '1',
12 | 'sec-ch-ua-mobile': '?0',
13 | 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36',
14 | 'origin': 'https://gogoanime.vc',
15 | 'sec-fetch-site': 'cross-site',
16 | 'sec-fetch-mode': 'cors',
17 | 'sec-fetch-dest': 'empty',
18 | 'referer': 'https://gogoanime.vc/',
19 | }
20 |
21 | params = (
22 | ('page', '1'),
23 | ('type', str(type)),
24 | )
25 |
26 | response = requests.get(
27 | 'https://ajax.gogo-load.com/ajax/page-recent-release.html', headers=headers, params=params).text
28 |
29 | regex = r"
\s*\n.*\n.*.*?-episode-(?P\d+))[\"']\s*title=[\"'](?P.*?)[\"']"
30 | matches = list(re.findall(regex, response, re.MULTILINE))
31 | return matches
32 |
33 |
34 | def generate_rss_by_type(type=1):
35 | types = ['(Sub)', '(Dub)', '(Chinese)']
36 | rss = f"""
37 |
38 |
39 |
40 |
41 | Gogoanime {types[type-1]} - RSS Feed
42 | https://github.com/ArjixGamer/anime-rss
43 | A simple RSS feed for gogoanime!
44 | """
45 |
46 | for item in get_latest_by_type(type):
47 | rss += """
48 | -
49 | {}
50 | {}
51 | {}
52 |
53 | """.format(f"{item[2]} - Episode {item[1]}", "https://gogoanime.vc" + item[0], f"Episode {item[1]} of {item[2]} is out!")
54 |
55 | rss += '\n\n'
56 | return rss
57 |
58 |
59 | types = {
60 | 'sub': 1,
61 | 'dub': 2,
62 | 'chinese': 3
63 | }
64 |
65 |
66 | try:
67 | for type_ in types:
68 | filename = f'./gogoanime/gogoanime-rss-{type_}.xml'
69 | if os.path.exists(filename):
70 | os.remove(filename)
71 | with open(filename, 'w') as f:
72 | f.write(generate_rss_by_type(types[type_]).strip())
73 | except:
74 | print('GogoAnime failed.')
--------------------------------------------------------------------------------