Dears,
Is it Possible to have String Input as an WebPage Content? means we only enter URL for this page and it will get the content without scraping , just in the backgroud? Thanks in advance
Dears,
Is it Possible to have String Input as an WebPage Content? means we only enter URL for this page and it will get the content without scraping , just in the backgroud? Thanks in advance
Exact!!! @Nithinkrishna, only get an URL from received email and the BOT will extract the content of this page directly and use it as input for processing data…It should be fine using web browser/scrapping, but the aim is to reduce execution time
Hey @hsendel
So the URL will provide you text output right ?
If yes then you can use HTTP activity from UiPath.WebApi.Activities in which you will pass the URL which gives you back the string response which can be utilised further.
Hope this helps.
Thanks
#nK
Great!!! I have installed the package, but I see only HTTP request activity inside ?
How to extract the content, how to define Output as string ?
Yes that’s the one !
I use the “result” as string output but when checking the returned content it’s showing page code not page content
Hi @hsendel
This is why I was asking if that website has the text. But still not a problem.
Could you please open the link in the browser please and highlight what you want to scrape from it.
Thanks
#nK
It doesn’t matter, i can scrap everything than I can filter what I want latter on. The aim is to check some keywords if exists in that content or no
Hey @hsendel
Perfect then, Could you please show the response you got from that HTTP activity.
I think it would have returned you the content with HTML code.
May be first thing to check if that is returning your content required (even though it will be returning in html format) & you can try directly to check keywords in that if that works.
Else we will manipulate it.
Thanks
#nK
I need HTML format , not source code format, otherwise it will make my code more difficult when filtering
Hey @hsendel
Could you please show the screenshot of the string returned or copy paste it here ?
Thanks
#nK
Please find in attached file an output for this page ( this Topic) : Is it Possible to have String Input as a WebPage Content? - #12 by Nithinkrishna
Result.txt (59.3 KB)
In case no way to get html format, it should be fine, this can help too
Hey @hsendel
I see the content in the file you shared but yes, it will be having HTML code along with it.
But still if you want to still only get the inner text, we need to do HTML manipulation with additional code logic.
Before adding the above efforts and code, I suggest if your keyword search works fine for this HTML code + Text output then it should be fine & no need of additional logic right !
Thanks
#nK
YES, I got keywords, but it will be good if i can make clean up of this file from all speciall characters : ‘!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~’ except hyphen “-” because there are composite words like : follow-up
Hey @hsendel
Just try the below,
Regex as below inside double quotes
[!""#\$%&’()*+,-\.\/:;<=>\?@\[\\\]\^_`{\|}~]
Thanks
#nK
Please recall me of package needed for RegEx
Hey @hsendel
UiPath.System.Activities will be the package which has the Replace
activity, in which you can directly use regex as a string.
Thanks
#nK