Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Fran-Rg committed May 6, 2024
1 parent dd9bebf commit 7c34a19
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/on-cron-lore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python
if: ${{ steps.champ-count.outputs.CHAMP_COUNT != steps.last-release.outputs.PREVIOUS_CHAMP_COUNT && inputs.dburl == '' }}
if: ${{ steps.champ-count.outputs.CHAMP_COUNT != steps.last-release.outputs.PREVIOUS_CHAMP_COUNT || inputs.dburl != '' }}
uses: actions/setup-python@v4
with:
python-version: "3.12"

- name: Requirements
if: ${{ steps.champ-count.outputs.CHAMP_COUNT != steps.last-release.outputs.PREVIOUS_CHAMP_COUNT && inputs.dburl == '' }}
if: ${{ steps.champ-count.outputs.CHAMP_COUNT != steps.last-release.outputs.PREVIOUS_CHAMP_COUNT || inputs.dburl != '' }}
run: |
chmod +x ./install.sh
./install.sh
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ instance/

# Scrapy stuff:
.scrapy
.scrapy*

# Sphinx documentation
docs/_build/
Expand Down
5 changes: 3 additions & 2 deletions leaguelore/spiders/champions.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ def parse_champion(self, response, **kwargs):
logging.error("No bio for '%s': %s", name, response.url)

def parse_bio(self, response, **kwargs):
bio = "".join(i.get() for i in response.xpath('//*[@id="CatchElement"]/*'))
# bio = "".join(i.get() for i in response.xpath('//*[@id="CatchElement"]/*'))
bio = response.css(".root_3nvd.dark_1RHo").get()

image_url = response.css("div.image_3oOd.backgroundImage_5wQJ")[0].attrib[
"data-am-url"
Expand Down Expand Up @@ -265,7 +266,7 @@ def parse_bio(self, response, **kwargs):
yield champ_parse

def parse_story(self, response, **kwargs):
story = "".join(i.get() for i in response.xpath('//*[@id="CatchElement"]/*'))
story = response.css(".root_3nvd.dark_1RHo").get()
champ_parse = {"story": story} | kwargs
self.save_champ(champ_parse)
yield champ_parse
Expand Down

0 comments on commit 7c34a19

Please sign in to comment.