parsing test
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import datetime
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import time
|
||||
@ -10,6 +11,7 @@ from selenium.webdriver.support import expected_conditions as EC
|
||||
from selenium.webdriver.firefox.options import Options
|
||||
from selenium.webdriver.firefox.service import Service
|
||||
from selenium.webdriver.support.wait import WebDriverWait
|
||||
from selenium.webdriver.remote.remote_connection import LOGGER
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
from nebula_rss import NebulaVideo
|
||||
@ -24,12 +26,18 @@ class NebulaLoader:
|
||||
):
|
||||
self.username = username
|
||||
self.password = password
|
||||
|
||||
LOGGER.setLevel(logging.FATAL)
|
||||
service = None
|
||||
if driver_path:
|
||||
service = Service(driver_path())
|
||||
service = Service(driver_path)
|
||||
options = Options()
|
||||
options.headless = True
|
||||
self.driver = webdriver.Firefox(service=service, options=options)
|
||||
self.driver = webdriver.Firefox(
|
||||
service=service,
|
||||
options=options,
|
||||
log_path=os.devnull,
|
||||
service_log_path=os.devnull)
|
||||
self.driver.implicitly_wait(10) # seconds
|
||||
|
||||
@staticmethod
|
||||
|
@ -1,6 +1,7 @@
|
||||
from dataclasses import dataclass
|
||||
import datetime
|
||||
|
||||
|
||||
@dataclass
|
||||
class NebulaVideo:
|
||||
"""Defines a video on Nebula"""
|
||||
|
Reference in New Issue
Block a user