Skip to content

Commit

Permalink
instagram scraping: fetch 50 likes instead of 24. (snarfed/bridgy#898)
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Nov 19, 2019
1 parent 5056372 commit 5c54a02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ On the open source side, there are many related projects. [php-mf2-shim](https:/
Changelog
---
### 2.3 - unreleased
* Instagram:
* Scraping: fetch 50 likes instead of 24. ([snarfed/bridgy#898](https://github.com/snarfed/bridgy/issues/898))
* RSS:
* Add `itunes:image`, `itunes:author`, and `itunes:category`.
* Bug fix: extract feed image from `hfeed` correctly.
Expand Down
2 changes: 1 addition & 1 deletion granary/instagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
r'^/graphql/query/\?query_hash=[^&]*&(amp;)?variables=(%7B%7D|{})$')
# the query hash here comes (i think) from inside a .js file served by IG, so
# we'd have to fetch and scrape that to get it dynamically. not worth it yet.
HTML_LIKES_URL = HTML_BASE_URL + 'graphql/query/?query_hash=d5d763b1e2acf209d62d22d184488e57&variables={"shortcode":"%s","include_reel":false,"first":24}'
HTML_LIKES_URL = HTML_BASE_URL + 'graphql/query/?query_hash=d5d763b1e2acf209d62d22d184488e57&variables={"shortcode":"%s","include_reel":false,"first":100}'
HTML_DATA_RE = re.compile(r"""
<script\ type="text/javascript">
window\.(_sharedData\ =|__additionalDataLoaded\('[^']+',)\ *
Expand Down

0 comments on commit 5c54a02

Please sign in to comment.