Problems with copying content of page

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
brokenzeus
Posts: 9
Joined: Sat Nov 23, 2019 5:29 pm

Problems with copying content of page

Post by brokenzeus » Sat Nov 23, 2019 5:34 pm

Hello

I have a problem with copying and pasting content of a webpage.
The problem I am having is that it just copies the link and not the content on that page. Am I doing something wrong?

Code: Select all

My script:
VERSION BUILD=1005 RECORDER=CR
URL GOTO=https://kultoical.dries007.net/
TAG POS=1 TYPE=INPUT:DATE FORM=ACTION:https://kultoical.dries007.net/ ATTR=ID:start CONTENT=2019-11-01
TAG POS=1 TYPE=INPUT:DATE FORM=ACTION:https://kultoical.dries007.net/ ATTR=ID:end CONTENT=2020-01-31
TAG POS=1 TYPE=BUTTON FORM=ACTION:https://kultoical.dries007.net/ ATTR=TXT:Next
TAG POS=1 TYPE=A ATTR=TXT:https://webwsp.aps.kuleuven.be/sap/opu/odata/sap/zc_ep_sched* EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
TAB T=2
TAB T=1
TAG POS=1 TYPE=TEXTAREA FORM=ACTION:https://kultoical.dries007.net/ ATTR=ID:json CONTENT={{!VAR1}}

Thanks (Happy to provide more information)
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Problems with copying content of page

Post by chivracq » Sat Nov 23, 2019 7:05 pm

brokenzeus wrote:
Sat Nov 23, 2019 5:34 pm
Hello

I have a problem with copying and pasting content of a webpage.
The problem I am having is that it just copies the link and not the content on that page. Am I doing something wrong?

My script:

Code: Select all

VERSION BUILD=1005 RECORDER=CR
URL GOTO=https://kultoical.dries007.net/
TAG POS=1 TYPE=INPUT:DATE FORM=ACTION:https://kultoical.dries007.net/ ATTR=ID:start CONTENT=2019-11-01
TAG POS=1 TYPE=INPUT:DATE FORM=ACTION:https://kultoical.dries007.net/ ATTR=ID:end CONTENT=2020-01-31
TAG POS=1 TYPE=BUTTON FORM=ACTION:https://kultoical.dries007.net/ ATTR=TXT:Next
TAG POS=1 TYPE=A ATTR=TXT:https://webwsp.aps.kuleuven.be/sap/opu/odata/sap/zc_ep_sched* EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
TAB T=2
TAB T=1
TAG POS=1 TYPE=TEXTAREA FORM=ACTION:https://kultoical.dries007.net/ ATTR=ID:json CONTENT={{!VAR1}}
Thanks (Happy to provide more information)

FCIM...! :mrgreen: (Read my Sig...)
=> iMacros for CR v10.0.5, 'Free'/'PE'...?, CR v...?, OS...?

But hum..., yep, normal I would think, you only have one 'EXTRACT' in your Script, on the Link, and you don't do anything on 'TAB_2'...
Some 'EXTRACT' is missing on 'TAB_2'...

Hum, and I guess you want to click on that Link, and not extract it, indeed..., the 'EXTRACT' is for 'TAB_2'...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
brokenzeus
Posts: 9
Joined: Sat Nov 23, 2019 5:29 pm

Re: Problems with copying content of page

Post by brokenzeus » Sat Nov 23, 2019 9:29 pm

Yes its iMacros for Chrome the free version and I am on Mac OS. The script clicks on the link but it doesn't copy the content of that page. The script that i posted copies and paste in the box but it copies the url of the site not the content of it.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Problems with copying content of page

Post by chivracq » Sat Nov 23, 2019 9:51 pm

brokenzeus wrote:
Sat Nov 23, 2019 9:29 pm
Yes its iMacros for Chrome the free version and I am on Mac OS. The script clicks on the link but it doesn't copy the content of that page. The script that i posted copies and paste in the box but it copies the url of the site not the content of it.

CR Version still missing from your FCI..., but OK, never mind...

No, your Script won't click on the Link as the 'EXTRACT' on it will prevent from clicking on it...
The 'EXTRACT' needs to take place on 'TAB_2' but you currently do nothing on 'TAB_2'...
(I can't see the Content of the Page opened (manually) by the Link as I get some Login Page...)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
brokenzeus
Posts: 9
Joined: Sat Nov 23, 2019 5:29 pm

Re: Problems with copying content of page

Post by brokenzeus » Sat Nov 23, 2019 9:58 pm

The CR is 78.0.3904.97. Yes that page does requires a login but only once and than you can access it for about 3 hours or something like that. On that page there's only code something like this:

Code: Select all

{"d":{"results":[{"__metadata":{"id":"https://WEBWSP.APS.KULEUVEN.BE:443/sap/opu/odata/sap/zc_ep_schedule_srv/Events('5533853820191118083000103000')","uri":"https://WEBWSP.APS.KULEUVEN.BE:443/sap/opu/odata/sap/zc_ep_schedule_srv/Events('5533853820191118083000103000')","type":"ZZ_EP_UURROOSTER.Event"},"event_GUID":"5533853820191118083000103000","eventID":"55338538","day_in_week":"0 ","start_time":"PT08H30M00S","end_time":"PT10H30M00S","groupinfo_general":"1VTef","groupinfo_detail":"","language":"","ola_description":"Rekenen in voertuigtechnologie","ects_code":"V6V004","date":"\/Date(1574035200000)\/","workFormID":"","workFormDesc":"","url_ects":"onderwijsaanbod.vives-zuid.be/2019/syllabi/n/V1V004N.htm","event_type":"CUR","EventTeacherSet":{"results":[{"__metadata":{"id":"https://WEBWSP.APS.KULEUVEN.BE:443/sap/opu/odata/sap/zc_ep_schedule_srv/EventTeachers(eventUserID='00081645',event_GUID='5533853820191118083000103000')","uri":"https://WEBWSP.APS.KULEUVEN.BE:443/sap/opu/odata/sap/zc_ep_schedule_srv/EventTeachers(eventUserID='00081645',event_GUID='5533853820191118083000103000')","type":"ZZ_EP_UURROOSTER.EventTeacher"},"eventUserID":"00081645","event_GUID":"5533853820191118083000103000","name":"Descamps Wim","headPersno":"00081645","url_wiwo":"http://www.kuleuven.be/wieiswie/nl/person/00081645"}]},"EventLocationSet":{"results":[{"__metadata":{"id":"https://WEBWSP.APS.KULEUVEN.BE:443/sap/opu/odata/sap/zc_ep_schedule_srv/EventLocations(eventLocationID='53364218',event_GUID='5533853820191118083000103000')","uri":"https://WEBWSP.APS.KULEUVEN.BE:443/sap/opu/odata/sap/zc_ep_schedule_srv/EventLocations(eventLocationID='53364218',event_GUID='5533853820191118083000103000')","type":"ZZ_EP_UURROOSTER.EventLocation"},"eventLocationID":"53364218","event_GUID":"5533853820191118083000103000","buildingNumber":"","roomNumber":"02.4209","roomName":"A - D2.04 klaslokaal 
I tried doing the extraction on tab 2 but it's not really working... I also don't really understand why it's not working and if it does work why its working. I just used the record button which worked great but instead of copying the content of that page (which chances) it stored it and used that.

This is the new script i have (which isn't working)

Code: Select all

VERSION BUILD=1005 RECORDER=CR
URL GOTO=https://kultoical.dries007.net/
TAG POS=1 TYPE=INPUT:DATE FORM=ACTION:https://kultoical.dries007.net/ ATTR=ID:start CONTENT=2019-11-01
TAG POS=1 TYPE=INPUT:DATE FORM=ACTION:https://kultoical.dries007.net/ ATTR=ID:end CONTENT=2020-01-31
TAG POS=1 TYPE=BUTTON FORM=ACTION:https://kultoical.dries007.net/ ATTR=TXT:Next
TAG POS=1 TYPE=A ATTR=TXT:https://webwsp.aps.kuleuven.be/sap/opu/odata/sap/zc_ep_sched*
TAB T=2
TAG POS=1 TYPE=PRE ATTR=TXT:* EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
TAB T=1
TAG POS=1 TYPE=TEXTAREA FORM=ACTION:https://kultoical.dries007.net/ ATTR=ID:json CONTENT={{!VAR1}}
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Problems with copying content of page

Post by chivracq » Sat Nov 23, 2019 10:10 pm

brokenzeus wrote:
Sat Nov 23, 2019 9:58 pm
The CR is 78.0.3904.97. Yes that page does requires a login but only once and than you can access it for about 3 hours or something like that. On that page there's only code something like this:

Code: Select all

{"d":{"results":[{"__metadata":{"id":"https://WEBWSP.APS.KULEUVEN.BE:443/sap/opu/odata/sap/zc_ep_schedule_srv/Events('5533853820191118083000103000')","uri":"https://WEBWSP.APS.KULEUVEN.BE:443/sap/opu/odata/sap/zc_ep_schedule_srv/Events('5533853820191118083000103000')","type":"ZZ_EP_UURROOSTER.Event"},"event_GUID":"5533853820191118083000103000","eventID":"55338538","day_in_week":"0 ","start_time":"PT08H30M00S","end_time":"PT10H30M00S","groupinfo_general":"1VTef","groupinfo_detail":"","language":"","ola_description":"Rekenen in voertuigtechnologie","ects_code":"V6V004","date":"\/Date(1574035200000)\/","workFormID":"","workFormDesc":"","url_ects":"onderwijsaanbod.vives-zuid.be/2019/syllabi/n/V1V004N.htm","event_type":"CUR","EventTeacherSet":{"results":[{"__metadata":{"id":"https://WEBWSP.APS.KULEUVEN.BE:443/sap/opu/odata/sap/zc_ep_schedule_srv/EventTeachers(eventUserID='00081645',event_GUID='5533853820191118083000103000')","uri":"https://WEBWSP.APS.KULEUVEN.BE:443/sap/opu/odata/sap/zc_ep_schedule_srv/EventTeachers(eventUserID='00081645',event_GUID='5533853820191118083000103000')","type":"ZZ_EP_UURROOSTER.EventTeacher"},"eventUserID":"00081645","event_GUID":"5533853820191118083000103000","name":"Descamps Wim","headPersno":"00081645","url_wiwo":"http://www.kuleuven.be/wieiswie/nl/person/00081645"}]},"EventLocationSet":{"results":[{"__metadata":{"id":"https://WEBWSP.APS.KULEUVEN.BE:443/sap/opu/odata/sap/zc_ep_schedule_srv/EventLocations(eventLocationID='53364218',event_GUID='5533853820191118083000103000')","uri":"https://WEBWSP.APS.KULEUVEN.BE:443/sap/opu/odata/sap/zc_ep_schedule_srv/EventLocations(eventLocationID='53364218',event_GUID='5533853820191118083000103000')","type":"ZZ_EP_UURROOSTER.EventLocation"},"eventLocationID":"53364218","event_GUID":"5533853820191118083000103000","buildingNumber":"","roomNumber":"02.4209","roomName":"A - D2.04 klaslokaal 
I tried doing the extraction on tab 2 but it's not really working... I also don't really understand why it's not working and if it does work why its working. I just used the record button which worked great but instead of copying the content of that page (which chances) it stored it and used that.

This is the new script i have (which isn't working)

Code: Select all

VERSION BUILD=1005 RECORDER=CR
URL GOTO=https://kultoical.dries007.net/
TAG POS=1 TYPE=INPUT:DATE FORM=ACTION:https://kultoical.dries007.net/ ATTR=ID:start CONTENT=2019-11-01
TAG POS=1 TYPE=INPUT:DATE FORM=ACTION:https://kultoical.dries007.net/ ATTR=ID:end CONTENT=2020-01-31
TAG POS=1 TYPE=BUTTON FORM=ACTION:https://kultoical.dries007.net/ ATTR=TXT:Next
TAG POS=1 TYPE=A ATTR=TXT:https://webwsp.aps.kuleuven.be/sap/opu/odata/sap/zc_ep_sched*
TAB T=2
TAG POS=1 TYPE=PRE ATTR=TXT:* EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
TAB T=1
TAG POS=1 TYPE=TEXTAREA FORM=ACTION:https://kultoical.dries007.net/ ATTR=ID:json CONTENT={{!VAR1}}

Ah..., good, we finally have your FCI:

Code: Select all

iMacros for CR v10.0.5 'Free', CR78, MacOS.
Next time you open a Thread, put that Info in your OP, preferably at the complete top, I usually don't react otherwise... :idea:

Then OK, this Script now looks "much better" to me...!

Your "(which isn't working)" is a bit vague... What do you get in the 'EXTRACT'...? (or in '!VAR1'...? as you copy that Content to that Var, which is not really necessary, you could paste the Content of '!EXTRACT' directly into the 'TEXTAREA' Field on 'TAB_1'.)...?
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
brokenzeus
Posts: 9
Joined: Sat Nov 23, 2019 5:29 pm

Re: Problems with copying content of page

Post by brokenzeus » Sat Nov 23, 2019 10:21 pm

Sorry should've know and done that. Definitely will do it next time!

What I mean by it's not working is that it is not extracting anything. I do not get a pop up box saying this is the extracted content nor is there anything being pasted in the text area on tab 1. So I think there is something wrong with the extracting part of the script.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Problems with copying content of page

Post by chivracq » Sat Nov 23, 2019 10:30 pm

brokenzeus wrote:
Sat Nov 23, 2019 10:21 pm
Sorry should've know and done that. Definitely will do it next time!

What I mean by it's not working is that it is not extracting anything. I do not get a pop up box saying this is the extracted content nor is there anything being pasted in the text area on tab 1. So I think there is something wrong with the extracting part of the script.

Alright, then that means there are more than 1 'PRE' Elements on the Page, and the 'POS=1' is now picking up the "wrong" one, you would need to try with 'POS=2' etc...

But try this one:

Code: Select all

VERSION BUILD=1005 RECORDER=CR
URL GOTO=https://kultoical.dries007.net/

TAG POS=1 TYPE=INPUT:DATE FORM=ACTION:https://kultoical.dries007.net/ ATTR=ID:start CONTENT=2019-11-01
TAG POS=1 TYPE=INPUT:DATE FORM=ACTION:https://kultoical.dries007.net/ ATTR=ID:end CONTENT=2020-01-31
TAG POS=1 TYPE=BUTTON FORM=ACTION:https://kultoical.dries007.net/ ATTR=TXT:Next
TAG POS=1 TYPE=A ATTR=TXT:https://webwsp.aps.kuleuven.be/sap/opu/odata/sap/zc_ep_sched*

TAB T=2
'TAG POS=1 TYPE=PRE ATTR=TXT:* EXTRACT=TXT
TAG POS=1 TYPE=PRE ATTR=TXT:*results*metadata* EXTRACT=TXT
'SET !VAR1 {{!EXTRACT}}

TAB T=1
'TAG POS=1 TYPE=TEXTAREA FORM=ACTION:https://kultoical.dries007.net/ ATTR=ID:json CONTENT={{!VAR1}}
TAG POS=1 TYPE=TEXTAREA FORM=ACTION:https://kultoical.dries007.net/ ATTR=ID:json CONTENT={{!EXTRACT}}
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
brokenzeus
Posts: 9
Joined: Sat Nov 23, 2019 5:29 pm

Re: Problems with copying content of page

Post by brokenzeus » Sat Nov 23, 2019 10:37 pm

Thanks for the quick replies.

I tried the code you gave me but still no change. It's still not extracting or pasting anything. I tried different POS till POS 4 don't know how far they go but I think indefinitely.

It's quite strange and don't really know why it's not doing it. On TAB 2 there's only code and its located in the body of the page but I don't think that helps anything.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Problems with copying content of page

Post by chivracq » Sat Nov 23, 2019 10:41 pm

brokenzeus wrote:
Sat Nov 23, 2019 10:37 pm
Thanks for the quick replies.

I tried the code you gave me but still no change. It's still not extracting or pasting anything. I tried different POS till POS 4 don't know how far they go but I think indefinitely.

It's quite strange and don't really know why it's not doing it. On TAB 2 there's only code and its located in the body of the page but I don't think that helps anything.

Hum, strange, then the 'TYPE=PRE' is maybe incorrect...

Do you get "stg" extracted from this one...?:

Code: Select all

TAG POS=1 TYPE=* ATTR=TXT:*results*metadata* EXTRACT=TXT
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
brokenzeus
Posts: 9
Joined: Sat Nov 23, 2019 5:29 pm

Re: Problems with copying content of page

Post by brokenzeus » Sat Nov 23, 2019 10:46 pm

Nope, still the same not extracting or pasting. Maybe I need to use CLIPBOARD instead of EXTRACTING?
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Problems with copying content of page

Post by chivracq » Sat Nov 23, 2019 10:54 pm

brokenzeus wrote:
Sat Nov 23, 2019 10:46 pm
Nope, still the same not extracting or pasting. Maybe I need to use CLIPBOARD instead of EXTRACTING?

No '!CLIPBOARD' won't help...

Hum, any chance you could post the (whole) HTML Source of that Page...? ... or upload an HTML 'Save as' of the Page to the Thread...? (You'll need to zip it to be able to upload it to the Thread...)
Then I would be able to have a look myself... :wink:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
brokenzeus
Posts: 9
Joined: Sat Nov 23, 2019 5:29 pm

Re: Problems with copying content of page

Post by brokenzeus » Sun Nov 24, 2019 11:38 am

I saved the page and compressed it to .zip and uploaded it. As you will on the page it's just code of some sort that needs to be pasted in the text box of the other page.
Last edited by brokenzeus on Sun Nov 24, 2019 4:04 pm, edited 1 time in total.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Problems with copying content of page

Post by chivracq » Sun Nov 24, 2019 3:59 pm

brokenzeus wrote:
Sun Nov 24, 2019 11:38 am
I saved the page and compressed it to .zip and uploaded it. As you will on the page it's just code of some sort that needs to be pasted in the text box of the other page.

Alright, good-good...! Thanks for the Upload, that's "easier" then...!
A bit "surprised" that your "page2" has no File Extension, I would have "expected" some ".html" or ".htm" or even some ".json" or ".xml" or ".txt", but anyway...

And some good News, the Script you had posted earlier works just fine for me, same with my slightly modified one after that, and even absolutely all Variations "we" did with:

Code: Select all

TAG POS=1 TYPE=PRE ATTR=TXT:* EXTRACT=TXT

Code: Select all

TAG POS=1 TYPE=PRE ATTR=TXT:*results*metadata* EXTRACT=TXT

Code: Select all

TAG POS=1 TYPE=* ATTR=TXT:*results*metadata* EXTRACT=TXT
=> They all work fine...!

I tested in the following 2 FCI's:
- iMacros for FF v8.8.2, Pale Moon v26.3.3 (=FF47), Win10_x64.
- iMacros for CR v10.0.5 'Free', CR76, Win10_x64.

=> Yep, I'm "still" at CR76 because I consider that CR behaves like Malware and cannot be "trusted" as "they" (= 'Google') couldn't even give a "proper" Name to their Browser Updater (=> "Google Updater"...!? :shock: ), "Google" is a Search Engine for me, and simply checking if by any chance there is maybe a new(er) Version of the Browser already requires Local Admin Rights that that Updater then abusively misuses to install several extra '.EXE's and Processes and Services that I each time need to clean up afterwards... :roll:

With iMacros for FF, because the Page/File is pretty large (155Kb) and I didn't really "pay attention", the 'EXTRACT' took several Minutes, more than 3 Min, up to maybe 5 Min..., easily prevented with "SET !EXTRACT_TEST_POPUP NO". (But iMacros for CR doesn't "suffer" from this Lag...)

So, OK, here is the "most generic" Script I used to do my Testing, I removed the 'FORM' Parameter, which is not really needed, and "your" "FORM=ACTION:+URL" was not working for me...:

Code: Select all

VERSION BUILD=8820413 RECORDER=FX
SET !EXTRACT_TEST_POPUP NO

TAB T=1
URL GOTO=https://kultoical.dries007.net/
TAG POS=1 TYPE=INPUT:DATE ATTR=ID:start CONTENT=2019-11-01
TAG POS=1 TYPE=INPUT:DATE ATTR=ID:end CONTENT=2020-01-31
TAG POS=1 TYPE=BUTTON ATTR=TXT:Next
TAG POS=1 TYPE=A ATTR=TXT:https://webwsp.aps.kuleuven.be/sap/opu/odata/sap/zc_ep_sched*

TAB T=2
'URL GOTO=file:///D:/TEMP/iMacros/Temp/_Forum%20Cases/brokenzeus/Page2/Page2
'Recorded:
'TAG POS=1 TYPE=PRE ATTR=TXT:{"d":{"results":[{"__metadata":{"id":"https://WEBWSP.APS.KUL*
'>
TAG POS=1 TYPE=PRE ATTR=TXT:* EXTRACT=TXT

TAB T=1
TAG POS=1 TYPE=TEXTAREA ATTR=ID:json CONTENT={{!EXTRACT}}
I already had 'Page2' pre-loaded in 'TAB_2', and I disabled the Click on the Link, but you'll need to re-enable it for you... Hum, OK, I've already re-enabled it for you... 8)

:arrow: :!: OK..., stg that could play a Role for you, because of this 'Page2' with no Extension, and I don't know if you've removed it when saving/zipping it, or maybe the Page gets indeed generated locally, but make sure you have "Allow access to file URLs" enabled in the iMacros Settings at:

Code: Select all

chrome://extensions/?id=cplklnmnlbnpmjogncfgfijoopmnlemp
>>>

Alternately, the following Script also works "for me" in v8.8.2 for FF, with a different Implementation using the 'EVENT' Mode and the OS Clipboard, but it doesn't work in v10.0.5 for CR which doesn't support the 'MODIFIERS' Param nor pasting from the Clipboard with '{{!CLIPBOARD}}'...: :oops:

Code: Select all

VERSION BUILD=8820413 RECORDER=FX
SET !EXTRACT_TEST_POPUP NO

TAB T=1
URL GOTO=https://kultoical.dries007.net/
TAG POS=1 TYPE=INPUT:DATE ATTR=ID:start CONTENT=2019-11-01
TAG POS=1 TYPE=INPUT:DATE ATTR=ID:end CONTENT=2020-01-31
TAG POS=1 TYPE=BUTTON ATTR=TXT:Next
TAG POS=1 TYPE=A ATTR=TXT:https://webwsp.aps.kuleuven.be/sap/opu/odata/sap/zc_ep_sched*

TAB T=2
'URL GOTO=file:///D:/TEMP/iMacros/Temp/_Forum%20Cases/brokenzeus/Page2/Page2
'Recorded:
'TAG POS=1 TYPE=PRE ATTR=TXT:{"d":{"results":[{"__metadata":{"id":"https://WEBWSP.APS.KUL*
'>
'TAG POS=1 TYPE=PRE ATTR=TXT:* EXTRACT=TXT
'>
'EVENT TYPE=CLICK SELECTOR="HTML>BODY>PRE" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY" CHARS="ac" MODIFIERS="Ctrl"

TAB T=1
'TAG POS=1 TYPE=TEXTAREA ATTR=ID:json CONTENT={{!EXTRACT}}
'>
TAG POS=1 TYPE=TEXTAREA ATTR=ID:json CONTENT={{!CLIPBOARD}}
You can give it a Try, but it won't work for you, ah-ah...! :twisted:
But it would work for you for example in iMacros for FF v8.9.7, FF v55.0.3, MacOS, and you would need to replace my "MODIFIERS="Ctrl"" with "MODIFIERS="Meta"" as you are on MacOS (and I'm on Win10)... 8)

>>>

You can remove your Attachment if you want, I now already/still have it if I need to do some further Checking/Testing..., as it contains a bit of some "personal" Info and some Internal URL's to your 'KUL' Site... :|

Hum, and funny, I thought you spoke French in Leuven, some good Friend of mine (in Amsterdam) is going to further study in Leuven from Feb. next year (2020), planning to find a Place to live in BXL actually, and she speaks much better French than Dutch, and I have the "Feeling" she thinks/thought "they" (also) spoke French in Leuven..., but maybe her Study is part of some International Study in English, I don't know... :o
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
brokenzeus
Posts: 9
Joined: Sat Nov 23, 2019 5:29 pm

Re: Problems with copying content of page

Post by brokenzeus » Sun Nov 24, 2019 7:39 pm

Thanks for all the help. Appreciate it. I took the uploaded page offline. As far as the extension goes i tried saving the page on a windows computer and there it saved as .json.

I tried your script on my mac in chrome but it's still not working. It does not copy the text from page 2 into the text box on page1. I tried it on Win 10 on FF 70.0.1 (64-bits) but still not working. When i tried to run the script you said would only work on FF i get an error that EVENTS is not supported.

But i do not understand why it is not working. You say that it works on your browser and computer but on mine it's not. Very strange.

And yes in Leuven most people talk Dutch instead of French because Leuven is part of the Flemish speaking region. It's quite tricky.
Post Reply