How to import specific url with the python script?

Hello guys,

I have a problem when i am parsing with the script in a global log.
I created 4 differents sites (ex :,,,, that mean in piwik i have 4 different ID.
All of them are logging in the same log ( but when i want to parse the log everything in the log is parsed.

in fact when i parse the log i need to parse the specific url :
when importing logs for ID 1 i only need the info from
when importing logs for ID 2 i only need the info from
Actually when i am importing the it’s importing all the resquests instead of specified sub-sites (that mean all my 4 sites have the same stats but they should not).

Is it possible to just import one of the sub-sites ( for example) instead of the logs from all 4 sub-sites together ?


Try to play with the files to create 4 different log files (some CLI tools may help here, such as grep). Then run the log import process separately with forced site ID.