Skip to content
This repository has been archived by the owner on Mar 7, 2021. It is now read-only.

Scrape Profile Image URL #15

Open
farisalasmary opened this issue Sep 24, 2019 · 1 comment
Open

Scrape Profile Image URL #15

farisalasmary opened this issue Sep 24, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@farisalasmary
Copy link

I've been using this library for a while but unfortunately I did not find profile image URL within the scraped data. I've struggled to modify the code but with no result! My real problem is with twitter's class name obfuscation. For example, class="css-1dbjc4n r-1j3t67a" is the CSS class used inside the div of each tweet but in your code it is as simple as

_tweet_content_pattern_ = '''./div[@class="content"]'''
. How could you know the real name of the class? also, how can you add a new feature like profile image URL?

@5hirish 5hirish self-assigned this Sep 25, 2019
@5hirish 5hirish added enhancement New feature or request help wanted Extra attention is needed question Further information is requested labels Sep 25, 2019
@5hirish
Copy link
Owner

5hirish commented Sep 25, 2019

@farisalasmary this library uses XPATH to scrape data. So to get the profile picture image one could use: //*[@id="page-container"]/div[1]/div/div[1]/div[2]/div[1]/div/a/img XPATH query. You can even further simplify this XPATH query. If you do add this please raise a PR and I will merge it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants