This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| document.querySelectorAll('.list-article-consommation').forEach(article => { | |
| count = 1 | |
| article.querySelectorAll('.content p').forEach(el => { | |
| if (!el.innerText.trim()) return | |
| el.innerHTML = '<i>('+ count +')</i> ' + el.innerHTML | |
| count += 1 | |
| }) | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [email protected] | |
| [email protected] | |
| [email protected] | |
| [email protected] | |
| [email protected] | |
| [email protected] | |
| [email protected] | |
| [email protected] | |
| [email protected] | |
| [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var links = document.querySelectorAll('.mediaIndex a') | |
| var player = document.querySelector('#html5_player') | |
| var results = [] | |
| var i = 0; | |
| function next() { | |
| if (links[i]) { | |
| links[i].click() | |
| setTimeout(() => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import glob | |
| import os | |
| import sys | |
| from pathlib import Path | |
| from lys import L, raw, render | |
| from mwclient import Site | |
| from tlfp.tools.common import open_json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fetch("https://www.nosdeputes.fr/deputes/json").then(data => data.json()).then(data => { | |
| DEPUTES = {} | |
| data.deputes.forEach(dep => { | |
| dep = dep.depute | |
| DEPUTES[dep.nom_de_famille.toUpperCase()] = dep.groupe_sigle | |
| }) | |
| function process() { | |
| document.querySelectorAll("#amdtAuteur").forEach(x => { | |
| if (!x.hasAttribute("processed")) { | |
| var nom = x.innerText.replace("de", "").replace(" et plusieurs de ses collègues", "").replace("M.", "").replace("Mme", "") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <body> | |
| <p style="font-family: sans-serif;padding-left: 27px;margin: 0;"> | |
| darkest green = 5+ contributions | lightest green = at least one contribution | |
| </p> | |
| <script src="https://d3js.org/d3.v4.min.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/[email protected]/moment.min.js"></script> | |
| <script> | |
| var width = 960, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tweets.csv comes from `twint -u dam_io --csv -o tweets.csv` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pprint import pprint | |
| def convert(date): | |
| day, hour = date.split(' à ') | |
| hour = int(hour.replace('h', '')) | |
| return day + '_' + str(hour).rjust(2, '0') | |
| def merge(start, end, other_start, other_end): | |
| if other_start < start and other_end < start: | |
| return None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Gilbert Collard 226K | |
| Nadine Morano 218K | |
| Raphaël Glucksmann 197.8K | |
| Jordan Bardella 75.9K | |
| Yannick Jadot 61.5K | |
| Nicolas Bay 60.9K | |
| Thierry Mariani 58K | |
| François-Xavier Bellamy 52.6K | |
| Manon Aubry 50.4K | |
| Pascal Canfin 46.1K |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TODO = """ | |
| - [x] Article 1 | |
| - [x] Article 2 | |
| - [x] Article 3 | |
| - [x] Article 4 | |
| - [x] Article 5 | |
| - [x] Article 6 | |
| - [x] Article 7 | |
| - [x] Article 8 | |
| - [x] Article 9 |
NewerOlder