uk_bin_collection 0.74.1__py3-none-any.whl → 0.75.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- uk_bin_collection/tests/test_common_functions.py +1 -1
- uk_bin_collection/uk_bin_collection/common.py +4 -1
- uk_bin_collection/uk_bin_collection/councils/ArunCouncil.py +6 -5
- uk_bin_collection/uk_bin_collection/councils/BarnetCouncil.py +2 -3
- uk_bin_collection/uk_bin_collection/councils/BexleyCouncil.py +5 -5
- uk_bin_collection/uk_bin_collection/councils/BlackburnCouncil.py +7 -5
- uk_bin_collection/uk_bin_collection/councils/BoltonCouncil.py +5 -4
- uk_bin_collection/uk_bin_collection/councils/BrightonandHoveCityCouncil.py +10 -10
- uk_bin_collection/uk_bin_collection/councils/BromleyBoroughCouncil.py +6 -6
- uk_bin_collection/uk_bin_collection/councils/BroxtoweBoroughCouncil.py +1 -1
- uk_bin_collection/uk_bin_collection/councils/BuckinghamshireCouncil.py +3 -2
- uk_bin_collection/uk_bin_collection/councils/CalderdaleCouncil.py +9 -10
- uk_bin_collection/uk_bin_collection/councils/ChelmsfordCityCouncil.py +10 -10
- uk_bin_collection/uk_bin_collection/councils/CheshireWestAndChesterCouncil.py +35 -11
- uk_bin_collection/uk_bin_collection/councils/ChorleyCouncil.py +2 -1
- uk_bin_collection/uk_bin_collection/councils/DerbyshireDalesDistrictCouncil.py +1 -1
- uk_bin_collection/uk_bin_collection/councils/EastLindseyDistrictCouncil.py +1 -1
- uk_bin_collection/uk_bin_collection/councils/EastRidingCouncil.py +6 -7
- uk_bin_collection/uk_bin_collection/councils/EastSuffolkCouncil.py +3 -2
- uk_bin_collection/uk_bin_collection/councils/ForestOfDeanDistrictCouncil.py +5 -5
- uk_bin_collection/uk_bin_collection/councils/GatesheadCouncil.py +1 -1
- uk_bin_collection/uk_bin_collection/councils/GuildfordCouncil.py +10 -10
- uk_bin_collection/uk_bin_collection/councils/HaltonBoroughCouncil.py +5 -4
- uk_bin_collection/uk_bin_collection/councils/HighPeakCouncil.py +1 -1
- uk_bin_collection/uk_bin_collection/councils/KingstonUponThamesCouncil.py +6 -4
- uk_bin_collection/uk_bin_collection/councils/KirkleesCouncil.py +1 -1
- uk_bin_collection/uk_bin_collection/councils/KnowsleyMBCouncil.py +4 -3
- uk_bin_collection/uk_bin_collection/councils/LeedsCityCouncil.py +6 -7
- uk_bin_collection/uk_bin_collection/councils/LondonBoroughRedbridge.py +10 -10
- uk_bin_collection/uk_bin_collection/councils/MidAndEastAntrimBoroughCouncil.py +4 -3
- uk_bin_collection/uk_bin_collection/councils/NeathPortTalbotCouncil.py +2 -1
- uk_bin_collection/uk_bin_collection/councils/NorthEastDerbyshireDistrictCouncil.py +3 -3
- uk_bin_collection/uk_bin_collection/councils/NorthNorfolkDistrictCouncil.py +1 -1
- uk_bin_collection/uk_bin_collection/councils/NorthWestLeicestershire.py +4 -4
- uk_bin_collection/uk_bin_collection/councils/NorthumberlandCouncil.py +2 -2
- uk_bin_collection/uk_bin_collection/councils/PortsmouthCityCouncil.py +4 -4
- uk_bin_collection/uk_bin_collection/councils/PrestonCityCouncil.py +4 -4
- uk_bin_collection/uk_bin_collection/councils/ReigateAndBansteadBoroughCouncil.py +1 -1
- uk_bin_collection/uk_bin_collection/councils/RenfrewshireCouncil.py +1 -1
- uk_bin_collection/uk_bin_collection/councils/RushcliffeBoroughCouncil.py +1 -1
- uk_bin_collection/uk_bin_collection/councils/SevenoaksDistrictCouncil.py +4 -4
- uk_bin_collection/uk_bin_collection/councils/StaffordshireMoorlandsDistrictCouncil.py +1 -1
- uk_bin_collection/uk_bin_collection/councils/SunderlandCityCouncil.py +4 -4
- uk_bin_collection/uk_bin_collection/councils/WakefieldCityCouncil.py +1 -1
- uk_bin_collection/uk_bin_collection/councils/WestBerkshireCouncil.py +1 -4
- uk_bin_collection/uk_bin_collection/councils/WestLothianCouncil.py +1 -1
- {uk_bin_collection-0.74.1.dist-info → uk_bin_collection-0.75.0.dist-info}/METADATA +1 -1
- {uk_bin_collection-0.74.1.dist-info → uk_bin_collection-0.75.0.dist-info}/RECORD +51 -51
- {uk_bin_collection-0.74.1.dist-info → uk_bin_collection-0.75.0.dist-info}/LICENSE +0 -0
- {uk_bin_collection-0.74.1.dist-info → uk_bin_collection-0.75.0.dist-info}/WHEEL +0 -0
- {uk_bin_collection-0.74.1.dist-info → uk_bin_collection-0.75.0.dist-info}/entry_points.txt +0 -0
@@ -4,14 +4,16 @@
|
|
4
4
|
|
5
5
|
# switched to using Selenium as the htmx elements are not rendered reliably with requests
|
6
6
|
|
7
|
+
import re
|
8
|
+
|
9
|
+
from bs4 import BeautifulSoup
|
7
10
|
from selenium import webdriver
|
8
11
|
from selenium.webdriver.common.by import By
|
9
|
-
from selenium.webdriver.support.ui import WebDriverWait
|
10
12
|
from selenium.webdriver.support import expected_conditions as EC
|
11
|
-
from
|
13
|
+
from selenium.webdriver.support.ui import WebDriverWait
|
14
|
+
|
12
15
|
from uk_bin_collection.uk_bin_collection.common import *
|
13
16
|
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass
|
14
|
-
import re
|
15
17
|
|
16
18
|
|
17
19
|
# import the wonderful Beautiful Soup and the URL grabber
|
@@ -29,7 +31,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
29
31
|
|
30
32
|
headless = kwargs.get("headless")
|
31
33
|
web_driver = kwargs.get("web_driver")
|
32
|
-
driver = create_webdriver(web_driver, headless)
|
34
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
33
35
|
driver.get(kwargs.get("url"))
|
34
36
|
wait = WebDriverWait(driver, 15, 2)
|
35
37
|
|
@@ -61,7 +61,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
61
61
|
user_postcode = kwargs["postcode"]
|
62
62
|
|
63
63
|
self._driver = driver = create_webdriver(
|
64
|
-
web_driver=kwargs["web_driver"], headless=kwargs.get("headless", True)
|
64
|
+
web_driver=kwargs["web_driver"], headless=kwargs.get("headless", True), session_name=__name__
|
65
65
|
)
|
66
66
|
driver.implicitly_wait(1)
|
67
67
|
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import time
|
2
2
|
|
3
3
|
from bs4 import BeautifulSoup
|
4
|
-
from uk_bin_collection.uk_bin_collection.common import *
|
5
|
-
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass
|
6
4
|
from selenium.webdriver.common.by import By
|
7
5
|
from selenium.webdriver.support import expected_conditions as EC
|
8
6
|
from selenium.webdriver.support.ui import Select
|
9
7
|
from selenium.webdriver.support.wait import WebDriverWait
|
10
8
|
|
9
|
+
from uk_bin_collection.uk_bin_collection.common import *
|
10
|
+
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass
|
11
|
+
|
11
12
|
|
12
13
|
# import the wonderful Beautiful Soup and the URL grabber
|
13
14
|
class CouncilClass(AbstractGetBinDataClass):
|
@@ -30,7 +31,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
30
31
|
check_postcode(user_postcode)
|
31
32
|
|
32
33
|
# Create Selenium webdriver
|
33
|
-
driver = create_webdriver(web_driver, headless)
|
34
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
34
35
|
driver.get(
|
35
36
|
"https://knowsleytransaction.mendixcloud.com/link/youarebeingredirected?target=bincollectioninformation"
|
36
37
|
)
|
@@ -1,17 +1,16 @@
|
|
1
|
+
import urllib.request
|
1
2
|
from datetime import datetime
|
2
|
-
from uk_bin_collection.uk_bin_collection.common import *
|
3
|
-
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass
|
4
3
|
|
4
|
+
import pandas as pd
|
5
5
|
from bs4 import BeautifulSoup
|
6
|
-
from datetime import datetime
|
7
6
|
from selenium.webdriver.common.by import By
|
7
|
+
from selenium.webdriver.common.keys import Keys
|
8
8
|
from selenium.webdriver.support import expected_conditions as EC
|
9
9
|
from selenium.webdriver.support.ui import Select
|
10
10
|
from selenium.webdriver.support.wait import WebDriverWait
|
11
|
-
from selenium.webdriver.common.keys import Keys
|
12
11
|
|
13
|
-
|
14
|
-
import
|
12
|
+
from uk_bin_collection.uk_bin_collection.common import *
|
13
|
+
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass
|
15
14
|
|
16
15
|
|
17
16
|
class CouncilClass(AbstractGetBinDataClass):
|
@@ -37,7 +36,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
37
36
|
# Create Selenium webdriver
|
38
37
|
page = f"https://www.leeds.gov.uk/residents/bins-and-recycling/check-your-bin-day"
|
39
38
|
|
40
|
-
driver = create_webdriver(web_driver, headless)
|
39
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
41
40
|
driver.get(page)
|
42
41
|
|
43
42
|
wait = WebDriverWait(driver, 60)
|
@@ -1,19 +1,19 @@
|
|
1
|
-
import re
|
2
|
-
import requests
|
3
|
-
from bs4 import BeautifulSoup
|
4
|
-
|
5
|
-
from uk_bin_collection.uk_bin_collection.common import *
|
6
|
-
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass
|
7
|
-
|
8
1
|
# This script pulls (in one hit) the data from Bromley Council Bins Data
|
9
2
|
import datetime
|
3
|
+
import re
|
4
|
+
import time
|
10
5
|
from datetime import datetime
|
6
|
+
|
7
|
+
import requests
|
8
|
+
from bs4 import BeautifulSoup
|
11
9
|
from selenium.webdriver.common.by import By
|
10
|
+
from selenium.webdriver.common.keys import Keys
|
12
11
|
from selenium.webdriver.support import expected_conditions as EC
|
13
12
|
from selenium.webdriver.support.ui import Select
|
14
13
|
from selenium.webdriver.support.wait import WebDriverWait
|
15
|
-
|
16
|
-
import
|
14
|
+
|
15
|
+
from uk_bin_collection.uk_bin_collection.common import *
|
16
|
+
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass
|
17
17
|
|
18
18
|
|
19
19
|
# import the wonderful Beautiful Soup and the URL grabber
|
@@ -34,7 +34,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
34
34
|
postcode = kwargs.get("postcode")
|
35
35
|
web_driver = kwargs.get("web_driver")
|
36
36
|
headless = kwargs.get("headless")
|
37
|
-
driver = create_webdriver(web_driver, headless)
|
37
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
38
38
|
driver.get(kwargs.get("url"))
|
39
39
|
|
40
40
|
wait = WebDriverWait(driver, 60)
|
@@ -1,10 +1,11 @@
|
|
1
|
-
from bs4 import BeautifulSoup
|
2
1
|
import time
|
2
|
+
|
3
|
+
from bs4 import BeautifulSoup
|
3
4
|
from dateutil.relativedelta import relativedelta
|
5
|
+
from selenium.common.exceptions import NoSuchElementException
|
4
6
|
from selenium.webdriver.common.by import By
|
5
7
|
from selenium.webdriver.common.keys import Keys
|
6
8
|
from selenium.webdriver.support.ui import Select
|
7
|
-
from selenium.common.exceptions import NoSuchElementException
|
8
9
|
|
9
10
|
from uk_bin_collection.uk_bin_collection.common import *
|
10
11
|
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass
|
@@ -31,7 +32,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
31
32
|
# Create Selenium webdriver
|
32
33
|
options = webdriver.ChromeOptions()
|
33
34
|
options.add_experimental_option("excludeSwitches", ["enable-logging"])
|
34
|
-
driver = create_webdriver(web_driver, headless)
|
35
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
35
36
|
|
36
37
|
driver.get(page)
|
37
38
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import time
|
2
|
+
|
2
3
|
from bs4 import BeautifulSoup
|
3
4
|
from selenium.webdriver.common.by import By
|
4
5
|
from selenium.webdriver.support import expected_conditions as EC
|
@@ -29,7 +30,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
29
30
|
check_postcode(user_postcode)
|
30
31
|
|
31
32
|
# Create Selenium webdriver
|
32
|
-
driver = create_webdriver(web_driver, headless)
|
33
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
33
34
|
driver.get("https://www.npt.gov.uk/2195")
|
34
35
|
|
35
36
|
# Accept cookies banner
|
@@ -1,5 +1,6 @@
|
|
1
|
-
from bs4 import BeautifulSoup
|
2
1
|
from datetime import datetime
|
2
|
+
|
3
|
+
from bs4 import BeautifulSoup
|
3
4
|
from selenium.webdriver.common.by import By
|
4
5
|
from selenium.webdriver.support import expected_conditions as EC
|
5
6
|
from selenium.webdriver.support.ui import Select
|
@@ -8,7 +9,6 @@ from selenium.webdriver.support.wait import WebDriverWait
|
|
8
9
|
from uk_bin_collection.uk_bin_collection.common import *
|
9
10
|
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass
|
10
11
|
|
11
|
-
|
12
12
|
# import the wonderful Beautiful Soup and the URL grabber
|
13
13
|
|
14
14
|
|
@@ -35,7 +35,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
35
35
|
check_uprn(user_uprn)
|
36
36
|
check_postcode(user_postcode)
|
37
37
|
# Create Selenium webdriver
|
38
|
-
driver = create_webdriver(web_driver, headless)
|
38
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
39
39
|
driver.get(page)
|
40
40
|
|
41
41
|
# If you bang in the house number (or property name) and postcode in the box it should find your property
|
@@ -31,7 +31,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
31
31
|
check_postcode(user_postcode)
|
32
32
|
|
33
33
|
# Create Selenium webdriver
|
34
|
-
driver = create_webdriver(web_driver, headless)
|
34
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
35
35
|
driver.get(page)
|
36
36
|
|
37
37
|
# Populate postcode field
|
@@ -1,15 +1,15 @@
|
|
1
|
-
|
1
|
+
import re # Import regular expressions
|
2
2
|
from datetime import datetime, timedelta
|
3
|
+
|
4
|
+
from bs4 import BeautifulSoup
|
3
5
|
from selenium.webdriver.common.by import By
|
4
6
|
from selenium.webdriver.support import expected_conditions as EC
|
5
7
|
from selenium.webdriver.support.ui import Select
|
6
8
|
from selenium.webdriver.support.wait import WebDriverWait
|
7
|
-
import re # Import regular expressions
|
8
9
|
|
9
10
|
from uk_bin_collection.uk_bin_collection.common import *
|
10
11
|
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass
|
11
12
|
|
12
|
-
|
13
13
|
# import the wonderful Beautiful Soup and the URL grabber
|
14
14
|
|
15
15
|
|
@@ -34,7 +34,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
34
34
|
# Create Selenium webdriver
|
35
35
|
page = f"https://my.nwleics.gov.uk/my-property-finder?address={user_postcode}&go=1"
|
36
36
|
|
37
|
-
driver = create_webdriver(web_driver, headless)
|
37
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
38
38
|
driver.get(page)
|
39
39
|
|
40
40
|
# If you bang in the house number (or property name) and postcode in the box it should find your property
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import time
|
2
|
+
|
2
3
|
from bs4 import BeautifulSoup
|
3
4
|
from selenium.webdriver.common.by import By
|
4
5
|
|
5
6
|
from uk_bin_collection.uk_bin_collection.common import *
|
6
7
|
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass
|
7
8
|
|
8
|
-
|
9
9
|
# import the wonderful Beautiful Soup and the URL grabber
|
10
10
|
|
11
11
|
|
@@ -39,7 +39,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
39
39
|
check_postcode(user_postcode)
|
40
40
|
|
41
41
|
# Create Selenium webdriver
|
42
|
-
driver = create_webdriver(web_driver, headless)
|
42
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
43
43
|
driver.get(page)
|
44
44
|
|
45
45
|
time.sleep(1)
|
@@ -1,15 +1,15 @@
|
|
1
|
-
|
1
|
+
import time
|
2
2
|
from datetime import datetime
|
3
|
+
|
4
|
+
from bs4 import BeautifulSoup
|
3
5
|
from selenium.webdriver.common.by import By
|
4
6
|
from selenium.webdriver.support import expected_conditions as EC
|
5
7
|
from selenium.webdriver.support.ui import Select
|
6
8
|
from selenium.webdriver.support.wait import WebDriverWait
|
7
9
|
|
8
|
-
import time
|
9
10
|
from uk_bin_collection.uk_bin_collection.common import *
|
10
11
|
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass
|
11
12
|
|
12
|
-
|
13
13
|
# import the wonderful Beautiful Soup and the URL grabber
|
14
14
|
|
15
15
|
|
@@ -34,7 +34,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
34
34
|
check_uprn(user_uprn)
|
35
35
|
check_postcode(user_postcode)
|
36
36
|
# Create Selenium webdriver
|
37
|
-
driver = create_webdriver(web_driver, headless)
|
37
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
38
38
|
driver.get(page)
|
39
39
|
|
40
40
|
# If you bang in the house number (or property name) and postcode in the box it should find your property
|
@@ -1,14 +1,14 @@
|
|
1
|
-
from bs4 import BeautifulSoup
|
2
1
|
from datetime import datetime
|
2
|
+
|
3
|
+
from bs4 import BeautifulSoup
|
3
4
|
from selenium.webdriver.common.by import By
|
5
|
+
from selenium.webdriver.common.keys import Keys
|
4
6
|
from selenium.webdriver.support import expected_conditions as EC
|
5
7
|
from selenium.webdriver.support.ui import Select
|
6
8
|
from selenium.webdriver.support.wait import WebDriverWait
|
7
9
|
|
8
10
|
from uk_bin_collection.uk_bin_collection.common import *
|
9
11
|
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass
|
10
|
-
from selenium.webdriver.common.keys import Keys
|
11
|
-
|
12
12
|
|
13
13
|
# import the wonderful Beautiful Soup and the URL grabber
|
14
14
|
|
@@ -35,7 +35,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
35
35
|
check_postcode(user_postcode)
|
36
36
|
|
37
37
|
# Create Selenium webdriver
|
38
|
-
driver = create_webdriver(web_driver, headless)
|
38
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
39
39
|
driver.get(page)
|
40
40
|
|
41
41
|
# If you bang in the house number (or property name) and postcode in the box it should find your property
|
@@ -26,7 +26,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
26
26
|
user_uprn = user_uprn.zfill(12)
|
27
27
|
|
28
28
|
# Create Selenium webdriver
|
29
|
-
driver = create_webdriver(web_driver, headless)
|
29
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
30
30
|
driver.get(
|
31
31
|
f"https://my.reigate-banstead.gov.uk/en/service/Bins_and_recycling___collections_calendar?uprn={user_uprn}"
|
32
32
|
)
|
@@ -27,7 +27,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
27
27
|
check_postcode(user_postcode)
|
28
28
|
|
29
29
|
# Create Selenium webdriver
|
30
|
-
driver = create_webdriver(web_driver, headless)
|
30
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
31
31
|
driver.get(
|
32
32
|
"https://www.renfrewshire.gov.uk/article/2320/Check-your-bin-collection-day"
|
33
33
|
)
|
@@ -31,7 +31,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
31
31
|
check_postcode(user_postcode)
|
32
32
|
|
33
33
|
# Create Selenium webdriver
|
34
|
-
driver = create_webdriver(web_driver, headless)
|
34
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
35
35
|
driver.get(page)
|
36
36
|
|
37
37
|
# Populate postcode field
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import time
|
2
2
|
from typing import Any
|
3
3
|
|
4
|
+
from dateutil.parser import parse
|
5
|
+
from selenium.common.exceptions import NoSuchElementException, TimeoutException
|
4
6
|
from selenium.webdriver.common.by import By
|
5
7
|
from selenium.webdriver.common.keys import Keys
|
6
|
-
from selenium.common.exceptions import TimeoutException, NoSuchElementException
|
7
|
-
from selenium.webdriver.support.ui import Select, WebDriverWait
|
8
8
|
from selenium.webdriver.support import expected_conditions as EC
|
9
|
-
from
|
9
|
+
from selenium.webdriver.support.ui import Select, WebDriverWait
|
10
10
|
|
11
11
|
from uk_bin_collection.uk_bin_collection.common import create_webdriver, date_format
|
12
12
|
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass
|
@@ -32,7 +32,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
32
32
|
user_paon = kwargs.get("paon")
|
33
33
|
|
34
34
|
# Create Selenium webdriver
|
35
|
-
driver = create_webdriver(web_driver, headless)
|
35
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
36
36
|
driver.get(page)
|
37
37
|
|
38
38
|
# Enter postcode
|
@@ -26,7 +26,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
26
26
|
check_postcode(user_postcode)
|
27
27
|
|
28
28
|
# Create Selenium webdriver
|
29
|
-
driver = create_webdriver(web_driver, headless)
|
29
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
30
30
|
driver.get("https://www.staffsmoorlands.gov.uk/findyourbinday")
|
31
31
|
|
32
32
|
# Close cookies banner
|
@@ -1,11 +1,12 @@
|
|
1
1
|
from bs4 import BeautifulSoup
|
2
|
-
from uk_bin_collection.uk_bin_collection.common import *
|
3
|
-
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass
|
4
2
|
from selenium.webdriver.common.by import By
|
5
3
|
from selenium.webdriver.support import expected_conditions as EC
|
6
4
|
from selenium.webdriver.support.ui import Select
|
7
5
|
from selenium.webdriver.support.wait import WebDriverWait
|
8
6
|
|
7
|
+
from uk_bin_collection.uk_bin_collection.common import *
|
8
|
+
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass
|
9
|
+
|
9
10
|
|
10
11
|
# import the wonderful Beautiful Soup and the URL grabber
|
11
12
|
class CouncilClass(AbstractGetBinDataClass):
|
@@ -28,8 +29,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
28
29
|
check_paon(user_paon)
|
29
30
|
check_postcode(user_postcode)
|
30
31
|
|
31
|
-
driver = create_webdriver(web_driver, headless)
|
32
|
-
# driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()))
|
32
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
33
33
|
driver.get(
|
34
34
|
"https://webapps.sunderland.gov.uk/WEBAPPS/WSS/Sunderland_Portal/Forms/bindaychecker.aspx"
|
35
35
|
)
|
@@ -17,7 +17,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
17
17
|
try:
|
18
18
|
# Create Selenium webdriver
|
19
19
|
headless = kwargs.get("headless")
|
20
|
-
driver = create_webdriver(kwargs.get("web_driver"), headless)
|
20
|
+
driver = create_webdriver(kwargs.get("web_driver"), headless, None, __name__)
|
21
21
|
driver.get(kwargs.get("url"))
|
22
22
|
|
23
23
|
# Make a BS4 object
|
@@ -32,10 +32,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
32
32
|
check_postcode(user_postcode)
|
33
33
|
|
34
34
|
# Create Selenium webdriver
|
35
|
-
|
36
|
-
driver = webdriver.Chrome(
|
37
|
-
service=ChromeService(ChromeDriverManager().install())
|
38
|
-
)
|
35
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
39
36
|
driver.get("https://www.westberks.gov.uk/binday")
|
40
37
|
|
41
38
|
# Wait for the postcode field to appear then populate it
|
@@ -27,7 +27,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
27
27
|
check_postcode(user_postcode)
|
28
28
|
|
29
29
|
# Create Selenium webdriver
|
30
|
-
driver = create_webdriver(web_driver, headless)
|
30
|
+
driver = create_webdriver(web_driver, headless, None, __name__)
|
31
31
|
driver.get(
|
32
32
|
"https://www.westlothian.gov.uk/article/31528/Bin-Collection-Calendar-Dates"
|
33
33
|
)
|