@@ -154,7 +154,9 @@ def _from_print_page(cls, geocaching, guid, soup):
154
154
if "attribute" in cache_info ["attributes" ]: # 'blank' attribute
155
155
del cache_info ["attributes" ]["attribute" ]
156
156
cache_info ["summary" ] = content .find ("h2" , string = "Short Description" ).find_next ("div" ).text
157
- cache_info ["description" ] = content .find ("h2" , string = "Long Description" ).find_next ("div" ).text
157
+ raw_description = content .find ("h2" , string = "Long Description" ).find_next ("div" )
158
+ cache_info ["description" ] = raw_description .text
159
+ cache_info ["description_html" ] = str (raw_description )
158
160
hint = content .find (id = "uxEncryptedHint" )
159
161
cache_info ["hint" ] = hint .get_text (separator = "\n " ) if hint else None
160
162
cache_info ["waypoints" ] = Waypoint .from_html (content , table_id = "Waypoints" )
@@ -222,6 +224,7 @@ def __init__(self, geocaching, wp, **kwargs):
222
224
"attributes" ,
223
225
"summary" ,
224
226
"description" ,
227
+ "description_html" ,
225
228
"hint" ,
226
229
"favorites" ,
227
230
"pm_only" ,
@@ -613,6 +616,20 @@ def description(self, description):
613
616
description = str (description ).strip ()
614
617
self ._description = description
615
618
619
+ @property
620
+ @lazy_loaded
621
+ def description_html (self ):
622
+ """The cache long description in raw HTML.
623
+
624
+ :type: :class:`str`
625
+ """
626
+ return self ._description_html
627
+
628
+ @description_html .setter
629
+ def description_html (self , description ):
630
+ description = str (description ).strip ()
631
+ self ._description_html = description
632
+
616
633
@property
617
634
@lazy_loaded
618
635
def hint (self ):
@@ -811,7 +828,9 @@ def load(self):
811
828
}
812
829
813
830
self .summary = root .find (id = "ctl00_ContentBody_ShortDescription" ).text
814
- self .description = root .find (id = "ctl00_ContentBody_LongDescription" ).text
831
+ raw_description = root .find (id = "ctl00_ContentBody_LongDescription" )
832
+ self .description = raw_description .text
833
+ self .description_html = str (raw_description )
815
834
816
835
self .hint = rot13 (root .find (id = "div_hint" ).get_text (separator = "\n " ))
817
836
@@ -935,7 +954,9 @@ def load_by_guid(self):
935
954
936
955
self .summary = content .find ("h2" , string = "Short Description" ).find_next ("div" ).text
937
956
938
- self .description = content .find ("h2" , string = "Long Description" ).find_next ("div" ).text
957
+ raw_description = content .find ("h2" , string = "Long Description" ).find_next ("div" )
958
+ self .description = raw_description .text
959
+ self .description_html = str (raw_description )
939
960
940
961
self .hint = content .find (id = "uxEncryptedHint" ).get_text (separator = "\n " )
941
962
@@ -1078,7 +1099,6 @@ def load_logbook(self, limit=float("inf")):
1078
1099
return
1079
1100
1080
1101
for log_data in logbook_page :
1081
-
1082
1102
limit -= 1 # handle limit
1083
1103
if limit < 0 :
1084
1104
return
@@ -1120,7 +1140,6 @@ def load_trackables(self, limit=float("inf")):
1120
1140
names = [re .split (r"[\<\>]" , str (link ))[2 ] for link in links if "track" in link .get ("href" )]
1121
1141
1122
1142
for name , url in zip (names , urls ):
1123
-
1124
1143
limit -= 1 # handle limit
1125
1144
if limit < 0 :
1126
1145
return
0 commit comments