How do i remove the text between <i style=" display: none;"> and </i> when i grab from the website discshop.se.
It is always a diffrent textstring so StringReplace dosn't works.
Is there a way to hide it in description?
I'm using the discshop.se script.
Remove text
It should be possible to use "TextBetween" in a "StringReplace" function, so you don't need to know the exact string you want to replace.
But I do not find the code you mentioned in your posting on the films' details page.. can you give an example URL ? Or are you talking about the
part, that is imported into description field ?
Code: Select all
Value := StringReplace(Value, TextBetween(Value, '<i style=" display: none;">', '</i>'),'');
Code: Select all
<SCRIPT language="javascript" type="text/javascript">
disableSelection(document.getElementById("text_handling"));
</script>
I got it to work. The website actual generate different codes on every updates. They really don't want anyone to copy it even if it's for private use.
Here is the code i use for "description":
Thanks for your help bad4u
Here is the code i use for "description":
Code: Select all
if CanSetField(fieldDescription) then
begin
Value := TextBetween(PageText,'Filmens handling:', '<BR>');
if Value = '' then Value := TextBetween(PageText, 'Beskrivning:', '<BR>');
Value := TextAfter(Value, '<br>');
Value := StringReplace(Value, ' ', '');
Value := StringReplace(Value, 'disableSelection(document.getElementById("text_handling"));', '');
Value := StringReplace(Value, TextBetween(Value, '<span style="display: none;">', '</span>'),'');
Value := StringReplace(Value, TextBetween(Value, '<span style=" display: none;">', '</span>'),'');
Value := StringReplace(Value, TextBetween(Value, '<span style=" display: none">', '</span>'),'');
Value := StringReplace(Value, TextBetween(Value, '<span style="display: none">', '</span>'),'');
Value := StringReplace(Value, TextBetween(Value, '<i style="display: none;">', '</i>'),'');
Value := StringReplace(Value, TextBetween(Value, '<i style=" display: none;">', '</i>'),'');
Value := StringReplace(Value, TextBetween(Value, '<i style=" display: none">', '</i>'),'');
Value := StringReplace(Value, TextBetween(Value, '<i style="display: none">', '</i>'),'');
Value := StringReplace(Value, TextBetween(Value, '<b style="display: none;">', '</b>'),'');
Value := StringReplace(Value, TextBetween(Value, '<b style=" display: none;">', '</b>'),'');
Value := StringReplace(Value, TextBetween(Value, '<b style=" display: none">', '</b>'),'');
Value := StringReplace(Value, TextBetween(Value, '<b style="display: none">', '</b>'),'');
Value := StringReplace(Value, TextBetween(Value, '<span class="infoText1234">', '</span>'),'');
Value := StringReplace(Value, '<FONT COLOR="white">i</FONT>', ' ');
Value := StringReplace(Value, #13#10,'');
Value := StringReplace(Value, #09,'');
Value := StringReplace(Value, '<br>', #13#10);
HTMLRemoveTags(Value);
HTMLDecode(Value);
SetField(fieldDescription, Value);
end;