BFS for modified shortest path
Push bus lines, not edges
I feel like your breadth first search could be improved if instead of pushing single edges onto your queue, you pushed a whole bus line.  After all, the distance you are finding is the number of bus lines traversed, not the number of edges.  So a pseudocode algorithm would be:
foreach (busline b connected to vertex 0) {
    visited_busline[b] = true;
    q.push(b, 1);  // 1 = distance
}
visited_vertex[0] = true;

while (q.notEmpty()) {
    busline, distance = q.pop();

    foreach (vertex v in busline) {
        if (v == target) {
            return distance;
        }
        if (visited_vertex[v]) {
            continue;
        }
        visited_vertex[v] = true;
        foreach (busline b connected to v) {
            if (!visited_busline[b]) {
                visited_busline[b] = true;
                q.push(b, distance+1);
            }
        } 
    }
}

Then all that is left it to parse the original input so that each vertex v contains a list of bus lines that it is connected to.
Typo
This code didn't compile for me:

    if(e.d &gt; mini)
        continue;


I believe that at some point, you changed mini to shortest_path.  Also, in this line, I believe that you can use &gt;= which can help a little in reducing your search depth by 1 level:
    if(e.d &gt;= shortest_path)
        continue;