Updating My Daily Link Grabber - LiveCoding
` youtube : https : //www.youtube.com/watch?v=DIHhUYzuMVc `
### [Start : 00 : 00 : 00] - Chatting and Review
Just chatting.
### [Time : 00 : 10 : 45] - Enhancing The Daily Link Grabber
I spent a while before the 3 hour mark trying to figure out this look which only adds items to an object if they don't match a set of exclude patterns. This is what I ended up with
def clean _ data _ remove _ excludes(self) : new _ object = {} for item in self.object _ data : def include _ item() : for pattern in self.exclude _ patterns : if re.search(pattern, item) : return False return True if include _ item() : new _ object[item] = self.object _ data[item] self.object _ data = new _ object
TODO List for the grabber :
- Update timestamp in blogpost template - Load config files (zero, one, or more) - Move hard coded variables into a config file - Filter out regex patterns (e.g.) - docs.google.com - localhost - www.alanwsmith.com - launchpad - work domains - amazon stuff that's not browsing - youtube links that aren't videos - Flip the title of searching so "Google Search" is at the start. - Update Stack Overflow to use share link - Drop preface category from stackoverflow links.
### Links From The Stream
- Basic Usage - Code coverage - Help - Configuring code coverage measurement - Help - Coverage - Help - datetime – Date/time value manipulation - Python Module of the Week - Feature Spotlight: Python Code Coverage with PyCharm – PyCharm Blog - How does Jekyll date formatting work? - Stack Overflow - Python: Continuing to next iteration in outer loop - Stack Overflow - Random Noun Generator — 1000+ Random Nouns - Running with coverage - Help - Viewing code coverage results - Help