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

Country param doesn't seem to work when finding groups #249

Open
rutgerg opened this Issue Oct 19, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@rutgerg

rutgerg commented Oct 19, 2017

Whatever value I add for country I always get Dutch groups back

https://api.meetup.com/find/groups?photo-host=public&page=20&country=AT&sig_id=blabla&sig=blabla

score: 1,
id: 18405302,
name: "Amsterdam Data Science (ADS) Meetup",
status: "active",
link: "https://www.meetup.com/Amsterdam-Data-Science/",
urlname: "Amsterdam-Data-Science",
description: "

Amsterdam Data Science (ADS) accelerates data science research by connecting, sharing and showcasing world-class technology, expertise and talent from Amsterdam on a regional, national and international level. 

Our research enables business and society to better gather, store, analyse and present data in order to gain valuable insights and make informed decisions.

ADS is a collaboration of Amsterdam University of Applied Sciences (AUAS/HvA), Centrum Wiskunde Informatica (CWI), University of Amsterdam (UvA), and Vrije University Amsterdam (VU).

All our events are in English and attendance is free but please do so in advance through Meet-up. 

Find out more about ADS at http://amsterdamdatascience.nl



",
created: 1422890015000,
city: "Amsterdam",
country: "NL",
localized_country_name: "Netherlands",
localized_location: "Amsterdam, Netherlands",
state: "",
join_mode: "open",
visibility: "public",
lat: 52.37,
lon: 4.89,

Any ideas?

@momander

This comment has been minimized.

momander commented Aug 18, 2018

I'm seeing the same behavior. Regardless of what I supply in the country field, I get meetups from the US. For example:

https://api.meetup.com/find/groups?&sign=true&photo-host=public&country=SE&radius=global&category=34&order=members&page=2

Note the country=SE part of the call. SE is the two-letter code for Sweden. My top result is a meetup from New York:

{
  "0": {
  "score": 1,
  "id": 176399,
  "name": "NY Tech Meetup",
  "status": "active",
  "link": "https://www.meetup.com/ny-tech/",
  "urlname": "ny-tech",
  ...

I had expected meetups from Sweden in the response.

I get the same result no matter what country code I use. If I omit radius=global, the top result is from the San Francisco Bay Area (where I'm based).

Are we using this API wrong, or is it a bug? Any estimate on when it will be fixed?

@TomasVotruba

This comment has been minimized.

TomasVotruba commented Oct 6, 2018

I'm having the same problem:

Slovenia, e.g when I look for "php" meetups in "Slovenia":

http://api.meetup.com/find/groups?country=SI&location=Slovenia&topic_id=455&page=10&key=3862c18323629314e5c596422581378&radius=smart

No matter what radius values I try, it's still invalid.

In manuall (https://www.meetup.com/meetup_api/docs/find/groups/) there is hard to spot info about required location:

All parameters are optional. If you do not supply some explicit form of location, the results will be based on your registered Meetup profile location, falling back on your IP's geographic location.

But even when I specify location, it still fallbacks to my profile ones.

How to solve this?

@TomasVotruba

This comment has been minimized.

TomasVotruba commented Oct 6, 2018

I need same results as in here:
https://www.meetup.com/topics/php/si/

How to do it with API?


Workaround with crawler. I took me 10 minutes to write that, compared to 2 hours of debugging this issue.

composer require symfony/dom-crawler
use Symfony\Component\DomCrawler\Crawler;

// crawling: 'https://www.meetup.com/topics/php/si/'
$code = 'si';

$crawlUrl = sprintf('https://www.meetup.com/topics/%s/%s/', 'php', $code);
$crawler = new Crawler(file_get_contents($crawlUrl));

$meetupNames = [];
// headlines of found groups
foreach ($crawler->filterXPath('//span[@class="text--bold display--block"]') as $node) {
    $meetupNames[] = $node->textContent;
}

var_dump($meetupNames);
array(5) {
  [0]=>
  string(15) "DevOps Slovenia"
  [1]=>
  string(15) "Drupal Slovenia"
  [2]=>
  string(15) "Vue.js Slovenia"
  [3]=>
  string(27) "Symfony User Group Slovenia"
  [4]=>
  string(38) "PrestaShop - Slovenia Ecommerce Meetup"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment