mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
Wrapped try except for link processing
This commit is contained in:
@@ -9,6 +9,7 @@ services:
|
||||
- 'mongodb_data:/bitnami/mongodb'
|
||||
scraper:
|
||||
build: ./
|
||||
restart: always
|
||||
volumes:
|
||||
- 'sqlite_data:/sqlite'
|
||||
torrentio:
|
||||
|
||||
@@ -80,6 +80,7 @@ def process_links(links):
|
||||
print(f"Checking links...({len(links)})")
|
||||
counter = 1
|
||||
for link in links:
|
||||
try:
|
||||
print(f"Processing: {BASE_URL}{link[0]} {counter}/{len(links)}")
|
||||
req = requests.get(f"{BASE_URL}{link[0]}", headers={'User-Agent': 'Mozilla/5.0'})
|
||||
torrent_html = req.text
|
||||
@@ -134,4 +135,7 @@ def process_links(links):
|
||||
print(f"{t['title']} has no IMDB Id")
|
||||
continue
|
||||
build_and_write(t)
|
||||
except:
|
||||
counter += 1
|
||||
continue
|
||||
counter += 1
|
||||
Reference in New Issue
Block a user