Initial commit
This commit is contained in:
commit
b0b016a4d9
37 changed files with 2447 additions and 0 deletions
18
code/parsing-data-css.py
Normal file
18
code/parsing-data-css.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import scrapy
|
||||
|
||||
|
||||
class EuroPython2023Spider(scrapy.Spider):
|
||||
name = "europython"
|
||||
|
||||
start_urls = [
|
||||
"https://ep2023.europython.eu/sessions",
|
||||
"https://ep2023.europython.eu/tutorials",
|
||||
]
|
||||
|
||||
def parse(self, response):
|
||||
sessions = response.css(".mt-12")
|
||||
for session in sessions:
|
||||
yield {
|
||||
"title": session.css("h2 a::text").get(),
|
||||
"presenter": session.css("p a::text").get(),
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue