Fetching Dynamic Website Data Using Java - javascript

I am currently using Java (Eclipse) to build this application which will be able to take a spans value from a specific website and show those values on console. But the issue i am having is, the Website i believe is Dynamic and therefore, i am not able to get those span values. The span (id=spot) keeps refreshing every 1 second and i guess it uses JavaScript. The class keeps auto changing as well when i do a "Inspect element". But if i do "View page source", there is no value inside the span. Could anyone suggest anyway to either render the web page and fetch data or any other method to do this. I have been
on google for the past 2 hours and nothing helped. I am new to this selenuim, JSoup, rhino which did not help at all. So please try to elaborate as much as you can :)
Here is the Web Page: https://www.binary.com/trading?l=EN
span id=spot

Related

How do I make specific inputs go into another .html file in the project?

I wanted to make specific inputs go into another part of a site (e.g. https://myexamplesite.com/anotherpartofit.html)
And also make those specific inputs be the ones that someone saved it in.
An example of what I think would work is: Get value from input 1 from /apartofit.html and put it in input 2 at /anotherpartofit.html and make it non-editable
If it needs to use a database, I would prefer if you could help me with firebase (Google's Database). But in my knowlege, it probably needs to use javascript, so I'll be tagging it, if it doesn't, let me know!
in visual studio or notepad or every offline web creating spaces you can't but if you buy a domain or simple , online site , you have to crate a page and get the link of that page then open another page create a button set the button's href to link of pervious page finally hit the button !

How to scrape website data into an Excel worksheet?

I'm a novice programmer trying to compile an Excel list of all the inc5000 companies and their industry, location, revenue, and CEO. Is there any way for me to automate this so that I don't have to manually input all 5000?
Some issues:
-The inc5000 list only displays 50 companies on a page, and scrolling to the next page does not change the URL. I tried converting the URL into HTML, but none of the metadata actually shows up in the HTML code (I used https://try.jsoup.org/~LGB7rk_atM2roavV0d-czMt3J_g).
-All of the information I need is on this one scrolling page (https://www.inc.com/profile/loot-crate), but the URL changes for each company as you progress down the page. Is there any way to grab the data from this site without manually changing 5000 URLs?
I'm really new to programming and I know next to nothing about HTML/JavaScript/Web design-- I only know basic Java. I would really appreciate any help or potential leads into a solution.
Here's the easy way:
Go to the page, hit f12, go to the "Network" tab of debug tools, select XHR (to filter to only the data calls) then scroll to the bottom of the page. The page makes a query for each company, that you can access in the debug tools.
Once you have all the pages, you can highlight all the rows in the file name list to the left, right click, and save it to a .har file.
From there, just write a script to pull out the json and you're set.

How to build a chrome extension to highlight text on a specific URl

I am relatively new to both programming and developing chrome extensions. I am developing a chrome extension that will do this simple thing.
On selecting a text, show a button on clicking which the text will be highlighted. (Somewhat like the pin button)
When i revisit the page I can see what where the areas i highlighted.
So currently I have a extension working which can save the bookmark to the database. This is the link from which i got this understanding http://markashleybell.com/building-a-simple-google-chrome-extension.html. If you want i can share the actual code also but it is going to crowd the question.
I think I can make get the selected text to go in to the database if i use contextmenus. But this is what i intend to do is
select the text
A icon comes up (How do i trigger the jquery to add the button, which chrome api i need to use and in which file i should put the code)
3 On clicking the icon the text gets highlighted. (how should i change the DOM of the current page)
I can do the part of extracting the text and sending it to the Database.
The next problem i have no idea about what information I need to store in the database (Example do i need to store the start or end node) so that i can have the text highlighted when i return to the URl. How does a chrome extension start on its own to figure out what part of the page need to be highlighted.
In case you have a sample code that will be great or just tell me what is the logic and chrome api's i need to use.
I know the question is too broad but even if you have a few links that can help to understand this flow it will be great. The project i am working on it to create a far similar version of https://www.diigo.com/, with just the ability to store URL along with the highlighted notes.

Access input forms of an existing page using Javascript?

I'm playing around with Google Chrome Extensions and wanted to make one where you fill out a form beforehand. Then whenever, a certain URL is opened, it fills in the information you filled out. I can save the information, and track the tab URL with one of Google's packages. However, when the URL is loaded, how can I tell what form to put the saved strings into? I know how to use var.document.getElementById(""), and can see the ids when I inspect element, but since it's not my webpage, I can't link it to my JavaScript file, so it doesn't help. I've seen this been done before but just can't find the right tools. Any guidance to an answer would be appreciated.

Using XmlHttpRequest to fetch webpage

I'm sorry for the vague title. I'm not quite sure how to word it.
I am fairly new to programming and working on a small chrome extension that checks a particular website for new product listings. I am retrieving the webpage using XmlHttpRequest, however I would like to get the webpage with certain display options already applied.
The webpage I am fetching uses javascript to change its display options. By default, it shows only in-stock items and 20 items. What I want is both in-stock and out-of-stock, and 100 items.
If I go to the website and directly change the options, then fetch the page with XmlHttpRequest, it will return what I want. But I would like to be able to do this all from within the program.
This is the webpage: http://ekizo.mandarake.co.jp/shop/en/category-action-figure.html
Any idea if this is possible and if so, how I could accomplish it? Thanks in advance.
If you look at what happens when you change the number of items to display it goes to this page with the added variables:
http://ekizo.mandarake.co.jp/shop/en/searchOption.do?action=setListCount&keyword=&searchStrategy=keyword&listCount=100
All you need to do is recreate that GET request with the details you want.
(although for the other things such as stock avaliability I have not looked as to where this is)
Firebug is your friend with this kind of thing.

Categories