Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] tHttpRequest - how to retrieve html content from URL

Hello,
I'm trying to get the HTML content from URL's that I have in a CSV File with the tHttpRequest Component.
My CSV FIle looks like this:
column1
http://www.example.com/item-url-1.html

http://www.example.com/item-url-2.html
http://www.example.com/item-url-3.html
Attached you see 2 screenshots with the job and the settings of the component in talend.
The problem is that I get as result the same URLs and not the HTML from the URLs.
Can anyone tell me what am I missing?

Job done:
0683p000009MD0L.pngBasic settings in Talend:
0683p000009MD2u.png
Thanks,
Lucian
Labels (3)
14 Replies
Anonymous
Not applicable
Author

Hi 
Check the 'append' option on tFileOutputDelimited to append the data, otherwise, it will create a new file for each iteration.
BR
Shong
Anonymous
Not applicable
Author

Hi Shong,
the append option box solved the problem. I can't stress it enough how grateful I am to you!
I get now the desired html content for each row but the rows are not assigned to my "sku" column from input file because like you said it's read only
Is there a way I can add the "sku" column from the input csv as a key column on output for each extracted url?
Thank you,
Lucian
Anonymous
Not applicable
Author

The sku column can be accessible with this expression in your example:
(String)globalMap.get("row35.sku")

So, add a tMap after tHttpRequest, add a new column called "sku" in the output table and set its values as:
(String)globalMap.get("row35.sku")
Anonymous
Not applicable
Author

Hi,
thank you Shong. That solved the problem.
Regards,
Lucian
Anonymous
Not applicable
Author

great, thanks for your feedback!
BR
Shong