Skip to content

Commit

Permalink
release: v2.70.0
Browse files Browse the repository at this point in the history
  • Loading branch information
newt-sc committed Nov 16, 2021
1 parent 2bfa2b5 commit c9a0a12
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* [v2.70.0](https://github.com/a4k-openproject/a4kScrapers/releases/tag/a4kScrapers-2.70.0):
* bring back bitcq
* propagate pre-emptive termination exc from request

* [v2.69.0](https://github.com/a4k-openproject/a4kScrapers/releases/tag/a4kScrapers-2.69.0):
* change torrentz2 url
* fix piratebay matching by tv episode title
Expand Down
2 changes: 1 addition & 1 deletion meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"author": "Unknown",
"version":"2.69.0",
"version":"2.70.0",
"name":"a4kScrapers",
"update_directory": "https://github.com/a4k-openproject/a4kScrapers/archive/",
"remote_meta": "https://raw.githubusercontent.com/newt-sc/a4kScrapers/master/meta.json",
Expand Down
3 changes: 3 additions & 0 deletions providerModules/a4kScrapers/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ def _request_core(self, request, sequental = None, cf_retries=3):

if self.exc_msg == '':
exc = traceback.format_exc(limit=1)
if 'PreemptiveCancellation' in exc:
raise Exception("PreemptiveCancellation")

if 'ConnectTimeout' in exc or 'ReadTimeout' in exc:
self.exc_msg = 'request timed out'
if 'Detected the new Cloudflare challenge.' in exc and cf_retries > 0 and self.request_time < 2:
Expand Down
7 changes: 6 additions & 1 deletion providerModules/a4kScrapers/urls.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
{ "base": "https://bitsearch.to" }
]
},
"-bitcq": { "search": "", "domains": [{ "base": "" }] },
"bitcq": {
"search": "/search?q=%s&category%%5B%%5D=1",
"domains": [
{ "base": "https://bitcq.com" }
]
},
"bt4g": {
"search": "/movie/search/%s/byseeders/1",
"domains": [
Expand Down
7 changes: 7 additions & 0 deletions providers/a4kScrapers/en/torrent/bitcq.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-

from providerModules.a4kScrapers import core

class sources(core.DefaultSources):
def __init__(self, *args, **kwargs):
super(sources, self).__init__(__name__, *args, **kwargs)
2 changes: 1 addition & 1 deletion update_cached_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

torrent_scrapers = {}
for scraper in torrent_module.__all__:
if scraper in ['bitlord', 'glo', 'kickass', 'lime', 'magnetdl', 'nyaa', 'piratebay', 'solidtorrents', 'torrentapi', 'torrentdownload', 'torrentgalaxy', 'torrentparadise', 'yts']:
if scraper in ['bitcq', 'bitlord', 'glo', 'kickass', 'lime', 'magnetdl', 'nyaa', 'piratebay', 'solidtorrents', 'torrentapi', 'torrentdownload', 'torrentgalaxy', 'torrentparadise', 'torrentz2', 'yts']:
torrent_scrapers[scraper] = importlib.import_module('providers.a4kScrapers.en.torrent.%s' % scraper)

url = os.getenv('A4KSCRAPERS_TRAKT_API_URL')
Expand Down

0 comments on commit c9a0a12

Please sign in to comment.