uk_bin_collection 0.151.0__py3-none-any.whl → 0.152.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/tests/input.json +137 -66
- uk_bin_collection/uk_bin_collection/councils/AdurAndWorthingCouncils.py +69 -24
- uk_bin_collection/uk_bin_collection/councils/AngusCouncil.py +149 -0
- uk_bin_collection/uk_bin_collection/councils/BarkingDagenham.py +11 -2
- uk_bin_collection/uk_bin_collection/councils/BexleyCouncil.py +24 -47
- uk_bin_collection/uk_bin_collection/councils/BrightonandHoveCityCouncil.py +11 -2
- uk_bin_collection/uk_bin_collection/councils/BroadlandDistrictCouncil.py +21 -6
- uk_bin_collection/uk_bin_collection/councils/CharnwoodBoroughCouncil.py +14 -3
- uk_bin_collection/uk_bin_collection/councils/CheltenhamBoroughCouncil.py +12 -12
- uk_bin_collection/uk_bin_collection/councils/CheshireEastCouncil.py +24 -2
- uk_bin_collection/uk_bin_collection/councils/ChichesterDistrictCouncil.py +105 -53
- uk_bin_collection/uk_bin_collection/councils/ChorleyCouncil.py +4 -0
- uk_bin_collection/uk_bin_collection/councils/CroydonCouncil.py +114 -261
- uk_bin_collection/uk_bin_collection/councils/DartfordBoroughCouncil.py +13 -0
- uk_bin_collection/uk_bin_collection/councils/DoverDistrictCouncil.py +17 -2
- uk_bin_collection/uk_bin_collection/councils/EastDevonDC.py +14 -1
- uk_bin_collection/uk_bin_collection/councils/EastbourneBoroughCouncil.py +76 -0
- uk_bin_collection/uk_bin_collection/councils/EastleighBoroughCouncil.py +59 -45
- uk_bin_collection/uk_bin_collection/councils/EnvironmentFirst.py +2 -0
- uk_bin_collection/uk_bin_collection/councils/EppingForestDistrictCouncil.py +47 -15
- uk_bin_collection/uk_bin_collection/councils/FermanaghOmaghDistrictCouncil.py +102 -0
- uk_bin_collection/uk_bin_collection/councils/GlasgowCityCouncil.py +13 -1
- uk_bin_collection/uk_bin_collection/councils/GuildfordCouncil.py +2 -3
- uk_bin_collection/uk_bin_collection/councils/HerefordshireCouncil.py +13 -2
- uk_bin_collection/uk_bin_collection/councils/HuntingdonDistrictCouncil.py +18 -4
- uk_bin_collection/uk_bin_collection/councils/LewesDistrictCouncil.py +76 -0
- uk_bin_collection/uk_bin_collection/councils/LiverpoolCityCouncil.py +16 -4
- uk_bin_collection/uk_bin_collection/councils/MaidstoneBoroughCouncil.py +42 -47
- uk_bin_collection/uk_bin_collection/councils/NewhamCouncil.py +13 -6
- uk_bin_collection/uk_bin_collection/councils/NorthEastDerbyshireDistrictCouncil.py +61 -39
- uk_bin_collection/uk_bin_collection/councils/NorthSomersetCouncil.py +14 -9
- uk_bin_collection/uk_bin_collection/councils/NorthTynesideCouncil.py +2 -2
- uk_bin_collection/uk_bin_collection/councils/NorthumberlandCouncil.py +50 -14
- uk_bin_collection/uk_bin_collection/councils/SloughBoroughCouncil.py +140 -0
- uk_bin_collection/uk_bin_collection/councils/SouthRibbleCouncil.py +115 -65
- uk_bin_collection/uk_bin_collection/councils/StokeOnTrentCityCouncil.py +10 -5
- uk_bin_collection/uk_bin_collection/councils/TewkesburyBoroughCouncil.py +40 -0
- uk_bin_collection/uk_bin_collection/councils/TorbayCouncil.py +1 -3
- uk_bin_collection/uk_bin_collection/councils/WakefieldCityCouncil.py +3 -0
- {uk_bin_collection-0.151.0.dist-info → uk_bin_collection-0.152.1.dist-info}/METADATA +1 -1
- {uk_bin_collection-0.151.0.dist-info → uk_bin_collection-0.152.1.dist-info}/RECORD +44 -38
- {uk_bin_collection-0.151.0.dist-info → uk_bin_collection-0.152.1.dist-info}/LICENSE +0 -0
- {uk_bin_collection-0.151.0.dist-info → uk_bin_collection-0.152.1.dist-info}/WHEEL +0 -0
- {uk_bin_collection-0.151.0.dist-info → uk_bin_collection-0.152.1.dist-info}/entry_points.txt +0 -0
@@ -28,6 +28,16 @@
|
|
28
28
|
"wiki_note": "You will need to use [FindMyAddress](https://www.findmyaddress.co.uk/search) to find the UPRN.",
|
29
29
|
"LAD24CD": "E07000032"
|
30
30
|
},
|
31
|
+
"AngusCouncil": {
|
32
|
+
"uprn": "117053733",
|
33
|
+
"skip_get_url": true,
|
34
|
+
"postcode": "DD7 7LE",
|
35
|
+
"url": "https://www.angus.gov.uk/bins_litter_and_recycling/bin_collection_days",
|
36
|
+
"web_driver": "http://selenium:4444",
|
37
|
+
"wiki_name": "Angus",
|
38
|
+
"wiki_note": "You will need to use [FindMyAddress](https://www.findmyaddress.co.uk/search) to find the UPRN. Requires Selenium",
|
39
|
+
"LAD24CD": "S12000041"
|
40
|
+
},
|
31
41
|
"AntrimAndNewtonabbeyCouncil": {
|
32
42
|
"LAD24CD": "N09000001",
|
33
43
|
"url": "https://antrimandnewtownabbey.gov.uk/residents/bins-recycling/bins-schedule/?Id=643",
|
@@ -117,13 +127,13 @@
|
|
117
127
|
"LAD24CD": "E07000200"
|
118
128
|
},
|
119
129
|
"BarkingDagenham": {
|
120
|
-
"house_number": "19
|
130
|
+
"house_number": "19",
|
121
131
|
"postcode": "RM6 6XH",
|
122
132
|
"skip_get_url": true,
|
123
133
|
"web_driver": "http://selenium:4444",
|
124
134
|
"url": "https://www.lbbd.gov.uk/rubbish-recycling/household-bin-collection/check-your-bin-collection-days",
|
125
135
|
"wiki_name": "Barking and Dagenham",
|
126
|
-
"wiki_note": "Use
|
136
|
+
"wiki_note": "Use house number and postcode. Requires Selenium.",
|
127
137
|
"LAD24CD": "E09000002"
|
128
138
|
},
|
129
139
|
"BarnetCouncil": {
|
@@ -196,13 +206,11 @@
|
|
196
206
|
"LAD24CD": "N09000003"
|
197
207
|
},
|
198
208
|
"BexleyCouncil": {
|
199
|
-
"
|
200
|
-
"postcode": "DA5 3AH",
|
209
|
+
"uprn": "100020196143",
|
201
210
|
"skip_get_url": true,
|
202
211
|
"url": "https://waste.bexley.gov.uk/waste",
|
203
|
-
"web_driver": "http://selenium:4444",
|
204
212
|
"wiki_name": "Bexley",
|
205
|
-
"wiki_note": "
|
213
|
+
"wiki_note": "Provide your UPRN. Use [FindMyAddress](https://www.findmyaddress.co.uk/search) to locate it.",
|
206
214
|
"LAD24CD": "E09000004"
|
207
215
|
},
|
208
216
|
"BirminghamCityCouncil": {
|
@@ -311,13 +319,13 @@
|
|
311
319
|
"LAD24CD": "E09000005"
|
312
320
|
},
|
313
321
|
"BrightonandHoveCityCouncil": {
|
314
|
-
"house_number": "44
|
322
|
+
"house_number": "44",
|
315
323
|
"postcode": "BN1 8NE",
|
316
324
|
"skip_get_url": true,
|
317
325
|
"url": "https://cityclean.brighton-hove.gov.uk/link/collections",
|
318
326
|
"web_driver": "http://selenium:4444",
|
319
327
|
"wiki_name": "Brighton and Hove",
|
320
|
-
"wiki_note": "Use
|
328
|
+
"wiki_note": "Use house number and postcode. Requires Selenium",
|
321
329
|
"LAD24CD": "E06000043"
|
322
330
|
},
|
323
331
|
"BristolCityCouncil": {
|
@@ -330,12 +338,12 @@
|
|
330
338
|
},
|
331
339
|
"BroadlandDistrictCouncil": {
|
332
340
|
"skip_get_url": true,
|
333
|
-
"house_number": "1
|
341
|
+
"house_number": "1",
|
334
342
|
"postcode": "NR10 3FD",
|
335
343
|
"url": "https://area.southnorfolkandbroadland.gov.uk/FindAddress",
|
336
344
|
"web_driver": "http://selenium:4444",
|
337
345
|
"wiki_name": "Broadland",
|
338
|
-
"wiki_note": "Use
|
346
|
+
"wiki_note": "Use house number and postcode. Requires Selenium.",
|
339
347
|
"LAD24CD": "E07000144"
|
340
348
|
},
|
341
349
|
"BromleyBoroughCouncil": {
|
@@ -466,10 +474,11 @@
|
|
466
474
|
"LAD24CD": "W06000008"
|
467
475
|
},
|
468
476
|
"CharnwoodBoroughCouncil": {
|
469
|
-
"
|
470
|
-
"
|
477
|
+
"uprn": "100030446438",
|
478
|
+
"skip_get_url": true,
|
479
|
+
"url": "https://www.charnwood.gov.uk/pages/waste_collections_calendars",
|
471
480
|
"wiki_name": "Charnwood",
|
472
|
-
"wiki_note": "
|
481
|
+
"wiki_note": "You will need to use [FindMyAddress](https://www.findmyaddress.co.uk/search) to find the UPRN.",
|
473
482
|
"LAD24CD": "E07000130"
|
474
483
|
},
|
475
484
|
"ChelmsfordCityCouncil": {
|
@@ -498,10 +507,11 @@
|
|
498
507
|
"LAD24CD": "E07000177"
|
499
508
|
},
|
500
509
|
"CheshireEastCouncil": {
|
501
|
-
"
|
502
|
-
"
|
510
|
+
"skip_get_url": true,
|
511
|
+
"uprn": "100012830647",
|
512
|
+
"url": "https://online.cheshireeast.gov.uk/mycollectionday",
|
503
513
|
"wiki_name": "Cheshire East",
|
504
|
-
"wiki_note": "
|
514
|
+
"wiki_note": "Use [FindMyAddress](https://www.findmyaddress.co.uk/search) to find your UPRN.",
|
505
515
|
"LAD24CD": "E06000049"
|
506
516
|
},
|
507
517
|
"CheshireWestAndChesterCouncil": {
|
@@ -521,7 +531,7 @@
|
|
521
531
|
"LAD24CD": "E07000034"
|
522
532
|
},
|
523
533
|
"ChichesterDistrictCouncil": {
|
524
|
-
"house_number": "7
|
534
|
+
"house_number": "7",
|
525
535
|
"postcode": "RH14 0JT",
|
526
536
|
"skip_get_url": true,
|
527
537
|
"url": "https://www.chichester.gov.uk/checkyourbinday",
|
@@ -533,11 +543,11 @@
|
|
533
543
|
"ChorleyCouncil": {
|
534
544
|
"postcode": "PR6 7PG",
|
535
545
|
"skip_get_url": true,
|
536
|
-
"uprn": "
|
546
|
+
"uprn": "100010382247",
|
537
547
|
"url": "https://myaccount.chorley.gov.uk/wastecollections.aspx",
|
538
548
|
"web_driver": "http://selenium:4444",
|
539
549
|
"wiki_name": "Chorley",
|
540
|
-
"wiki_note": "Chorley needs to be passed both a Postcode & UPRN
|
550
|
+
"wiki_note": "Chorley needs to be passed both a Postcode & UPRN to work. Find this on [FindMyAddress](https://www.findmyaddress.co.uk/search).",
|
541
551
|
"LAD24CD": "E07000118"
|
542
552
|
},
|
543
553
|
"ColchesterCityCouncil": {
|
@@ -634,8 +644,9 @@
|
|
634
644
|
"LAD24CD": "E07000096"
|
635
645
|
},
|
636
646
|
"DartfordBoroughCouncil": {
|
637
|
-
"uprn": "
|
638
|
-
"url": "https://
|
647
|
+
"uprn": "100060861698",
|
648
|
+
"url": "https://www.dartford.gov.uk/waste-recycling/collection-day",
|
649
|
+
"skip_get_url": true,
|
639
650
|
"wiki_name": "Dartford",
|
640
651
|
"wiki_note": "Use [FindMyAddress](https://www.findmyaddress.co.uk/search) to find your UPRN.",
|
641
652
|
"LAD24CD": "E07000107"
|
@@ -680,10 +691,11 @@
|
|
680
691
|
"LAD24CD": "E06000059"
|
681
692
|
},
|
682
693
|
"DoverDistrictCouncil": {
|
683
|
-
"
|
684
|
-
"
|
694
|
+
"uprn": "100060908340",
|
695
|
+
"url": "https://collections.dover.gov.uk/property",
|
696
|
+
"skip_get_url": true,
|
685
697
|
"wiki_name": "Dover",
|
686
|
-
"wiki_note": "
|
698
|
+
"wiki_note": "To get the UPRN, you can use [FindMyAddress](https://www.findmyaddress.co.uk/search).",
|
687
699
|
"LAD24CD": "E07000108"
|
688
700
|
},
|
689
701
|
"DudleyCouncil": {
|
@@ -725,7 +737,15 @@
|
|
725
737
|
"wiki_note": "You will need to use [FindMyAddress](https://www.findmyaddress.co.uk/search) to find the UPRN.",
|
726
738
|
"LAD24CD": "S12000008"
|
727
739
|
},
|
728
|
-
"
|
740
|
+
"EastbourneBoroughCouncil": {
|
741
|
+
"uprn": "100060011258",
|
742
|
+
"url": "https://www.lewes-eastbourne.gov.uk/article/1158/When-is-my-bin-collection-day",
|
743
|
+
"skip_get_url": true,
|
744
|
+
"wiki_name": "Eastbourne",
|
745
|
+
"wiki_note": "You will need to use [FindMyAddress](https://www.findmyaddress.co.uk/search) to find the UPRN.",
|
746
|
+
"LAD24CD": "E07000061"
|
747
|
+
},
|
748
|
+
"EastCambridgeshireCouncil": {
|
729
749
|
"skip_get_url": true,
|
730
750
|
"uprn": "10002597178",
|
731
751
|
"url": "https://www.eastcambs.gov.uk/",
|
@@ -734,10 +754,11 @@
|
|
734
754
|
"LAD24CD": "E07000009"
|
735
755
|
},
|
736
756
|
"EastDevonDC": {
|
737
|
-
"
|
738
|
-
"
|
757
|
+
"uprn": "010090909915",
|
758
|
+
"url": "https://eastdevon.gov.uk/recycling-and-waste/recycling-waste-information/when-is-my-bin-collected/",
|
759
|
+
"skip_get_url": true,
|
739
760
|
"wiki_name": "East Devon",
|
740
|
-
"wiki_note": "
|
761
|
+
"wiki_note": "Pass the UPRN. You can find it using [FindMyAddress](https://www.findmyaddress.co.uk/search).",
|
741
762
|
"LAD24CD": "E07000040"
|
742
763
|
},
|
743
764
|
"EastHertsCouncil": {
|
@@ -810,6 +831,7 @@
|
|
810
831
|
"skip_get_url": true,
|
811
832
|
"uprn": "100060303535",
|
812
833
|
"url": "https://www.eastleigh.gov.uk/waste-bins-and-recycling/collection-dates/your-waste-bin-and-recycling-collections?uprn=",
|
834
|
+
"web_driver": "http://selenium:4444",
|
813
835
|
"wiki_name": "Eastleigh",
|
814
836
|
"wiki_note": "Pass the UPRN. You can find it using [FindMyAddress](https://www.findmyaddress.co.uk/search).",
|
815
837
|
"LAD24CD": "E07000086"
|
@@ -850,9 +872,10 @@
|
|
850
872
|
"EppingForestDistrictCouncil": {
|
851
873
|
"postcode": "IG9 6EP",
|
852
874
|
"url": "https://eppingforestdc.maps.arcgis.com/apps/instant/lookup/index.html?appid=bfca32b46e2a47cd9c0a84f2d8cdde17&find=IG9%206EP",
|
875
|
+
"skip_get_url": true,
|
853
876
|
"web_driver": "http://selenium:4444",
|
854
877
|
"wiki_name": "Epping Forest",
|
855
|
-
"wiki_note": "
|
878
|
+
"wiki_note": "Add your postcode.",
|
856
879
|
"LAD24CD": "E07000072"
|
857
880
|
},
|
858
881
|
"EpsomandEwellBoroughCouncil": {
|
@@ -901,6 +924,15 @@
|
|
901
924
|
"wiki_note": "Pass the UPRN. You can find it using [FindMyAddress](https://www.findmyaddress.co.uk/search).",
|
902
925
|
"LAD24CD": "E07000010"
|
903
926
|
},
|
927
|
+
"FermanaghOmaghDistrictCouncil": {
|
928
|
+
"house_number": "20",
|
929
|
+
"postcode": "BT74 6DQ",
|
930
|
+
"skip_get_url": true,
|
931
|
+
"url": "https://www.fermanaghomagh.com/services/environment-and-waste/waste-collection-calendar/",
|
932
|
+
"wiki_name": "Fermanagh and Omagh",
|
933
|
+
"wiki_note": "Pass the house number and postcode in their respective parameters.",
|
934
|
+
"LAD24CD": "N09000006"
|
935
|
+
},
|
904
936
|
"FifeCouncil": {
|
905
937
|
"uprn": "320203521",
|
906
938
|
"url": "https://www.fife.gov.uk",
|
@@ -962,10 +994,11 @@
|
|
962
994
|
"LAD24CD": "E07000173"
|
963
995
|
},
|
964
996
|
"GlasgowCityCouncil": {
|
965
|
-
"
|
966
|
-
"
|
997
|
+
"uprn": "906700034497",
|
998
|
+
"url": "https://onlineservices.glasgow.gov.uk/forms/RefuseAndRecyclingWebApplication/AddressSearch.aspx",
|
999
|
+
"skip_get_url": true,
|
967
1000
|
"wiki_name": "Glasgow City",
|
968
|
-
"wiki_note": "
|
1001
|
+
"wiki_note": "You will need to use [FindMyAddress](https://www.findmyaddress.co.uk/search) to find the UPRN.",
|
969
1002
|
"LAD24CD": "S12000049"
|
970
1003
|
},
|
971
1004
|
"GloucesterCityCouncil": {
|
@@ -984,21 +1017,21 @@
|
|
984
1017
|
"wiki_name": "Google Calendar (Public)",
|
985
1018
|
"wiki_note": "The URL should be the public ics file URL for the public Google calendar. See https://support.google.com/calendar/answer/37083?sjid=7202815583021446882-EU. Councils that currently need this are Trafford.",
|
986
1019
|
"supported_councils": [
|
987
|
-
"
|
988
|
-
"
|
989
|
-
"
|
990
|
-
"
|
991
|
-
"
|
992
|
-
"
|
993
|
-
"
|
994
|
-
"
|
995
|
-
"
|
996
|
-
"
|
997
|
-
"
|
998
|
-
"
|
999
|
-
"
|
1000
|
-
"
|
1001
|
-
"
|
1020
|
+
"Trafford",
|
1021
|
+
"Clackmannanshire",
|
1022
|
+
"Havant",
|
1023
|
+
"North Warwickshire",
|
1024
|
+
"Newry and Mourne",
|
1025
|
+
"East Dunbartonshire",
|
1026
|
+
"Pendle",
|
1027
|
+
"Torfaen",
|
1028
|
+
"East Hampshire",
|
1029
|
+
"Ribble Valley",
|
1030
|
+
"Brentwood",
|
1031
|
+
"Isle of Wight",
|
1032
|
+
"Westmorland and Furness",
|
1033
|
+
"Derry City and Strabane",
|
1034
|
+
"Norwich"
|
1002
1035
|
],
|
1003
1036
|
"supported_councils_LAD24CD": [
|
1004
1037
|
"E06000046",
|
@@ -1035,14 +1068,13 @@
|
|
1035
1068
|
"LAD24CD": "E07000145"
|
1036
1069
|
},
|
1037
1070
|
"GuildfordCouncil": {
|
1038
|
-
"house_number": "THE LODGE
|
1071
|
+
"house_number": "THE LODGE",
|
1039
1072
|
"postcode": "GU3 1AH",
|
1040
1073
|
"skip_get_url": true,
|
1041
|
-
"uprn": "100061372691",
|
1042
1074
|
"url": "https://my.guildford.gov.uk/customers/s/view-bin-collections",
|
1043
1075
|
"web_driver": "http://selenium:4444",
|
1044
1076
|
"wiki_name": "Guildford",
|
1045
|
-
"wiki_note": "If the bin day is 'today' then the collectionDate will only show today's date if before 7 AM; else the date will be in 'previousCollectionDate'.
|
1077
|
+
"wiki_note": "If the bin day is 'today' then the collectionDate will only show today's date if before 7 AM; else the date will be in 'previousCollectionDate'.",
|
1046
1078
|
"LAD24CD": "E07000209"
|
1047
1079
|
},
|
1048
1080
|
"GwyneddCouncil": {
|
@@ -1118,10 +1150,11 @@
|
|
1118
1150
|
"LAD24CD": "E07000062"
|
1119
1151
|
},
|
1120
1152
|
"HerefordshireCouncil": {
|
1121
|
-
"
|
1122
|
-
"
|
1153
|
+
"uprn": "200002618844",
|
1154
|
+
"url": "https://www.herefordshire.gov.uk/rubbish-recycling/check-bin-collection-day",
|
1155
|
+
"skip_get_url": true,
|
1123
1156
|
"wiki_name": "Herefordshire",
|
1124
|
-
"wiki_note": "
|
1157
|
+
"wiki_note": "You will need to use [FindMyAddress](https://www.findmyaddress.co.uk/search) to find the UPRN.",
|
1125
1158
|
"LAD24CD": "E06000019"
|
1126
1159
|
},
|
1127
1160
|
"HertsmereBoroughCouncil": {
|
@@ -1188,17 +1221,19 @@
|
|
1188
1221
|
"wiki_note": "Pass the UPRN. You can find it using [FindMyAddress](https://www.findmyaddress.co.uk/search)."
|
1189
1222
|
},
|
1190
1223
|
"HuntingdonDistrictCouncil": {
|
1224
|
+
"uprn": "10012048679",
|
1191
1225
|
"LAD24CD": "E07000011",
|
1192
|
-
"url": "http://www.huntingdonshire.gov.uk/refuse-calendar/
|
1193
|
-
"
|
1226
|
+
"url": "http://www.huntingdonshire.gov.uk/refuse-calendar/",
|
1227
|
+
"skip_get_url": true,
|
1194
1228
|
"wiki_name": "Huntingdonshire",
|
1195
|
-
"wiki_note": "
|
1229
|
+
"wiki_note": "Pass the UPRN. You can find it using [FindMyAddress](https://www.findmyaddress.co.uk/search)."
|
1196
1230
|
},
|
1197
1231
|
"HyndburnBoroughCouncil": {
|
1198
1232
|
"postcode": "BB1 4DJ",
|
1199
1233
|
"LAD24CD": "E07000120",
|
1200
1234
|
"uprn": "100010448773",
|
1201
1235
|
"url": "https://iapp.itouchvision.com/iappcollectionday/collection-day/?uuid=FEBA68993831481FD81B2E605364D00A8DC017A4",
|
1236
|
+
"skip_get_url": true,
|
1202
1237
|
"web_driver": "http://selenium:4444",
|
1203
1238
|
"wiki_name": "Hyndburn",
|
1204
1239
|
"wiki_note": "Pass the UPRN. You can find it using [FindMyAddress](https://www.findmyaddress.co.uk/search). This parser requires a Selenium webdriver."
|
@@ -1278,6 +1313,14 @@
|
|
1278
1313
|
"wiki_note": "You will need to use [FindMyAddress](https://www.findmyaddress.co.uk/search) to find the UPRN.",
|
1279
1314
|
"LAD24CD": "E06000016"
|
1280
1315
|
},
|
1316
|
+
"LewesDistrictCouncil": {
|
1317
|
+
"uprn": "100061930155",
|
1318
|
+
"url": "https://www.lewes-eastbourne.gov.uk/article/1158/When-is-my-bin-collection-day",
|
1319
|
+
"skip_get_url": true,
|
1320
|
+
"wiki_name": "Lewes",
|
1321
|
+
"wiki_note": "You will need to use [FindMyAddress](https://www.findmyaddress.co.uk/search) to find the UPRN.",
|
1322
|
+
"LAD24CD": "E07000063"
|
1323
|
+
},
|
1281
1324
|
"LichfieldDistrictCouncil": {
|
1282
1325
|
"uprn": "100031694085",
|
1283
1326
|
"url": "https://www.lichfielddc.gov.uk",
|
@@ -1305,10 +1348,11 @@
|
|
1305
1348
|
"LAD24CD": "N09000007"
|
1306
1349
|
},
|
1307
1350
|
"LiverpoolCityCouncil": {
|
1308
|
-
"
|
1309
|
-
"
|
1351
|
+
"uprn": "38164600",
|
1352
|
+
"skip_get_url": true,
|
1353
|
+
"url": "https://liverpool.gov.uk/bins-and-recycling/bin-collections/",
|
1310
1354
|
"wiki_name": "Liverpool",
|
1311
|
-
"wiki_note": "
|
1355
|
+
"wiki_note": "You will need to use [FindMyAddress](https://www.findmyaddress.co.uk/search) to find the UPRN.",
|
1312
1356
|
"LAD24CD": "E08000012"
|
1313
1357
|
},
|
1314
1358
|
"LondonBoroughEaling": {
|
@@ -1394,6 +1438,15 @@
|
|
1394
1438
|
"wiki_note": "You will need to use [FindMyAddress](https://www.findmyaddress.co.uk/search) to find the UPRN.",
|
1395
1439
|
"LAD24CD": "E06000032"
|
1396
1440
|
},
|
1441
|
+
"MaidstoneBoroughCouncil": {
|
1442
|
+
"skip_get_url": true,
|
1443
|
+
"house_number": "71",
|
1444
|
+
"postcode": "ME16 8BT",
|
1445
|
+
"url": "https://my.maidstone.gov.uk/service/Find-your-bin-day",
|
1446
|
+
"wiki_name": "Maidstone",
|
1447
|
+
"wiki_note": "Pass the house number and postcode in their respective parameters. This parser requires a Selenium webdriver.",
|
1448
|
+
"LAD24CD": "E07000110"
|
1449
|
+
},
|
1397
1450
|
"MaldonDistrictCouncil": {
|
1398
1451
|
"skip_get_url": true,
|
1399
1452
|
"uprn": "100090557253",
|
@@ -1564,8 +1617,9 @@
|
|
1564
1617
|
"LAD24CD": "E07000091"
|
1565
1618
|
},
|
1566
1619
|
"NewarkAndSherwoodDC": {
|
1567
|
-
"
|
1568
|
-
"
|
1620
|
+
"uprn": "200004258529",
|
1621
|
+
"url": "https://app.newark-sherwooddc.gov.uk/bincollection/",
|
1622
|
+
"skip_get_url": true,
|
1569
1623
|
"wiki_name": "Newark and Sherwood",
|
1570
1624
|
"wiki_note": "Replace XXXXXXXX with your UPRN.",
|
1571
1625
|
"LAD24CD": "E07000175"
|
@@ -1585,10 +1639,11 @@
|
|
1585
1639
|
"LAD24CD": "E07000195"
|
1586
1640
|
},
|
1587
1641
|
"NewhamCouncil": {
|
1588
|
-
"
|
1589
|
-
"
|
1642
|
+
"uprn": "46077811",
|
1643
|
+
"url": "https://bincollection.newham.gov.uk/",
|
1644
|
+
"skip_get_url": true,
|
1590
1645
|
"wiki_name": "Newham",
|
1591
|
-
"wiki_note": "
|
1646
|
+
"wiki_note": "You will need to use [FindMyAddress](https://www.findmyaddress.co.uk/search) to find your UPRN.",
|
1592
1647
|
"LAD24CD": "E09000025"
|
1593
1648
|
},
|
1594
1649
|
"NewportCityCouncil": {
|
@@ -1622,7 +1677,7 @@
|
|
1622
1677
|
"NorthEastDerbyshireDistrictCouncil": {
|
1623
1678
|
"postcode": "S42 5RB",
|
1624
1679
|
"skip_get_url": true,
|
1625
|
-
"uprn": "
|
1680
|
+
"uprn": "010034492222",
|
1626
1681
|
"url": "https://myselfservice.ne-derbyshire.gov.uk/service/Check_your_Bin_Day",
|
1627
1682
|
"web_driver": "http://selenium:4444",
|
1628
1683
|
"wiki_name": "North East Derbyshire",
|
@@ -2013,6 +2068,15 @@
|
|
2013
2068
|
"wiki_note": "Follow the instructions [here](https://bins.shropshire.gov.uk/) until you get the page showing your bin collection dates, then copy the URL and replace the URL in the command.",
|
2014
2069
|
"LAD24CD": "E06000051"
|
2015
2070
|
},
|
2071
|
+
"SloughBoroughCouncil": {
|
2072
|
+
"postcode": "SL2 2EW",
|
2073
|
+
"skip_get_url": true,
|
2074
|
+
"url": "https://www.slough.gov.uk/bin-collections",
|
2075
|
+
"web_driver": "http://selenium:4444",
|
2076
|
+
"wiki_name": "Slough",
|
2077
|
+
"wiki_note": "Pass the UPRN and postcode in their respective parameters. This parser requires a Selenium webdriver.",
|
2078
|
+
"LAD24CD": "E06000039"
|
2079
|
+
},
|
2016
2080
|
"SolihullCouncil": {
|
2017
2081
|
"url": "https://digital.solihull.gov.uk/BinCollectionCalendar/Calendar.aspx?UPRN=100071005444",
|
2018
2082
|
"wiki_command_url_override": "https://digital.solihull.gov.uk/BinCollectionCalendar/Calendar.aspx?UPRN=XXXXXXXX",
|
@@ -2294,7 +2358,6 @@
|
|
2294
2358
|
"SwindonBoroughCouncil": {
|
2295
2359
|
"uprn": "10022793351",
|
2296
2360
|
"url": "https://www.swindon.gov.uk",
|
2297
|
-
"wiki_command_url_override": "https://www.swindon.gov.uk",
|
2298
2361
|
"wiki_name": "Swindon",
|
2299
2362
|
"wiki_note": "You will need to use [FindMyAddress](https://www.findmyaddress.co.uk/search) to find your UPRN.",
|
2300
2363
|
"LAD24CD": "E06000030"
|
@@ -2332,6 +2395,14 @@
|
|
2332
2395
|
"wiki_note": "Provide your UPRN. Find it using [FindMyAddress](https://www.findmyaddress.co.uk/search).",
|
2333
2396
|
"LAD24CD": "E06000020"
|
2334
2397
|
},
|
2398
|
+
"TewkesburyBoroughCouncil": {
|
2399
|
+
"skip_get_url": true,
|
2400
|
+
"uprn": "10067626314",
|
2401
|
+
"url": "https://tewkesbury.gov.uk/services/waste-and-recycling/",
|
2402
|
+
"wiki_name": "Tewkesbury",
|
2403
|
+
"wiki_note": "Provide your UPRN. Find it using [FindMyAddress](https://www.findmyaddress.co.uk/search).",
|
2404
|
+
"LAD24CD": "E07000083"
|
2405
|
+
},
|
2335
2406
|
"TendringDistrictCouncil": {
|
2336
2407
|
"postcode": "CO15 4EU",
|
2337
2408
|
"skip_get_url": true,
|
@@ -1,41 +1,86 @@
|
|
1
|
-
import
|
1
|
+
from datetime import datetime
|
2
|
+
|
2
3
|
from bs4 import BeautifulSoup
|
3
|
-
|
4
|
+
|
5
|
+
from uk_bin_collection.uk_bin_collection.common import (
|
6
|
+
date_format,
|
7
|
+
get_date_with_ordinal,
|
8
|
+
)
|
4
9
|
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass
|
5
10
|
|
6
11
|
|
7
|
-
# import the wonderful Beautiful Soup and the URL grabber
|
8
12
|
class CouncilClass(AbstractGetBinDataClass):
|
9
|
-
"""
|
10
|
-
Concrete classes have to implement all abstract operations of the
|
11
|
-
base class. They can also override some operations with a default
|
12
|
-
implementation.
|
13
|
-
"""
|
14
|
-
|
15
13
|
def parse_data(self, page: str, **kwargs) -> dict:
|
16
|
-
#
|
17
|
-
|
18
|
-
|
14
|
+
# Handle both string and Response objects
|
15
|
+
page_content = page.text if hasattr(page, "text") else page
|
16
|
+
|
17
|
+
soup = BeautifulSoup(page_content, features="html.parser")
|
19
18
|
|
20
19
|
data = {"bins": []}
|
21
20
|
collections = []
|
22
21
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
22
|
+
# Find all bin collection rows
|
23
|
+
bin_rows = soup.find_all("div", class_="bin-collection-listing-row")
|
24
|
+
|
25
|
+
if not bin_rows:
|
26
|
+
raise ValueError("No bin collection rows found in HTML")
|
27
|
+
|
28
|
+
for bin_row in bin_rows:
|
29
|
+
try:
|
30
|
+
# Get bin type from h2
|
31
|
+
bin_type_elem = bin_row.find("h2")
|
32
|
+
if not bin_type_elem:
|
33
|
+
continue
|
34
|
+
bin_type = bin_type_elem.text.strip()
|
35
|
+
|
36
|
+
# Find next collection date - look for all <p> tags
|
37
|
+
paragraphs = bin_row.find_all("p")
|
38
|
+
|
39
|
+
for p in paragraphs:
|
40
|
+
if p.get_text() and "Next collection:" in p.get_text():
|
41
|
+
date_str = p.get_text().replace("Next collection:", "").strip()
|
42
|
+
# Extract day number from date string (e.g. "2" from "Friday 2nd May")
|
43
|
+
day_number = int("".join(filter(str.isdigit, date_str)))
|
44
|
+
# Replace ordinal in date string with plain number
|
45
|
+
date_str = date_str.replace(
|
46
|
+
get_date_with_ordinal(day_number), str(day_number)
|
47
|
+
)
|
48
|
+
|
49
|
+
try:
|
50
|
+
# Parse date with full format
|
51
|
+
bin_date = datetime.strptime(date_str, "%A %d %B")
|
52
|
+
|
53
|
+
# Add current year since it's not in the date string
|
54
|
+
current_year = datetime.now().year
|
55
|
+
bin_date = bin_date.replace(year=current_year)
|
56
|
+
|
57
|
+
# If the date is in the past, it's probably for next year
|
58
|
+
if bin_date < datetime.now():
|
59
|
+
bin_date = bin_date.replace(year=current_year + 1)
|
60
|
+
|
61
|
+
collections.append((bin_type, bin_date))
|
62
|
+
print(
|
63
|
+
f"Successfully parsed date for {bin_type}: {bin_date}"
|
64
|
+
)
|
65
|
+
break
|
66
|
+
|
67
|
+
except ValueError as e:
|
68
|
+
print(
|
69
|
+
f"Failed to parse date '{date_str}' for {bin_type}: {e}"
|
70
|
+
)
|
71
|
+
continue
|
72
|
+
|
73
|
+
except Exception as e:
|
74
|
+
print(f"Error processing bin row: {e}")
|
75
|
+
continue
|
76
|
+
|
77
|
+
if not collections:
|
78
|
+
raise ValueError("No valid collection dates found")
|
34
79
|
|
35
80
|
ordered_data = sorted(collections, key=lambda x: x[1])
|
36
81
|
for item in ordered_data:
|
37
82
|
dict_data = {
|
38
|
-
"type": item[0]
|
83
|
+
"type": item[0],
|
39
84
|
"collectionDate": item[1].strftime(date_format),
|
40
85
|
}
|
41
86
|
data["bins"].append(dict_data)
|