Skip to content

Commit

Permalink
Merge pull request #683 from animeavi/master
Browse files Browse the repository at this point in the history
Update user-agents
  • Loading branch information
ArjixWasTaken committed Aug 20, 2021
2 parents ecbd22c + bb6815f commit b7812e9
Show file tree
Hide file tree
Showing 8 changed files with 133 additions and 133 deletions.
250 changes: 125 additions & 125 deletions anime_downloader/const.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion anime_downloader/downloader/SmartDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def _download(self):
headers = self.source.headers

if 'user-agent' not in headers:
headers['user-agent'] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Gecko/20100101Firefox/56.0"
headers['user-agent'] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0.1) Gecko/20100101 Firefox/88.0.1"

# This allows backwards compatible while also working with
# PySmartDl as it only passes user agent if spelled "User-Agent"
Expand Down
2 changes: 1 addition & 1 deletion anime_downloader/downloader/base_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def check_if_exists(self):
# Added Referer Header as kwik needd it.
headers = self.source.headers
if 'user-agent' not in headers:
headers['user-agent'] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Gecko/20100101Firefox/56.0"
headers['user-agent'] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0.1) Gecko/20100101 Firefox/88.0.1"

if self.source.referer:
headers['referer'] = self.source.referer
Expand Down
4 changes: 2 additions & 2 deletions anime_downloader/downloader/http_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _ranged_download(self):
url = self.source.stream_url
headers = self.source.headers
if 'user-agent' not in headers:
headers['user-agent'] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Gecko/20100101Firefox/56.0"
headers['user-agent'] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0.1) Gecko/20100101 Firefox/88.0.1"

if self.source.referer:
headers['Referer'] = self.source.referer
Expand Down Expand Up @@ -60,7 +60,7 @@ def _ranged_download(self):
def _non_range_download(self):
url = self.source.stream_url
headers = {
'user-agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Gecko/20100101Firefox/56.0"
'user-agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0.1) Gecko/20100101 Firefox/88.0.1"
}
if self.source.referer:
headers['Referer'] = self.source.referer
Expand Down
2 changes: 1 addition & 1 deletion anime_downloader/sites/erairaws.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def _get_sources(self):
headers = {
'cache-control': 'max-age=0',
'upgrade-insecure-requests': '1',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) Gecko/20100101 Firefox/56.0',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0.1) Gecko/20100101 Firefox/88.0.1',
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'sec-fetch-site': 'same-origin',
'sec-fetch-mode': 'navigate',
Expand Down
2 changes: 1 addition & 1 deletion anime_downloader/sites/putlockers.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _scrape_metadata(self):
class PutLockersEpisode(AnimeEpisode, sitename="putlockers"):
def _get_sources(self):
self.headers = {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Gecko/20100101 Firefox/56.0"}
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0.1) Gecko/20100101 Firefox/88.0.1"}
text = helpers.get(self.url).text

sources_list = []
Expand Down
2 changes: 1 addition & 1 deletion anime_downloader/sites/twistmoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class TwistMoe(Anime, sitename='twist.moe'):
@classmethod
def search(self, query):
headers = {
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.46 Safari/537.36',
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/605.1.15',
'x-access-token': '0df14814b9e590a1f26d3071a4ed7974'
}
# soup = helpers.soupify(helpers.get('https://twist.moe/', allow_redirects=True, headers=headers))
Expand Down
2 changes: 1 addition & 1 deletion anime_downloader/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def format_command(cmd, episode, file_format, speed_limit, path):
if episode.headers.get('user-agent'):
useragent = episode.headers['user-agent']
else:
useragent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36'
useragent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/605.1.15'

stream_url = episode.source().stream_url if not episode.url.startswith(
'magnet:?xt=urn:btih:') else episode.url
Expand Down

0 comments on commit b7812e9

Please sign in to comment.