Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

way to get text inside anchor tag in Crawlspider #3711

Closed
suraj-deshmukh opened this issue Apr 1, 2019 · 1 comment
Closed

way to get text inside anchor tag in Crawlspider #3711

suraj-deshmukh opened this issue Apr 1, 2019 · 1 comment

Comments

@suraj-deshmukh
Copy link

@suraj-deshmukh suraj-deshmukh commented Apr 1, 2019

I have a crawlspider which crawls given site upto certain dept and download the pdfs on that site. Everything works fine but along with link of pdf, i also need text inside anchor tag.

for eg:

<a href='../some/pdf/url/pdfname.pdf'>Project Report</a>

consider this anchor tag, in callback i get response object and along with this object i need text inside that tag for eg 'Project Report'.
Is there any way to get this information along with the response object. i have gone through https://docs.scrapy.org/en/latest/topics/selectors.html link but it not something that i am looking for.

@elacuesta
Copy link
Member

@elacuesta elacuesta commented Apr 1, 2019

I believe this is the same question as https://stackoverflow.com/q/55450472/6946615. I just answered there, and given that it's technically possible to get the link text, I think this particular issue should be treated as a request for documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants