Marthee commited on
Commit
3a4acfd
·
verified ·
1 Parent(s): df6b5f3

Update Find_Hyperlinking_text.py

Browse files
Files changed (1) hide show
  1. Find_Hyperlinking_text.py +2 -7
Find_Hyperlinking_text.py CHANGED
@@ -268,19 +268,14 @@ def annotate_text_from_pdf(pdfshareablelinks, LISTheading_to_search):
268
  # Build the query parameters
269
  params = {
270
  'pdfLink': link, # Your PDF link
271
- 'keyword': NBS_heading, # Your keyword (could be a string or list)
272
- 'page': str(pageNumberFound),
273
- 'zoom': str(zoom_str)
274
  }
275
-
276
- # Encode each parameter individually
277
  encoded_params = {key: urllib.parse.quote(value, safe='') for key, value in params.items()}
278
-
279
  # Construct the final encoded link
280
  encoded_link = '&'.join([f"{key}={value}" for key, value in encoded_params.items()])
281
 
282
  # Combine with the base link
283
- final_url = baselink + encoded_link
284
 
285
  # Optionally, add the URL to a DataFrame
286
  if len(groupmainheadingFromArray) > 0:
 
268
  # Build the query parameters
269
  params = {
270
  'pdfLink': link, # Your PDF link
271
+ 'keyword': NBS_heading, # Your keyword (could be a string or list)
 
 
272
  }
 
 
273
  encoded_params = {key: urllib.parse.quote(value, safe='') for key, value in params.items()}
 
274
  # Construct the final encoded link
275
  encoded_link = '&'.join([f"{key}={value}" for key, value in encoded_params.items()])
276
 
277
  # Combine with the base link
278
+ final_url = baselink + encoded_link+'#page='+str(pageNumberFound)+'&zoom=',str(zoom_str)
279
 
280
  # Optionally, add the URL to a DataFrame
281
  if len(groupmainheadingFromArray) > 0: