Hotfix: Dependencies were missing in functions.py

This commit is contained in:
Carlos Sousa 2021-08-06 13:15:59 +02:00
parent 18e150e71a
commit d655091a36
2 changed files with 9 additions and 6 deletions

View File

@ -1,5 +1,8 @@
import mysql.connector as mariadb
import requests
import json
from time import sleep
from bs4 import BeautifulSoup
# Creates and returns a mariadb connection object
@ -176,6 +179,7 @@ def imdbscrapper(startURL, endURL):
# If a duplicate is found, skip number
if testDuplicate is False:
continue
# While made to wait if 503 code is received (too many requests)
testNext = False
while testNext == False:
@ -228,7 +232,9 @@ def imdbscrapper(startURL, endURL):
movieTable.append(dataRow)
if(data['@type'] == 'TVSeries'):
serieTable.append(dataRow)
except Exception as e:
print(e)
# Prepares the error string, then append the error list to the list of lists of errors
#errorMessage = titleFixed + " - " + str(e)
#errorRow.append(errorMessage)
@ -245,6 +251,7 @@ def imdbscrapper(startURL, endURL):
#recheckString = titleFixed + "\n"
#reCheckRow.append(recheckString)
#reCheckTable.append(reCheckRow)

View File

@ -1,14 +1,10 @@
from time import sleep
from multiprocessing import Process
import os
import time
from time import sleep
import datetime
import json
import requests
import csv
import logging
import mysql.connector as mariadb
from multiprocessing import Process
from bs4 import BeautifulSoup
import rsc.functions as scrapper
import rsc.helper as helper