mirror of
https://github.com/heyarne/berliner-winter.git
synced 2026-05-06 19:23:39 +02:00
Simplify code by removing :nth-of-type and accessing the list directly
This commit is contained in:
parent
66b68b269d
commit
58f8e65669
1 changed files with 3 additions and 2 deletions
|
|
@ -35,7 +35,7 @@ class Scraper():
|
||||||
district = places[:places.find(' ')]
|
district = places[:places.find(' ')]
|
||||||
additional = places[places.find(' ') + 1:].strip()
|
additional = places[places.find(' ') + 1:].strip()
|
||||||
|
|
||||||
text = table.select('tr:nth-of-type(3)')[0].select('td:nth-of-type(2)')[0].get_text()
|
text = table.select('tr')[2].select('td')[1].get_text()
|
||||||
|
|
||||||
article = {
|
article = {
|
||||||
'date': date(int(year), int(month), int(day)),
|
'date': date(int(year), int(month), int(day)),
|
||||||
|
|
@ -67,5 +67,6 @@ class Scraper():
|
||||||
|
|
||||||
# for url in overview_urls:
|
# for url in overview_urls:
|
||||||
|
|
||||||
# while self.has_more_pages():
|
# while document:
|
||||||
# self.visit_next_page()
|
# self.visit_next_page()
|
||||||
|
# document = self.get_next_page()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue