Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extract Anchor Text (Scrapy)
#3
(Jul-21-2018, 06:26 AM)buran Wrote: try
response.css('div.blog_next_page > a::text').extract_first()
Scrapy Selectors docs

It works!

I was messing around with having 'text' inside the attr() or a::text(), geez...

So 'text' alone is just inside the string or it sniff a string at the a-tag?

Thanks again!
Reply


Messages In This Thread
Extract Anchor Text (Scrapy) - by soothsayerpg - Jul-21-2018, 06:15 AM
RE: Extract Anchor Text (Scrapy) - by buran - Jul-21-2018, 06:26 AM
RE: Extract Anchor Text (Scrapy) - by soothsayerpg - Jul-21-2018, 07:18 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Extract Href URL and Text From List knight2000 2 9,053 Jul-08-2021, 12:53 PM
Last Post: knight2000
  Selenium extract id text xzozx 1 2,126 Jun-15-2020, 06:32 AM
Last Post: Larz60+
  Extract text from tag content using regular expression Pavel_47 8 5,261 Nov-25-2019, 03:17 PM
Last Post: buran
  Extract text between bold headlines from HTML CostasG 1 2,336 Aug-31-2019, 10:53 AM
Last Post: snippsat
  webscraping - failing to extract specific text from data.gov rontar 2 3,201 May-19-2018, 08:01 AM
Last Post: rontar
  Scrapy-cut: Advanced Cookiecutter Scrapy Templating scriptso 2 4,667 Feb-02-2017, 07:57 PM
Last Post: scriptso

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020