How to get host links from javascript | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

How to get host links from javascript

20th Sep 2019, 8:59 PM
Jatin
22 Answers
+ 1
I m writing script in python 2.7.13 but inside js script
21st Sep 2019, 11:06 AM
Jatin
+ 1
The links r hidden inside js script
21st Sep 2019, 11:06 AM
Jatin
0
I'm not sure if I'm misunderstanding but this will get you a list of all the links on the DOM. var linkList = document. getElementsByTagName("a"); console.log(linkList);
21st Sep 2019, 12:43 AM
Anthony Johnson
Anthony Johnson - avatar
0
Thank u Antony I will give a try
21st Sep 2019, 8:29 AM
Jatin
0
I have try this code dissent give me anything python 2.7.13
21st Sep 2019, 9:42 AM
Jatin
0
It's actually mp4 links
21st Sep 2019, 9:43 AM
Jatin
0
Ok it is all the same except instead of getElementsByTagName"a" Use getElementsByTagName"video" Did you mean Python or JavaScript?
21st Sep 2019, 10:14 AM
Anthony Johnson
Anthony Johnson - avatar
0
When i type your code it gives me error linkList
21st Sep 2019, 11:07 AM
Jatin
0
var linkList = document. getElementsByTagName("video"); console.log(linkList);
21st Sep 2019, 11:08 AM
Jatin
0
Ok, skip the variable and just try console.log(document.getElementsByTagName("video"));
21st Sep 2019, 11:17 AM
Anthony Johnson
Anthony Johnson - avatar
0
Or you can type in document In the console and get a list of everything.
21st Sep 2019, 11:33 AM
Anthony Johnson
Anthony Johnson - avatar
0
Movies links r in href
21st Sep 2019, 11:34 AM
Jatin
0
<a target = _blank href=http://verystream.com/stream/2agkXxLgRXp/ rel="noopener noreferrer">
21st Sep 2019, 11:38 AM
Jatin
0
Ok than use tag name "link" and it gives you a list
21st Sep 2019, 11:38 AM
Anthony Johnson
Anthony Johnson - avatar
0
<iframe src=http://openload.co/f/x6s6GZIMHzU rel="noopener noreferrer"
21st Sep 2019, 11:40 AM
Jatin
0
The tag name is <a> in that example. and iframe in the second example
21st Sep 2019, 11:40 AM
Anthony Johnson
Anthony Johnson - avatar
0
Yes
21st Sep 2019, 11:41 AM
Jatin
0
One tag name is <a> and another tag name is <iframe>
21st Sep 2019, 11:42 AM
Jatin
0
Python says name console is not define
21st Sep 2019, 12:09 PM
Jatin
0
I m doing this site https://mkvhub.com
21st Sep 2019, 12:19 PM
Jatin