remove_from_end

swpy.swds.request.remove_from_end(url, pop_str)

Removes a specific substring from the end of a URL string. After removing pop_str, if there is a trailing space at the end of the URL, it should be removed. Additionally, if pop_str is 'skip', the original URL string is returned.

Parameters

  • url (str) – URL containing the data to be fetched.
  • pop_str (str) – Specific string to remove from the end of the URL string.
  • Returns

  • url : URL address with 'pop_str' removed from the end