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'
|
- 'mongodb_data:/bitnami/mongodb'
|
||||||
scraper:
|
scraper:
|
||||||
build: ./
|
build: ./
|
||||||
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- 'sqlite_data:/sqlite'
|
- 'sqlite_data:/sqlite'
|
||||||
torrentio:
|
torrentio:
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ def process_links(links):
|
|||||||
print(f"Checking links...({len(links)})")
|
print(f"Checking links...({len(links)})")
|
||||||
counter = 1
|
counter = 1
|
||||||
for link in links:
|
for link in links:
|
||||||
|
try:
|
||||||
print(f"Processing: {BASE_URL}{link[0]} {counter}/{len(links)}")
|
print(f"Processing: {BASE_URL}{link[0]} {counter}/{len(links)}")
|
||||||
req = requests.get(f"{BASE_URL}{link[0]}", headers={'User-Agent': 'Mozilla/5.0'})
|
req = requests.get(f"{BASE_URL}{link[0]}", headers={'User-Agent': 'Mozilla/5.0'})
|
||||||
torrent_html = req.text
|
torrent_html = req.text
|
||||||
@@ -134,4 +135,7 @@ def process_links(links):
|
|||||||
print(f"{t['title']} has no IMDB Id")
|
print(f"{t['title']} has no IMDB Id")
|
||||||
continue
|
continue
|
||||||
build_and_write(t)
|
build_and_write(t)
|
||||||
|
except:
|
||||||
|
counter += 1
|
||||||
|
continue
|
||||||
counter += 1
|
counter += 1
|
||||||
Reference in New Issue
Block a user