2009-11-23, 14:07
Hi,
I need help in python code:
below is actual url
http://www.filmicity.net/forumdisplay.php?f=33
whenever I try to scrape it, the output comes as
I am not sure where - " "- comes from
So I thought of doing htmlencode as below
but later found out that the value after "?s=**** keeps changing like below
So I just wanted to know how to get rid of these randomly changing value in htmlencode, is there any wildcard concept in htmlencode or any other way I can do it ?
Please let me know.
Thanks
I need help in python code:
below is actual url
http://www.filmicity.net/forumdisplay.php?f=33
whenever I try to scrape it, the output comes as
Code:
http://www.filmicity.net/forumdisplay.php?"s=****************amp"f=33
I am not sure where - " "- comes from
So I thought of doing htmlencode as below
Code:
def htmlencode(text):
"""Use HTML entities to encode special characters in the given text."""
text = text.replace('?', '?',)
return text
but later found out that the value after "?s=**** keeps changing like below
Code:
http://www.filmicity.net/forumdisplay.php?"s=********amp"f=33
So I just wanted to know how to get rid of these randomly changing value in htmlencode, is there any wildcard concept in htmlencode or any other way I can do it ?
Please let me know.
Thanks