0

I'm a beginner! I'm trying to code a for-while loop using Twint to scrape Twitter, starting from a list or a dict of usernames and ending up with a (NetworkX) directed graph of transitively associated nodes and edges. I want to set a variable number of transitive steps until transitive closure. 'Directed' will refer to whether the follower/followed relationship is one way or both ways.

I've tried and I've got a For loop which outputs edges, and a While loop which outputs additional transitively associated nodes into a list, but the While loop doesn't output edges yet.

Please can someone point me to a relevant example of how to do this or part of it?

Thanks!

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
KesterR
  • 1
  • 1
  • Please include what you have tried so far in your question. See [How do I ask a good question](https://stackoverflow.com/help/how-to-ask). Also please include a [Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example). – LeoE Jan 20 '20 at 18:45
  • It will be much easier if we can see your existing code. To enter it, click on the 'edit' button and copy-paste them (putting blank lines above and below) Then highlight the block of code and (on a mac) the shortcut command-k will intent it all once, which will cause it to be formatted like code. – Joel Jan 21 '20 at 04:22

0 Answers0