uk_bin_collection 0.138.0__py3-none-any.whl → 0.138.1__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/uk_bin_collection/councils/WalthamForest.py +13 -13
- {uk_bin_collection-0.138.0.dist-info → uk_bin_collection-0.138.1.dist-info}/METADATA +1 -1
- {uk_bin_collection-0.138.0.dist-info → uk_bin_collection-0.138.1.dist-info}/RECORD +6 -6
- {uk_bin_collection-0.138.0.dist-info → uk_bin_collection-0.138.1.dist-info}/LICENSE +0 -0
- {uk_bin_collection-0.138.0.dist-info → uk_bin_collection-0.138.1.dist-info}/WHEEL +0 -0
- {uk_bin_collection-0.138.0.dist-info → uk_bin_collection-0.138.1.dist-info}/entry_points.txt +0 -0
@@ -5,7 +5,6 @@ from bs4 import BeautifulSoup
|
|
5
5
|
from selenium.webdriver.common.by import By
|
6
6
|
from selenium.webdriver.common.keys import Keys
|
7
7
|
from selenium.webdriver.support import expected_conditions as EC
|
8
|
-
from selenium.webdriver.support.ui import Select
|
9
8
|
from selenium.webdriver.support.wait import WebDriverWait
|
10
9
|
|
11
10
|
from uk_bin_collection.uk_bin_collection.common import *
|
@@ -26,7 +25,7 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
26
25
|
page = "https://portal.walthamforest.gov.uk/AchieveForms/?mode=fill&consentMessage=yes&form_uri=sandbox-publish://AF-Process-d62ccdd2-3de9-48eb-a229-8e20cbdd6393/AF-Stage-8bf39bf9-5391-4c24-857f-0dc2025c67f4/definition.json&process=1&process_uri=sandbox-processes://AF-Process-d62ccdd2-3de9-48eb-a229-8e20cbdd6393&process_id=AF-Process-d62ccdd2-3de9-48eb-a229-8e20cbdd6393"
|
27
26
|
|
28
27
|
user_postcode = kwargs.get("postcode")
|
29
|
-
user_uprn = kwargs.get("uprn")
|
28
|
+
# user_uprn = kwargs.get("uprn")
|
30
29
|
user_paon = kwargs.get("paon")
|
31
30
|
web_driver = kwargs.get("web_driver")
|
32
31
|
headless = kwargs.get("headless")
|
@@ -71,17 +70,17 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
71
70
|
)
|
72
71
|
|
73
72
|
find_ac_button.send_keys(Keys.RETURN)
|
74
|
-
|
73
|
+
wait.until(
|
75
74
|
EC.presence_of_element_located(
|
76
|
-
(By.XPATH, "//h4[contains(text(), '
|
75
|
+
(By.XPATH, "//h4[contains(text(), 'Next Collections')]")
|
77
76
|
)
|
78
77
|
)
|
79
78
|
|
80
|
-
|
79
|
+
WebDriverWait(driver, 10).until(
|
81
80
|
EC.presence_of_element_located(
|
82
81
|
(
|
83
82
|
By.XPATH,
|
84
|
-
'//div[contains(@class, "
|
83
|
+
'//div[contains(@class, "fieldContent")]',
|
85
84
|
)
|
86
85
|
)
|
87
86
|
)
|
@@ -90,15 +89,16 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
90
89
|
|
91
90
|
data = {"bins": []}
|
92
91
|
|
93
|
-
collection_divs = soup.find_all("
|
92
|
+
collection_divs = soup.find_all("div", {"style": "text-align: center;"})
|
94
93
|
|
95
94
|
for collection_div in collection_divs:
|
96
|
-
|
97
|
-
|
98
|
-
|
95
|
+
h5_tag = collection_div.find("h5")
|
96
|
+
p_tag = collection_div.find("p")
|
97
|
+
|
98
|
+
if h5_tag and p_tag:
|
99
|
+
bin_type = h5_tag.get_text(strip=True)
|
100
|
+
collection_date_text = p_tag.find("b").get_text(strip=True)
|
99
101
|
|
100
|
-
# if collection_date_text is not 'NaN'
|
101
|
-
if collection_date_text != "NaN":
|
102
102
|
# Extract and format the date
|
103
103
|
date_match = re.search(r"(\d+ \w+)", collection_date_text)
|
104
104
|
if date_match:
|
@@ -123,4 +123,4 @@ class CouncilClass(AbstractGetBinDataClass):
|
|
123
123
|
# This block ensures that the driver is closed regardless of an exception
|
124
124
|
if driver:
|
125
125
|
driver.quit()
|
126
|
-
return data
|
126
|
+
return data
|
@@ -288,7 +288,7 @@ uk_bin_collection/uk_bin_collection/councils/ValeofGlamorganCouncil.py,sha256=dz
|
|
288
288
|
uk_bin_collection/uk_bin_collection/councils/ValeofWhiteHorseCouncil.py,sha256=fyskrQ4-osGOeCZuB_8m2TpW8iwHr7lpl52nrR06Xpo,4441
|
289
289
|
uk_bin_collection/uk_bin_collection/councils/WakefieldCityCouncil.py,sha256=mdAXKcoSSF-xnXS8boesFftS8RiKyuR76ITHQ9Q5DgM,4916
|
290
290
|
uk_bin_collection/uk_bin_collection/councils/WalsallCouncil.py,sha256=wv-M3zZj0E6EIPoVB9AF_NCg_8XGM9uhqGa-F5yzoc4,2277
|
291
|
-
uk_bin_collection/uk_bin_collection/councils/WalthamForest.py,sha256=
|
291
|
+
uk_bin_collection/uk_bin_collection/councils/WalthamForest.py,sha256=0z7TmlnSNKP42Etk0FusbIo-NzA_Y-zqOJa4P8HykVk,4923
|
292
292
|
uk_bin_collection/uk_bin_collection/councils/WandsworthCouncil.py,sha256=aQoJpC7YkhKewQyZlsv5m4__2IPoKRsOrPxjNH5xRNo,2594
|
293
293
|
uk_bin_collection/uk_bin_collection/councils/WarringtonBoroughCouncil.py,sha256=AB9mrV1v4pKKhfsBS8MpjO8XXBifqojSk53J9Q74Guk,1583
|
294
294
|
uk_bin_collection/uk_bin_collection/councils/WarwickDistrictCouncil.py,sha256=DAL_f0BcIxFj7Ngkms5Q80kgSGp9y5zB35wRPudayz8,1644
|
@@ -321,8 +321,8 @@ uk_bin_collection/uk_bin_collection/councils/YorkCouncil.py,sha256=I2kBYMlsD4bId
|
|
321
321
|
uk_bin_collection/uk_bin_collection/councils/council_class_template/councilclasstemplate.py,sha256=EQWRhZ2pEejlvm0fPyOTsOHKvUZmPnxEYO_OWRGKTjs,1158
|
322
322
|
uk_bin_collection/uk_bin_collection/create_new_council.py,sha256=m-IhmWmeWQlFsTZC4OxuFvtw5ZtB8EAJHxJTH4O59lQ,1536
|
323
323
|
uk_bin_collection/uk_bin_collection/get_bin_data.py,sha256=YvmHfZqanwrJ8ToGch34x-L-7yPe31nB_x77_Mgl_vo,4545
|
324
|
-
uk_bin_collection-0.138.
|
325
|
-
uk_bin_collection-0.138.
|
326
|
-
uk_bin_collection-0.138.
|
327
|
-
uk_bin_collection-0.138.
|
328
|
-
uk_bin_collection-0.138.
|
324
|
+
uk_bin_collection-0.138.1.dist-info/LICENSE,sha256=vABBUOzcrgfaTKpzeo-si9YVEun6juDkndqA8RKdKGs,1071
|
325
|
+
uk_bin_collection-0.138.1.dist-info/METADATA,sha256=Ou6pY68sx1H_I3oRWLDjb1hx0XCDGAX5jecP9tO0pYQ,19851
|
326
|
+
uk_bin_collection-0.138.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
327
|
+
uk_bin_collection-0.138.1.dist-info/entry_points.txt,sha256=36WCSGMWSc916S3Hi1ZkazzDKHaJ6CD-4fCEFm5MIao,90
|
328
|
+
uk_bin_collection-0.138.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{uk_bin_collection-0.138.0.dist-info → uk_bin_collection-0.138.1.dist-info}/entry_points.txt
RENAMED
File without changes
|