web-scrape to first sort web-table and then scrap data

vikas0903

New Member
Joined
Dec 17, 2013
Messages
20
Hi All,
Thanks in advance for your help.

I am trying to scrap data from this page:
Algeria - Algeria - Results and fixtures - Soccerway

This page shows last matches (away & home) played by a team. I am able to scrap it using 'Record macro' functionality of excel. No problems till here.

Now I want to click a link on this page named 'Home' so that I can scrap only 'Home' matches played by a team. Clicking on 'Home' link does not alter the page address in any way. Hence I am not able to get data in particular format.

[Other method would be to scrap all data and do processing in excel. But for some rason I donot want to do it].

Thanks again for your help.
Regards!
Vikas
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi,

If you are using Chrome do the following:

1. Go to the page
2. hit F12 to open chrome developer tool
3. Click on the tab network
4. click on XHR
5. click on "home" in the website
6. you will see a JSON url is loaded, this is where your data is
7. go to scrape4me.com and load the JSON url
8. click on "your code" and then "direct url"
9. shorten the url with some online url shortener
10. open excel and click: DATA > From web
11. enter the url and hit "import"
12. all you have to do now is figure out a way to stop excel from altering the "scores/points" in to date format

Good luck
 
Upvote 0
Hi,

If you are using Chrome do the following:

1. Go to the page
2. hit F12 to open chrome developer tool
3. Click on the tab network
4. click on XHR
5. click on "home" in the website
6. you will see a JSON url is loaded, this is where your data is
7. go to scrape4me.com and load the JSON url
8. click on "your code" and then "direct url"
9. shorten the url with some online url shortener
10. open excel and click: DATA > From web
11. enter the url and hit "import"
12. all you have to do now is figure out a way to stop excel from altering the "scores/points" in to date format

Good luck

I am using IE for the accessinf webpage. I beleived we can not use Google chrome with excel VBA. (Though we can use shell command to open it.) Also for clicks, you mentioned, I may have to use SENDKEYS, which are considered unreliable. Is here a way to do it?
 
Upvote 0
I am using IE for the accessinf webpage. I beleived we can not use Google chrome with excel VBA. (Though we can use shell command to open it.) Also for clicks, you mentioned, I may have to use SENDKEYS, which are considered unreliable. Is here a way to do it?

Why don't you just download Chrome, follow the steps and TRY to understand what I'm telling you? It's really not that difficult...

The data you want is not physically on the website but loaded with a JSON file located on this URL:


http://int.soccerway.com/a/block_te...action=filterMatches&params={"filter":"home"}


Now you can scrape the data and manipulate the JSON file however you want but Im sensing you don't know how to do that, so thats why I pointed to scrape4me.com which will output the JSON file as a table:

http://scrape4me.com/api?url=http:/...ms=%7B%22filter%22%3A%22home%22%7D&elm=&ch=ch


You can now use this table DIRECTLY in excel as I previously mentioned. If you however for some reason want to use VBA or your macro then just POINT at the URL scrape4me.com gives you. Like you said:

I am able to scrap it using 'Record macro' functionality of excel. No problems till here.

So just use the last URL. Do you understand this...?
 
Upvote 0
Why don't you just download Chrome, follow the steps and TRY to understand what I'm telling you? It's really not that difficult...

The data you want is not physically on the website but loaded with a JSON file located on this URL:


http://int.soccerway.com/a/block_te...action=filterMatches&params={"filter":"home"}


Now you can scrape the data and manipulate the JSON file however you want but Im sensing you don't know how to do that, so thats why I pointed to scrape4me.com which will output the JSON file as a table:

http://scrape4me.com/api?url=http:/...ms=%7B%22filter%22%3A%22home%22%7D&elm=&ch=ch


You can now use this table DIRECTLY in excel as I previously mentioned. If you however for some reason want to use VBA or your macro then just POINT at the URL scrape4me.com gives you. Like you said:



So just use the last URL. Do you understand this...?

Thanks again for your reply and apologies for replying so late. It worked.
 
Upvote 0

Forum statistics

Threads
1,214,864
Messages
6,121,981
Members
449,058
Latest member
oculus

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top