I have a directed weighted multigraph whose vertices are sets of URLs.
We add to this multigraph all edges of the form $i\to j$ where $i\subset j$ (such edges are of zero weight), where $i$, $j$ are vertices of the graph.
Now having a set of source vertices and destination vertices, I need to find the minimum weight path (or several paths, if there are several such paths of the same weight) from a source to a destination of nonzero length and having at least one edge not of the form $i\to j$ where $i\subset j$.
Also it is desirable that the paths do not have adjanced edges of the form $i\to j$ where $i\subset j$.
I am currently working with Python and NetworkX.
I think (but not sure), that we can assume that the set of source vertices is disjoint with the set of destination vertices.