blob: 877ddc3cd481ad6d1bffcf321e204fd898f90335 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
pub fn strip_irrelevant_content(s: &str) -> String {
let mut retn = "";
match s.find(r#"<div class=profile id=profile>"#) {
Some(pos) => retn = &s[pos..],
None => (),
};
match s.find(r#"<INPUT style="font-size: 2em;" TYPE=SUBMIT NAME="votes" VALUE="Cast Votes">"#) {
Some(pos) => retn = &s[..pos],
None => (),
};
return retn.into();
}
|