please anybody can help me on my query. I am using Imacros. I want to extract from URL. last number of next page. the problem is when I run the url the next page number is just blink once. is there any solution where I can stop autojavascript and extract Laast Number
I dont know how to write code here is the URL
http://www.justdial.com/Jamnagar/Architects/page-50
Here its shwo just once maximum page is 5 so I want to extract that (5) number.
look in to IMAGE
thanks in Advance
use this command
TAG POS=1 TYPE=DIV ATTR=CLASS:sec-1<SP>col-sm-5<SP>hidden-xs EXTRACT=TXT
Related
I am new into Google Data Studio and I am trying to cleanse some Google Analytic data.
For example I have a filed called page which shows the page name. For some pages I have duplicates e.g: contact/product/car and contact/product/car/ (ending in this case with /)
I want to create a field that always replace the last charterer of the page name if it ends with '/' with a space
I have tried this function: REPLACE(ENDS_WITH(Page,"/"), '/','')
But is not working instead giving me true or false.
Someone can help me with this?
Please use regular expression for doing this job:
REGEXP_REPLACE(Page,"/$","")
Question in the title
Is there a non JavaScript method
Can I use eval command
Thanks in advance
You can build on this to wait if a certain String exists:
TAG POS=1 TYPE=* ATTR=* EXTRACT=HTM
SET timeout_time EVAL("'{{!EXTRACT}}'.includes('text to find')? 5 : 0")
WAIT SECONDS={{timeout_time}}
I just used a TAG that grabs everything, feel free to change that to look for your String in a more narrow context. The extracted text is then searched for your text to find, if it exists it will wait 5 seconds, otherwise 0.
I'm extracting text from a database, in which are various tags.
For example:
this is a page of text, there is another [page=5]page[/page] here or
you can download this [document=3]document[/document] or this
[document=4]document[/document]
I need to find each tag type and replace its content with different text, so in this example whatever the folder/file is for page 5, and the same for whatever documents 3 and 4 would be.
My first thought was to look through the string, initially looking for [page= or [document=, then extract everything after that up to the ], so I'd get the database id for each docoument or page.
Then i could query the database for those document/page id's, and replace [page and [document tags with proper links and their locations.
But I think there must be a more efficient way to achieve this.
Is there a simpler way of extracting the [page and [document values into say an array?
Then I could just loop through that array, do the database querys, and replace what i need?
You probably want rematch. It will return an array of matches.
I am working on processing HTML that has unique subheadings.
In their current state the subheadings are formatted as such:
<p>Example Text.</p>
What makes these subheadings unique from the rest of the paragraph tags is the period(.) that proceeds the ending tag. I would like to convert the code above to make it look like what's shown below.
<subheading>Example Text</subheading>
Take note the period that proceeded the ending paragraph tag was also removed.
Is this something that is do-able using Regex and can you please provide me an example?
Many thanks!
The response provided by Sam was sufficient enough to get me on the right track.
Thank you!
I'm using Bulk Image Downloader to download whole images in a forum thread.
But I need the regular expression to identify the page number increments.
The URL string of the page is this:
/topic/2244447/+(page number goes here)
Here's the situation, the page numbers are incremented by +20. So the second page URL is /topic/2244447/+20 and third page is /topic/2244447/+40 and so on.
How can I put the regex for this?
\/topic\/2244447\/\+([0-9]*[02468])?0$
Just being careful:
I took a look at the documentation, page 28 of the Bulk Image Downloader user's guide.
I wonder whether your page numbers end with 0 or 1.
If the + will not exist anywhere else, then this should work although it will match any number with any number of digits after the +.
\+\d+