<commit_before><?php

namespace Franklin\test\Foursquare\Venue;

use
    Franklin\test\Scrape\Scrape,
    Franklin\network\CURL
    ;

class Venue extends Scrape
{
    public $name = 'Foursquare Venue';
    
    public $description = 'Foursquare venue checkins and people counter';

    public function run()
    {
        $this->beforeRun();

        $url = "https://www.foursquare.com/v/".urlencode($this->config->venue);
        $CURL = new CURL;
        if (!$response = $CURL->get($url)) {
            return 0;
        }

        // the international result of a foursquare venue contains json encoded
        // information about varios venues, we need the id of the current venue
        // to get the counters for that venue instead of any other
        $venueId = substr(
            $this->config->venue,
            strpos($this->config->venue, '/') + 1
        );
        
        // capture data from the javascript json from the page’s source
        $data = array();
        $regexps = array(
            'checkins' => '/'.$venueId.'.*checkinsCount":(\d+)/',<commit_msg>fixed foursquare venue info test<commit_after><?php

namespace Franklin\test\Foursquare\Venue;

use
    Franklin\test\Scrape\Scrape,
    Franklin\network\CURL
    ;

class Venue extends Scrape
{
    public $name = 'Foursquare Venue';
    
    public $description = 'Foursquare venue checkins and people counter';

    public function run()
    {
        $this->beforeRun();

        $url = "https://de.foursquare.com/v/".$this->config->venue;
        $CURL = new CURL;
        if (!$response = $CURL->get($url)) {
            return 0;
        }

        // the international result of a foursquare venue contains json encoded
        // information about varios venues, we need the id of the current venue
        // to get the counters for that venue instead of any other
        $venueId = substr(
            $this->config->venue,
            strpos($this->config->venue, '/') + 1
        );
        
        // capture data from the javascript json from the page’s source
        $data = array();
        $regexps = array(
            'checkins' => '/'.$venueId.'.*checkinsCount":(\d+)/',
{'fraction_non_alphanumeric': 0.12391005048187242, 'fraction_numerical': 0.0018357044515832951, 'mean_word_length': 2.1098430813124107, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3621326', 'n_tokens_mistral': 637, 'n_tokens_neox': 617, 'n_words': 183}