Hello,
Before I go regex on them, is there a better way to remove parameters from URLs?
================
from bs4 import BeautifulSoup, Comment
from bs4.builder import LXMLTreeBuilderForXML
soup = BeautifulSoup(open("a.html", 'r',encoding="utf8"), features='lxml')
for link in soup.find_all("a",{"class":"myclass"}):
#Get rid of params after URL?
#href="/myurlh?a=b&c=d"
#I just need to keep "
/myurl"
print(link.get('href')
================
Thank you.